diff --git a/web/controller/api.go b/web/controller/api.go index 628ae6d3..e99a26d2 100644 --- a/web/controller/api.go +++ b/web/controller/api.go @@ -53,7 +53,7 @@ func (a *APIController) initRouter(g *gin.RouterGroup, customGeo *service.Custom NewCustomGeoController(api.Group("/custom-geo"), customGeo) // Extra routes - api.POST("/backuptotgbot", a.BackuptoTgbot) + api.GET("/backuptotgbot", a.BackuptoTgbot) } // BackuptoTgbot sends a backup of the panel data to Telegram bot admins. diff --git a/web/service/tgbot.go b/web/service/tgbot.go index 8aa1d973..a1a06f1b 100644 --- a/web/service/tgbot.go +++ b/web/service/tgbot.go @@ -2803,7 +2803,7 @@ func (t *Tgbot) UserLoginNotify(attempt LoginAttempt) { msg += t.I18nBot("tgbot.messages.loginFailed") msg += t.I18nBot("tgbot.messages.hostname", "Hostname=="+hostname) if attempt.Reason != "" { - msg += fmt.Sprintf("Reason: %s\r\n", attempt.Reason) + msg += t.I18nBot("tgbot.messages.reason", "Reason=="+attempt.Reason) } } msg += t.I18nBot("tgbot.messages.username", "Username=="+attempt.Username) diff --git a/web/translation/translate.ar_EG.toml b/web/translation/translate.ar_EG.toml index b0d33dcf..3b8aa6b8 100644 --- a/web/translation/translate.ar_EG.toml +++ b/web/translation/translate.ar_EG.toml @@ -765,7 +765,7 @@ "traffic" = "🚦 الترافيك: {{ .Total }} (↑{{ .Upload }},↓{{ .Download }})\r\n" "xrayStatus" = "ℹ️ الحالة: {{ .State }}\r\n" "username" = "👤 اسم المستخدم: {{ .Username }}\r\n" -"password" = "👤 الباسورد: {{ .Password }}\r\n" +"reason" = "❗️ السبب: {{ .Reason }}\r\n" "time" = "⏰ الوقت: {{ .Time }}\r\n" "inbound" = "📍 الإدخال: {{ .Remark }}\r\n" "port" = "🔌 البورت: {{ .Port }}\r\n" diff --git a/web/translation/translate.en_US.toml b/web/translation/translate.en_US.toml index 25343fe4..8338029f 100644 --- a/web/translation/translate.en_US.toml +++ b/web/translation/translate.en_US.toml @@ -765,7 +765,7 @@ "traffic" = "🚦 Traffic: {{ .Total }} (↑{{ .Upload }},↓{{ .Download }})\r\n" "xrayStatus" = "ℹ️ Status: {{ .State }}\r\n" "username" = "👤 Username: {{ .Username }}\r\n" -"password" = "👤 Password: {{ .Password }}\r\n" +"reason" = "❗️ Reason: {{ .Reason }}\r\n" "time" = "⏰ Time: {{ .Time }}\r\n" "inbound" = "📍 Inbound: {{ .Remark }}\r\n" "port" = "🔌 Port: {{ .Port }}\r\n" diff --git a/web/translation/translate.es_ES.toml b/web/translation/translate.es_ES.toml index 7f7e9f71..b8b1a5b7 100644 --- a/web/translation/translate.es_ES.toml +++ b/web/translation/translate.es_ES.toml @@ -765,7 +765,7 @@ "traffic" = "🚦 Tráfico: {{ .Total }} (↑{{ .Upload }},↓{{ .Download }})\r\n" "xrayStatus" = "ℹ️ Estado de Xray: {{ .State }}\r\n" "username" = "👤 Nombre de usuario: {{ .Username }}\r\n" -"password" = "👤 Contraseña: {{ .Password }}\r\n" +"reason" = "❗️ Motivo: {{ .Reason }}\r\n" "time" = "⏰ Hora: {{ .Time }}\r\n" "inbound" = "📍 Inbound: {{ .Remark }}\r\n" "port" = "🔌 Puerto: {{ .Port }}\r\n" diff --git a/web/translation/translate.fa_IR.toml b/web/translation/translate.fa_IR.toml index c4d3eb27..7de9a64e 100644 --- a/web/translation/translate.fa_IR.toml +++ b/web/translation/translate.fa_IR.toml @@ -765,7 +765,7 @@ "traffic" = "🚦 ترافیک: {{ .Total }} (↑{{ .Upload }},↓{{ .Download }})\r\n" "xrayStatus" = "ℹ️ وضعیت‌ایکس‌ری: {{ .State }}\r\n" "username" = "👤 نام‌کاربری: {{ .Username }}\r\n" -"password" = "👤 رمز عبور: {{ .Password }}\r\n" +"reason" = "❗️ دلیل: {{ .Reason }}\r\n" "time" = "⏰ زمان: {{ .Time }}\r\n" "inbound" = "📍 نام‌ورودی: {{ .Remark }}\r\n" "port" = "🔌 پورت: {{ .Port }}\r\n" diff --git a/web/translation/translate.id_ID.toml b/web/translation/translate.id_ID.toml index bfede30e..662ef6a2 100644 --- a/web/translation/translate.id_ID.toml +++ b/web/translation/translate.id_ID.toml @@ -765,7 +765,7 @@ "traffic" = "🚦 Lalu Lintas: {{ .Total }} (↑{{ .Upload }},↓{{ .Download }})\r\n" "xrayStatus" = "ℹ️ Status: {{ .State }}\r\n" "username" = "👤 Nama Pengguna: {{ .Username }}\r\n" -"password" = "👤 Kata Sandi: {{ .Password }}\r\n" +"reason" = "❗️ Alasan: {{ .Reason }}\r\n" "time" = "⏰ Waktu: {{ .Time }}\r\n" "inbound" = "📍 Inbound: {{ .Remark }}\r\n" "port" = "🔌 Port: {{ .Port }}\r\n" diff --git a/web/translation/translate.ja_JP.toml b/web/translation/translate.ja_JP.toml index 2ee6c77c..aa8fccfa 100644 --- a/web/translation/translate.ja_JP.toml +++ b/web/translation/translate.ja_JP.toml @@ -765,7 +765,7 @@ "traffic" = "🚦 トラフィック:{{ .Total }} (↑{{ .Upload }},↓{{ .Download }})\r\n" "xrayStatus" = "ℹ️ Xrayステータス:{{ .State }}\r\n" "username" = "👤 ユーザー名:{{ .Username }}\r\n" -"password" = "👤 パスワード: {{ .Password }}\r\n" +"reason" = "❗️ 理由:{{ .Reason }}\r\n" "time" = "⏰ 時間:{{ .Time }}\r\n" "inbound" = "📍 インバウンド:{{ .Remark }}\r\n" "port" = "🔌 ポート:{{ .Port }}\r\n" diff --git a/web/translation/translate.pt_BR.toml b/web/translation/translate.pt_BR.toml index bb8d412d..4144f7e8 100644 --- a/web/translation/translate.pt_BR.toml +++ b/web/translation/translate.pt_BR.toml @@ -765,7 +765,7 @@ "traffic" = "🚦 Tráfego: {{ .Total }} (↑{{ .Upload }},↓{{ .Download }})\r\n" "xrayStatus" = "ℹ️ Status: {{ .State }}\r\n" "username" = "👤 Nome de usuário: {{ .Username }}\r\n" -"password" = "👤 Senha: {{ .Password }}\r\n" +"reason" = "❗️ Motivo: {{ .Reason }}\r\n" "time" = "⏰ Hora: {{ .Time }}\r\n" "inbound" = "📍 Inbound: {{ .Remark }}\r\n" "port" = "🔌 Porta: {{ .Port }}\r\n" diff --git a/web/translation/translate.ru_RU.toml b/web/translation/translate.ru_RU.toml index 299cc019..fb954c0f 100644 --- a/web/translation/translate.ru_RU.toml +++ b/web/translation/translate.ru_RU.toml @@ -765,7 +765,7 @@ "traffic" = "🚦 Трафик: {{ .Total }} (↑{{ .Upload }},↓{{ .Download }})\r\n" "xrayStatus" = "ℹ️ Состояние Xray: {{ .State }}\r\n" "username" = "👤 Имя пользователя: {{ .Username }}\r\n" -"password" = "👤 Пароль: {{ .Password }}\r\n" +"reason" = "❗️ Причина: {{ .Reason }}\r\n" "time" = "⏰ Время: {{ .Time }}\r\n" "inbound" = "📍 Входящее подключение: {{ .Remark }}\r\n" "port" = "🔌 Порт: {{ .Port }}\r\n" diff --git a/web/translation/translate.tr_TR.toml b/web/translation/translate.tr_TR.toml index b08255af..4ebad7c6 100644 --- a/web/translation/translate.tr_TR.toml +++ b/web/translation/translate.tr_TR.toml @@ -765,7 +765,7 @@ "traffic" = "🚦 Trafik: {{ .Total }} (↑{{ .Upload }},↓{{ .Download }})\r\n" "xrayStatus" = "ℹ️ Durum: {{ .State }}\r\n" "username" = "👤 Kullanıcı Adı: {{ .Username }}\r\n" -"password" = "👤 Şifre: {{ .Password }}\r\n" +"reason" = "❗️ Sebep: {{ .Reason }}\r\n" "time" = "⏰ Zaman: {{ .Time }}\r\n" "inbound" = "📍 Gelen: {{ .Remark }}\r\n" "port" = "🔌 Port: {{ .Port }}\r\n" diff --git a/web/translation/translate.uk_UA.toml b/web/translation/translate.uk_UA.toml index ba9e9f29..78ab1c53 100644 --- a/web/translation/translate.uk_UA.toml +++ b/web/translation/translate.uk_UA.toml @@ -765,7 +765,7 @@ "traffic" = "🚦 Трафік: {{ .Total }} (↑{{ .Upload }},↓{{ .Download }})\r\n" "xrayStatus" = "ℹ️ Статус: {{ .State }}\r\n" "username" = "👤 Ім'я користувача: {{ .Username }}\r\n" -"password" = "👤 Пароль: {{ .Password }}\r\n" +"reason" = "❗️ Причина: {{ .Reason }}\r\n" "time" = "⏰ Час: {{ .Time }}\r\n" "inbound" = "📍 Inbound: {{ .Remark }}\r\n" "port" = "🔌 Порт: {{ .Port }}\r\n" diff --git a/web/translation/translate.vi_VN.toml b/web/translation/translate.vi_VN.toml index 77a2f236..0889cf50 100644 --- a/web/translation/translate.vi_VN.toml +++ b/web/translation/translate.vi_VN.toml @@ -765,7 +765,7 @@ "traffic" = "🚦 Lưu lượng: {{ .Total }} (↑{{ .Upload }},↓{{ .Download }})\r\n" "xrayStatus" = "ℹ️ Trạng thái Xray: {{ .State }}\r\n" "username" = "👤 Tên người dùng: {{ .Username }}\r\n" -"password" = "👤 Mật khẩu: {{ .Password }}\r\n" +"reason" = "❗️ Lý do: {{ .Reason }}\r\n" "time" = "⏰ Thời gian: {{ .Time }}\r\n" "inbound" = "📍 Inbound: {{ .Remark }}\r\n" "port" = "🔌 Cổng: {{ .Port }}\r\n" diff --git a/web/translation/translate.zh_CN.toml b/web/translation/translate.zh_CN.toml index 9a0c694c..c5e5f543 100644 --- a/web/translation/translate.zh_CN.toml +++ b/web/translation/translate.zh_CN.toml @@ -765,7 +765,7 @@ "traffic" = "🚦 流量:{{ .Total }} (↑{{ .Upload }},↓{{ .Download }})\r\n" "xrayStatus" = "ℹ️ Xray 状态:{{ .State }}\r\n" "username" = "👤 用户名:{{ .Username }}\r\n" -"password" = "👤 密码: {{ .Password }}\r\n" +"reason" = "❗️ 原因:{{ .Reason }}\r\n" "time" = "⏰ 时间:{{ .Time }}\r\n" "inbound" = "📍 入站:{{ .Remark }}\r\n" "port" = "🔌 端口:{{ .Port }}\r\n" diff --git a/web/translation/translate.zh_TW.toml b/web/translation/translate.zh_TW.toml index dc5883c9..5024a6b5 100644 --- a/web/translation/translate.zh_TW.toml +++ b/web/translation/translate.zh_TW.toml @@ -765,7 +765,7 @@ "traffic" = "🚦 流量:{{ .Total }} (↑{{ .Upload }},↓{{ .Download }})\r\n" "xrayStatus" = "ℹ️ Xray 狀態:{{ .State }}\r\n" "username" = "👤 使用者名稱:{{ .Username }}\r\n" -"password" = "👤 密碼: {{ .Password }}\r\n" +"reason" = "❗️ 原因:{{ .Reason }}\r\n" "time" = "⏰ 時間:{{ .Time }}\r\n" "inbound" = "📍 入站:{{ .Remark }}\r\n" "port" = "🔌 埠:{{ .Port }}\r\n"