diff --git a/web/service/tgbot.go b/web/service/tgbot.go index d3ebe820..34bca40d 100644 --- a/web/service/tgbot.go +++ b/web/service/tgbot.go @@ -518,18 +518,37 @@ func (t *Tgbot) OnReceive() { t.addClient(message.Chat.ID, message_text) } case "awaiting_subid": - if client_SubID == strings.TrimSpace(message.Text) { + newSubID := strings.TrimSpace(message.Text) + + if client_SubID == newSubID { t.SendMsgToTgbotDeleteAfter(message.Chat.ID, t.I18nBot("tgbot.messages.using_default_value"), 3, tu.ReplyKeyboardRemove()) delete(userStates, message.Chat.ID) + inbound, _ := t.inboundService.GetInbound(receiver_inbound_ID) + message_text, _ := t.BuildInboundClientDataMessage(inbound.Remark, inbound.Protocol) + t.addClient(message.Chat.ID, message_text) return nil } - client_SubID = strings.TrimSpace(message.Text) - t.SendMsgToTgbotDeleteAfter(message.Chat.ID, t.I18nBot("tgbot.messages.received_subid"), 3, tu.ReplyKeyboardRemove()) - delete(userStates, message.Chat.ID) - inbound, _ := t.inboundService.GetInbound(receiver_inbound_ID) - message_text, _ := t.BuildInboundClientDataMessage(inbound.Remark, inbound.Protocol) - t.addClient(message.Chat.ID, message_text) + isValidURI, _ := regexp.MatchString(`^[\p{L}\p{N}\-_]+$`, newSubID) + + if !isValidURI { + userStates[message.Chat.ID] = "awaiting_subid" + + cancel_btn_markup := tu.InlineKeyboard( + tu.InlineKeyboardRow( + tu.InlineKeyboardButton(t.I18nBot("tgbot.buttons.use_default")).WithCallbackData("add_client_default_info"), + ), + ) + + t.SendMsgToTgbot(message.Chat.ID, t.I18nBot("tgbot.messages.invalid_subid"), cancel_btn_markup) + } else { + client_SubID = newSubID + t.SendMsgToTgbotDeleteAfter(message.Chat.ID, t.I18nBot("tgbot.messages.received_subid"), 3, tu.ReplyKeyboardRemove()) + delete(userStates, message.Chat.ID) + inbound, _ := t.inboundService.GetInbound(receiver_inbound_ID) + message_text, _ := t.BuildInboundClientDataMessage(inbound.Remark, inbound.Protocol) + t.addClient(message.Chat.ID, message_text) + } case "awaiting_password_tr": if client_TrPassword == strings.TrimSpace(message.Text) { t.SendMsgToTgbotDeleteAfter(message.Chat.ID, t.I18nBot("tgbot.messages.using_default_value"), 3, tu.ReplyKeyboardRemove()) @@ -1784,7 +1803,7 @@ case "add_client_ch_default_subid": tu.InlineKeyboardButton("xtls-rprx-vision-udp443").WithCallbackData("set_flow_vision_udp443"), ), tu.InlineKeyboardRow( - tu.InlineKeyboardButton(t.I18nBot("tgbot.buttons.flow_empty")).WithCallbackData("set_flow_empty"), + tu.InlineKeyboardButton(t.I18nBot("tgbot.buttons.flow_none")).WithCallbackData("set_flow_none"), ), tu.InlineKeyboardRow( tu.InlineKeyboardButton(t.I18nBot("tgbot.buttons.cancel")).WithCallbackData("add_client_default_info"), @@ -1794,24 +1813,27 @@ case "add_client_ch_default_subid": case "set_flow_vision": client_Flow = "xtls-rprx-vision" - t.deleteMessageTgBot(chatId, callbackQuery.Message.GetMessageID()) + messageId := callbackQuery.Message.GetMessageID() inbound, _ := t.inboundService.GetInbound(receiver_inbound_ID) message_text, _ := t.BuildInboundClientDataMessage(inbound.Remark, inbound.Protocol) - t.addClient(chatId, message_text) + t.addClient(chatId, message_text, messageId) + t.sendCallbackAnswerTgBot(callbackQuery.ID, t.I18nBot("tgbot.answers.successfulOperation")) case "set_flow_vision_udp443": client_Flow = "xtls-rprx-vision-udp443" - t.deleteMessageTgBot(chatId, callbackQuery.Message.GetMessageID()) + messageId := callbackQuery.Message.GetMessageID() inbound, _ := t.inboundService.GetInbound(receiver_inbound_ID) message_text, _ := t.BuildInboundClientDataMessage(inbound.Remark, inbound.Protocol) - t.addClient(chatId, message_text) + t.addClient(chatId, message_text, messageId) + t.sendCallbackAnswerTgBot(callbackQuery.ID, t.I18nBot("tgbot.answers.successfulOperation")) - case "set_flow_empty": + case "set_flow_none": client_Flow = "" - t.deleteMessageTgBot(chatId, callbackQuery.Message.GetMessageID()) + messageId := callbackQuery.Message.GetMessageID() inbound, _ := t.inboundService.GetInbound(receiver_inbound_ID) message_text, _ := t.BuildInboundClientDataMessage(inbound.Remark, inbound.Protocol) - t.addClient(chatId, message_text) + t.addClient(chatId, message_text, messageId) + t.sendCallbackAnswerTgBot(callbackQuery.ID, t.I18nBot("tgbot.answers.successfulOperation")) case "add_client_ch_default_id": t.deleteMessageTgBot(chatId, callbackQuery.Message.GetMessageID()) userStates[chatId] = "awaiting_id" @@ -2129,34 +2151,56 @@ func (t *Tgbot) BuildInboundClientDataMessage(inbound_remark string, protocol mo case model.Shadowsocks: message = t.I18nBot("tgbot.messages.inbound_client_data_pass", "InboundRemark=="+inbound_remark, "ClientPass=="+client_ShPassword, "ClientEmail=="+client_Email, "ClientTraffic=="+traffic_value, "ClientExp=="+expiryTime, "IpLimit=="+ip_limit, "ClientComment=="+client_Comment) - default: +default: return "", errors.New("unknown protocol") } - message += fmt.Sprintf("\n\nSub ID: %s", client_SubID) + subidLabel := t.I18nBot("tgbot.messages.client_subid") + if subidLabel == "tgbot.messages.client_subid" || subidLabel == "" { + subidLabel = "Sub ID:" + } + + flowLabel := t.I18nBot("tgbot.messages.client_flow") + if flowLabel == "tgbot.messages.client_flow" || flowLabel == "" { + flowLabel = "Flow:" + } + + extraInfo := fmt.Sprintf("\n📝 %s %s", subidLabel, client_SubID) if protocol == model.VLESS { - inbound, err := t.inboundService.GetInbound(receiver_inbound_ID) - if err == nil { - var streamSettings map[string]interface{} - if err := json.Unmarshal([]byte(inbound.StreamSettings), &streamSettings); err == nil { - network, _ := streamSettings["network"].(string) - security, _ := streamSettings["security"].(string) + inbound, err := t.inboundService.GetInbound(receiver_inbound_ID) + if err == nil { + var streamSettings map[string]interface{} + if err := json.Unmarshal([]byte(inbound.StreamSettings), &streamSettings); err == nil { + network, _ := streamSettings["network"].(string) + security, _ := streamSettings["security"].(string) - if network == "tcp" && (security == "tls" || security == "reality") { - if client_Flow != "" { - message += fmt.Sprintf("\nFlow: %s", client_Flow) - } else { - message += fmt.Sprintf("\nFlow: %s", t.I18nBot("tgbot.messages.not_specified")) - } - } - } - } - } + if network == "tcp" && (security == "tls" || security == "reality") { + if client_Flow != "" { + extraInfo += fmt.Sprintf("\n🌊 %s %s", flowLabel, client_Flow) + } else { + extraInfo += fmt.Sprintf("\n🌊 %s %s", flowLabel, t.I18nBot("tgbot.messages.not_specified")) + } + } + } + } + } + + separator := "\n\n" + if strings.Contains(message, "\r\n\r\n") { + separator = "\r\n\r\n" + } + + lastIdx := strings.LastIndex(message, separator) + + if lastIdx != -1 { + message = message[:lastIdx] + extraInfo + separator + message[lastIdx+len(separator):] + } else { + message += extraInfo + "\n" + } return message, nil } - // BuildJSONForProtocol builds a JSON string for the given protocol with client data. func (t *Tgbot) BuildJSONForProtocol(protocol model.Protocol) (string, error) { var jsonString string @@ -3951,10 +3995,8 @@ func (t *Tgbot) SendMsgToTgbotDeleteAfter(chatId int64, msg string, delayInSecon go func() { time.Sleep(time.Duration(delayInSeconds) * time.Second) // Wait for the specified delay t.deleteMessageTgBot(chatId, sentMsg.MessageID) // Delete the message - delete(userStates, chatId) }() } - // deleteMessageTgBot deletes a message from the chat. func (t *Tgbot) deleteMessageTgBot(chatId int64, messageID int) { params := telego.DeleteMessageParams{ diff --git a/web/translation/translate.ar_EG.toml b/web/translation/translate.ar_EG.toml index a3fde420..67704e54 100644 --- a/web/translation/translate.ar_EG.toml +++ b/web/translation/translate.ar_EG.toml @@ -720,6 +720,9 @@ "error_add_client" = "⚠️ حصل خطأ:\n\n {{ .error }}" "using_default_value" = "تمام، هشيل على القيمة الافتراضية. 😊" "incorrect_input" = "المدخلات مش صحيحة.\nالكلمات لازم تكون متصلة من غير فراغات.\nمثال صحيح: aaaaaa\nمثال غلط: aaa aaa 🚫" +"invalid_subid" = "تنسيق غير صالح.\nيمكن أن يحتوي Sub ID فقط على أحرف وأرقام وشرطات (-) وشرطات سفلية (_).\nالمسافات والأحرف الخاصة غير مسموح بها. 🚫" +"client_subid" = "معرف الاشتراك (Sub ID):" +"client_flow" = "التوجيه (Flow):" "AreYouSure" = "إنت متأكد؟ 🤔" "not_specified" = "غير محدد" "SuccessResetTraffic" = "📧 البريد الإلكتروني: {{ .ClientEmail }}\n🏁 النتيجة: ✅ تم بنجاح" @@ -769,7 +772,7 @@ "change_comment" = "⚙️💬 تعليق" "change_subid" = "📝 Sub ID" "change_flow" = "🌊 Flow" -"flow_empty" = "فارغ" +"flow_none" = "مفيش" "ResetAllTraffics" = "إعادة ضبط جميع الترافيك" "SortedTrafficUsageReport" = "تقرير استخدام الترافيك المرتب" diff --git a/web/translation/translate.en_US.toml b/web/translation/translate.en_US.toml index 25325a78..b1417ad8 100644 --- a/web/translation/translate.en_US.toml +++ b/web/translation/translate.en_US.toml @@ -709,6 +709,8 @@ "received_email" = "📧📥 Email updated." "received_comment" = "💬📥 Comment updated." "received_subid" = "Sub ID updated successfully!" +"client_subid" = "Sub ID:" +"client_flow" = "Flow:" "id_prompt" = "🔑 Default ID: {{ .ClientId }}\n\nEnter your id." "pass_prompt" = "🔑 Default Password: {{ .ClientPassword }}\n\nEnter your password." "email_prompt" = "📧 Default Email: {{ .ClientEmail }}\n\nEnter your email." @@ -720,6 +722,7 @@ "error_add_client" = "⚠️ Error:\n\n {{ .error }}" "using_default_value" = "Okay, I'll stick with the default value. 😊" "incorrect_input" = "Your input is not valid.\nThe phrases should be continuous without spaces.\nCorrect example: aaaaaa\nIncorrect example: aaa aaa 🚫" +"invalid_subid" = "Invalid format.\nSub ID can only contain letters, numbers, hyphens (-), and underscores (_).\nSpaces and special characters are not allowed. 🚫" "AreYouSure" = "Are you sure? 🤔" "not_specified" = "Not specified" "SuccessResetTraffic" = "📧 Email: {{ .ClientEmail }}\n🏁 Result: ✅ Success" @@ -769,7 +772,7 @@ "change_comment" = "⚙️💬 Comment" "change_subid" = "📝 Sub ID" "change_flow" = "🌊 Flow" -"flow_empty" = "Empty" +"flow_none" = "None" "ResetAllTraffics" = "Reset All Traffics" "SortedTrafficUsageReport" = "Sorted Traffic Usage Report" diff --git a/web/translation/translate.es_ES.toml b/web/translation/translate.es_ES.toml index dcbe742e..43369608 100644 --- a/web/translation/translate.es_ES.toml +++ b/web/translation/translate.es_ES.toml @@ -709,6 +709,8 @@ "received_email" = "📧📥 Correo electrónico actualizado." "received_comment" = "💬📥 Comentario actualizado." "received_subid" = "Sub ID cambiado con éxito!" +"client_subid" = "Sub ID:" +"client_flow" = "Flow:" "id_prompt" = "🔑 ID predeterminado: {{ .ClientId }}\n\nIntroduce tu ID." "pass_prompt" = "🔑 Contraseña predeterminada: {{ .ClientPassword }}\n\nIntroduce tu contraseña." "email_prompt" = "📧 Correo electrónico predeterminado: {{ .ClientEmail }}\n\nIntroduce tu correo electrónico." @@ -720,6 +722,7 @@ "error_add_client" = "⚠️ Error:\n\n {{ .error }}" "using_default_value" = "Está bien, me quedaré con el valor predeterminado. 😊" "incorrect_input" = "Tu entrada no es válida.\nLas frases deben ser continuas sin espacios.\nEjemplo correcto: aaaaaa\nEjemplo incorrecto: aaa aaa 🚫" +"invalid_subid" = "Formato inválido.\nEl Sub ID solo puede contener letras, números, guiones (-) y guiones bajos (_).\nNo se permiten espacios ni caracteres especiales. 🚫" "AreYouSure" = "¿Estás seguro? 🤔" "not_specified" = "No especificado" "SuccessResetTraffic" = "📧 Correo: {{ .ClientEmail }}\n🏁 Resultado: ✅ Éxito" @@ -769,7 +772,7 @@ "change_comment" = "⚙️💬 Comentario" "change_subid" = "📝 Sub ID" "change_flow" = "🌊 Flow" -"flow_empty" = "Vacío" +"flow_none" = "None" "ResetAllTraffics" = "Reiniciar todo el tráfico" "SortedTrafficUsageReport" = "Informe de uso de tráfico ordenado" diff --git a/web/translation/translate.fa_IR.toml b/web/translation/translate.fa_IR.toml index aea7104e..4a8c5cbc 100644 --- a/web/translation/translate.fa_IR.toml +++ b/web/translation/translate.fa_IR.toml @@ -720,6 +720,9 @@ "error_add_client" = "⚠️ خطا:\n\n {{ .error }}" "using_default_value" = "باشه، از مقدار پیش‌فرض استفاده می‌کنم. 😊" "incorrect_input" = "ورودی شما معتبر نیست.\nعبارت‌ها باید بدون فاصله باشند.\nمثال صحیح: aaaaaa\nمثال نادرست: aaa aaa 🚫" +"invalid_subid" = "فرمت نامعتبر است.\nشناسه Sub ID فقط می‌تواند شامل حروف، اعداد، خط تیره (-) و خط زیر (_) باشد.\nاستفاده از فاصله و کاراکترهای خاص مجاز نیست. 🚫" +"client_subid" = "شناسه اشتراک (Sub ID):" +"client_flow" = "جریان (Flow):" "AreYouSure" = "مطمئنی؟ 🤔" "not_specified" = "مشخص نشده" "SuccessResetTraffic" = "📧 ایمیل: {{ .ClientEmail }}\n🏁 نتیجه: ✅ موفقیت‌آمیز" @@ -769,7 +772,7 @@ "change_comment" = "⚙️💬 نظر" "change_subid" = "📝 Sub ID" "change_flow" = "🌊 Flow" -"flow_empty" = "خالی" +"flow_none" = "هیچ" "ResetAllTraffics" = "بازنشانی همه ترافیک‌ها" "SortedTrafficUsageReport" = "گزارش استفاده از ترافیک مرتب‌شده" diff --git a/web/translation/translate.id_ID.toml b/web/translation/translate.id_ID.toml index 23790384..eb61032f 100644 --- a/web/translation/translate.id_ID.toml +++ b/web/translation/translate.id_ID.toml @@ -709,6 +709,8 @@ "received_email" = "📧📥 Email diperbarui." "received_comment" = "💬📥 Komentar diperbarui." "received_subid" = "Sub ID berhasil diubah!" +"client_subid" = "Sub ID:" +"client_flow" = "Flow:" "id_prompt" = "🔑 ID Default: {{ .ClientId }}\n\nMasukkan ID Anda." "pass_prompt" = "🔑 Kata Sandi Default: {{ .ClientPassword }}\n\nMasukkan kata sandi Anda." "email_prompt" = "📧 Email Default: {{ .ClientEmail }}\n\nMasukkan email Anda." @@ -720,6 +722,7 @@ "error_add_client" = "⚠️ Kesalahan:\n\n {{ .error }}" "using_default_value" = "Oke, saya akan tetap menggunakan nilai default. 😊" "incorrect_input" = "Masukan Anda tidak valid.\nFrasa harus berlanjut tanpa spasi.\nContoh benar: aaaaaa\nContoh salah: aaa aaa 🚫" +"invalid_subid" = "Format tidak valid.\nSub ID hanya boleh berisi huruf, angka, tanda hubung (-), dan garis bawah (_).\nSpasi dan karakter khusus tidak diperbolehkan. 🚫" "AreYouSure" = "Apakah kamu yakin? 🤔" "not_specified" = "Tidak ditentukan" "SuccessResetTraffic" = "📧 Email: {{ .ClientEmail }}\n🏁 Hasil: ✅ Berhasil" @@ -769,7 +772,7 @@ "change_comment" = "⚙️💬 Komentar" "change_subid" = "📝 Sub ID" "change_flow" = "🌊 Flow" -"flow_empty" = "Kosong" +"flow_none" = "None" "ResetAllTraffics" = "Reset Semua Lalu Lintas" "SortedTrafficUsageReport" = "Laporan Penggunaan Lalu Lintas yang Terurut" diff --git a/web/translation/translate.ja_JP.toml b/web/translation/translate.ja_JP.toml index 11c887bb..74f6157a 100644 --- a/web/translation/translate.ja_JP.toml +++ b/web/translation/translate.ja_JP.toml @@ -709,6 +709,8 @@ "received_email" = "📧📥 メールが更新されました。" "received_comment" = "💬📥 コメントが更新されました。" "received_subid" = "Sub ID が正常に変更されました!" +"client_subid" = "Sub ID:" +"client_flow" = "Flow:" "id_prompt" = "🔑 デフォルトID: {{ .ClientId }}\n\nIDを入力してください。" "pass_prompt" = "🔑 デフォルトパスワード: {{ .ClientPassword }}\n\nパスワードを入力してください。" "email_prompt" = "📧 デフォルトメール: {{ .ClientEmail }}\n\nメールを入力してください。" @@ -720,6 +722,7 @@ "error_add_client" = "⚠️ エラー:\n\n {{ .error }}" "using_default_value" = "わかりました、デフォルト値を使用します。 😊" "incorrect_input" = "入力が無効です。\nフレーズはスペースなしで続けて入力してください。\n正しい例: aaaaaa\n間違った例: aaa aaa 🚫" +"invalid_subid" = "無効なフォーマットです。\nSub IDには文字、数字、ハイフン(-)、アンダースコア(_)のみ使用できます。\nスペースや特殊文字は使用できません。 🚫" "AreYouSure" = "本当にいいですか?🤔" "not_specified" = "指定なし" "SuccessResetTraffic" = "📧 メール: {{ .ClientEmail }}\n🏁 結果: ✅ 成功" @@ -769,7 +772,7 @@ "change_comment" = "⚙️💬 コメント" "change_subid" = "📝 Sub ID" "change_flow" = "🌊 Flow" -"flow_empty" = "空" +"flow_none" = "なし" "ResetAllTraffics" = "すべてのトラフィックをリセット" "SortedTrafficUsageReport" = "ソートされたトラフィック使用レポート" diff --git a/web/translation/translate.pt_BR.toml b/web/translation/translate.pt_BR.toml index dc18afbb..ec13c246 100644 --- a/web/translation/translate.pt_BR.toml +++ b/web/translation/translate.pt_BR.toml @@ -709,6 +709,8 @@ "received_email" = "📧📥 E-mail atualizado." "received_comment" = "💬📥 Comentário atualizado." "received_subid" = "Sub ID alterado com sucesso!" +"client_subid" = "Sub ID:" +"client_flow" = "Flow:" "id_prompt" = "🔑 ID Padrão: {{ .ClientId }}\n\nDigite seu ID." "pass_prompt" = "🔑 Senha Padrão: {{ .ClientPassword }}\n\nDigite sua senha." "email_prompt" = "📧 E-mail Padrão: {{ .ClientEmail }}\n\nDigite seu e-mail." @@ -720,6 +722,7 @@ "error_add_client" = "⚠️ Erro:\n\n {{ .error }}" "using_default_value" = "Tudo bem, vou manter o valor padrão. 😊" "incorrect_input" = "Sua entrada não é válida.\nAs frases devem ser contínuas, sem espaços.\nExemplo correto: aaaaaa\nExemplo incorreto: aaa aaa 🚫" +"invalid_subid" = "Formato inválido.\nO Sub ID só pode conter letras, números, hifens (-) e sublinhados (_).\nEspaços e caracteres especiais não são permitidos. 🚫" "AreYouSure" = "Você tem certeza? 🤔" "not_specified" = "Não especificado" "SuccessResetTraffic" = "📧 Email: {{ .ClientEmail }}\n🏁 Resultado: ✅ Sucesso" @@ -769,7 +772,7 @@ "change_comment" = "⚙️💬 Comentário" "change_subid" = "📝 Sub ID" "change_flow" = "🌊 Flow" -"flow_empty" = "Vazio" +"flow_none" = "Nada" "ResetAllTraffics" = "Redefinir Todo o Tráfego" "SortedTrafficUsageReport" = "Relatório de Uso de Tráfego Ordenado" diff --git a/web/translation/translate.ru_RU.toml b/web/translation/translate.ru_RU.toml index 4241b6bf..552f4dcf 100644 --- a/web/translation/translate.ru_RU.toml +++ b/web/translation/translate.ru_RU.toml @@ -709,6 +709,8 @@ "received_email" = "📧📥 Email обновлен." "received_comment" = "💬📥 Комментарий обновлён." "received_subid" = "Sub ID успешно изменен!" +"client_subid" = "Sub ID:" +"client_flow" = "Flow:" "id_prompt" = "🔑 Стандартный ID: {{ .ClientId }}\n\nВведите ваш ID." "pass_prompt" = "🔑 Стандартный пароль: {{ .ClientPassword }}\n\nВведите ваш пароль." "email_prompt" = "📧 Стандартный email: {{ .ClientEmail }}\n\nВведите ваш email." @@ -720,6 +722,7 @@ "error_add_client" = "⚠️ Ошибка:\n\n {{ .error }}" "using_default_value" = "Используется значение по умолчанию👌" "incorrect_input" = "Ваш ввод недействителен.\nФразы должны быть непрерывными без пробелов.\nПравильный пример: aaaaaa\nНеправильный пример: aaa aaa 🚫" +"invalid_subid" = "Неверный формат.\nSub ID может содержать только буквы, цифры, дефис (-) и нижнее подчеркивание (_).\nПробелы и спецсимволы запрещены. 🚫" "AreYouSure" = "Вы уверены? 🤔" "not_specified" = "Не указан" "SuccessResetTraffic" = "📧 Почта: {{ .ClientEmail }}\n🏁 Результат: ✅ Успешно" @@ -769,7 +772,7 @@ "change_comment" = "⚙️💬 Комментарий" "change_subid" = "📝 Sub ID" "change_flow" = "🌊 Flow" -"flow_empty" = "Пусто" +"flow_none" = "Пусто" "ResetAllTraffics" = "Сбросить весь трафик" "SortedTrafficUsageReport" = "Отсортированный отчет об использовании трафика" diff --git a/web/translation/translate.tr_TR.toml b/web/translation/translate.tr_TR.toml index f690b0ca..b530a39d 100644 --- a/web/translation/translate.tr_TR.toml +++ b/web/translation/translate.tr_TR.toml @@ -709,6 +709,8 @@ "received_email" = "📧📥 E-posta güncellendi." "received_comment" = "💬📥 Yorum güncellendi." "received_subid" = "Sub ID başarıyla değiştirildi!" +"client_subid" = "Sub ID:" +"client_flow" = "Flow:" "id_prompt" = "🔑 Varsayılan Kimlik: {{ .ClientId }}\n\nKimliğinizi girin." "pass_prompt" = "🔑 Varsayılan Şifre: {{ .ClientPassword }}\n\nŞifrenizi girin." "email_prompt" = "📧 Varsayılan E-posta: {{ .ClientEmail }}\n\nE-postanızı girin." @@ -720,6 +722,7 @@ "error_add_client" = "⚠️ Hata:\n\n {{ .error }}" "using_default_value" = "Tamam, varsayılan değeri kullanacağım. 😊" "incorrect_input" = "Girdiğiniz değer geçerli değil.\nKelime öbekleri boşluk olmadan devam etmelidir.\nDoğru örnek: aaaaaa\nYanlış örnek: aaa aaa 🚫" +"invalid_subid" = "Geçersiz format.\nSub ID yalnızca harfler, rakamlar, tire (-) ve alt çizgi (_) içerebilir.\nBoşluklara ve özel karakterlere izin verilmez. 🚫" "AreYouSure" = "Emin misin? 🤔" "not_specified" = "Belirtilmemiş" "SuccessResetTraffic" = "📧 E-posta: {{ .ClientEmail }}\n🏁 Sonuç: ✅ Başarılı" @@ -769,7 +772,7 @@ "change_comment" = "⚙️💬 Yorum" "change_subid" = "📝 Sub ID" "change_flow" = "🌊 Flow" -"flow_empty" = "Boş" +"flow_none" = "Hiçbiri" "ResetAllTraffics" = "Tüm Trafikleri Sıfırla" "SortedTrafficUsageReport" = "Sıralı Trafik Kullanım Raporu" diff --git a/web/translation/translate.uk_UA.toml b/web/translation/translate.uk_UA.toml index 7d1a8839..ee8015d8 100644 --- a/web/translation/translate.uk_UA.toml +++ b/web/translation/translate.uk_UA.toml @@ -709,6 +709,8 @@ "received_email" = "📧📥 Електронна пошта оновлена." "received_comment" = "💬📥 Коментар оновлено." "received_subid" = "Sub ID успішно змінено!" +"client_subid" = "Sub ID:" +"client_flow" = "Flow:" "id_prompt" = "🔑 Стандартний ID: {{ .ClientId }}\n\nВведіть ваш ID." "pass_prompt" = "🔑 Стандартний пароль: {{ .ClientPassword }}\n\nВведіть ваш пароль." "email_prompt" = "📧 Стандартний email: {{ .ClientEmail }}\n\nВведіть ваш email." @@ -720,6 +722,7 @@ "error_add_client" = "⚠️ Помилка:\n\n {{ .error }}" "using_default_value" = "Гаразд, залишу значення за замовчуванням. 😊" "incorrect_input" = "Ваш ввід невірний.\nФрази повинні бути без пробілів.\nПравильний приклад: aaaaaa\nНеправильний приклад: aaa aaa 🚫" +"invalid_subid" = "Невірний формат.\nSub ID може містити лише літери, цифри, дефіс (-) та нижнє підкреслення (_).\nПробіли та спецсимволи заборонені. 🚫" "AreYouSure" = "Ви впевнені? 🤔" "not_specified" = "Не вказано" "SuccessResetTraffic" = "📧 Електронна пошта: {{ .ClientEmail }}\n🏁 Результат: ✅ Успішно" @@ -769,7 +772,7 @@ "change_comment" = "⚙️💬 Коментар" "change_subid" = "📝 Sub ID" "change_flow" = "🌊 Flow" -"flow_empty" = "Пусто" +"flow_none" = "Немає" "ResetAllTraffics" = "Скинути весь трафік" "SortedTrafficUsageReport" = "Відсортований звіт про використання трафіку" diff --git a/web/translation/translate.vi_VN.toml b/web/translation/translate.vi_VN.toml index 0b90bfd1..023e8c89 100644 --- a/web/translation/translate.vi_VN.toml +++ b/web/translation/translate.vi_VN.toml @@ -720,6 +720,7 @@ "error_add_client" = "⚠️ Lỗi:\n\n {{ .error }}" "using_default_value" = "Được rồi, tôi sẽ sử dụng giá trị mặc định. 😊" "incorrect_input" = "Dữ liệu bạn nhập không hợp lệ.\nCác chuỗi phải liền mạch và không có dấu cách.\nVí dụ đúng: aaaaaa\nVí dụ sai: aaa aaa 🚫" +"invalid_subid" = "Định dạng không hợp lệ.\nSub ID chỉ có thể chứa chữ cái, số, dấu gạch ngang (-) và dấu gạch dưới (_).\nKhông cho phép khoảng trắng và các ký tự đặc biệt. 🚫" "AreYouSure" = "Bạn có chắc không? 🤔" "not_specified" = "Không xác định" "SuccessResetTraffic" = "📧 Email: {{ .ClientEmail }}\n🏁 Kết quả: ✅ Thành công" @@ -769,7 +770,7 @@ "change_comment" = "⚙️💬 Bình Luận" "change_subid" = "📝 Sub ID" "change_flow" = "🌊 Flow" -"flow_empty" = "Trống" +"flow_none" = "None" "ResetAllTraffics" = "Đặt lại tất cả lưu lượng" "SortedTrafficUsageReport" = "Báo cáo sử dụng lưu lượng đã sắp xếp" diff --git a/web/translation/translate.zh_CN.toml b/web/translation/translate.zh_CN.toml index 7b381101..9365b65d 100644 --- a/web/translation/translate.zh_CN.toml +++ b/web/translation/translate.zh_CN.toml @@ -720,6 +720,7 @@ "error_add_client" = "⚠️ 错误:\n\n {{ .error }}" "using_default_value" = "好的,我会使用默认值。 😊" "incorrect_input" = "您的输入无效。\n短语应连续输入,不能有空格。\n正确示例: aaaaaa\n错误示例: aaa aaa 🚫" +"invalid_subid" = "格式无效。\nSub ID 只能包含字母、数字、连字符 (-) 和下划线 (_)。\n不允许使用空格和特殊字符。 🚫" "AreYouSure" = "你确定吗?🤔" "not_specified" = "未指定" "SuccessResetTraffic" = "📧 邮箱: {{ .ClientEmail }}\n🏁 结果: ✅ 成功" @@ -769,7 +770,7 @@ "change_comment" = "⚙️💬 评论" "change_subid" = "📝 Sub ID" "change_flow" = "🌊 Flow" -"flow_empty" = "空" +"flow_none" = "无" "ResetAllTraffics" = "重置所有流量" "SortedTrafficUsageReport" = "排序的流量使用报告" diff --git a/web/translation/translate.zh_TW.toml b/web/translation/translate.zh_TW.toml index 51ad995c..c35b9ffd 100644 --- a/web/translation/translate.zh_TW.toml +++ b/web/translation/translate.zh_TW.toml @@ -720,6 +720,7 @@ "error_add_client" = "⚠️ 錯誤:\n\n {{ .error }}" "using_default_value" = "好的,我會使用預設值。 😊" "incorrect_input" = "您的輸入無效。\n短語應連續輸入,不能有空格。\n正確示例: aaaaaa\n錯誤示例: aaa aaa 🚫" +"invalid_subid" = "格式無效。\nSub ID 只能包含字母、數字、連字號 (-) 和底線 (_)。\n不允許使用空格和特殊字元。 🚫" "AreYouSure" = "你確定嗎?🤔" "not_specified" = "未指定" "SuccessResetTraffic" = "📧 電子郵件: {{ .ClientEmail }}\n🏁 結果: ✅ 成功" @@ -769,7 +770,7 @@ "change_comment" = "⚙️💬 評論" "change_subid" = "📝 Sub ID" "change_flow" = "🌊 Flow" -"flow_empty" = "空" +"flow_none" = "無" "ResetAllTraffics" = "重設所有流量" "SortedTrafficUsageReport" = "排序過的流量使用報告"