From 84a8fd7091657d05a20bc1c71410da3c8fb233ac Mon Sep 17 00:00:00 2001 From: somebodywashere <68244480+somebodywashere@users.noreply.github.com> Date: Tue, 30 May 2023 09:34:54 +0000 Subject: [PATCH] [tgbot] - some fixes and improvments --- web/service/tgbot.go | 5 ----- web/translation/translate.en_US.toml | 8 ++++---- web/translation/translate.fa_IR.toml | 8 ++++---- web/translation/translate.ru_RU.toml | 8 ++++---- web/translation/translate.zh_Hans.toml | 8 ++++---- 5 files changed, 16 insertions(+), 21 deletions(-) diff --git a/web/service/tgbot.go b/web/service/tgbot.go index 047df27e..e0261775 100644 --- a/web/service/tgbot.go +++ b/web/service/tgbot.go @@ -737,7 +737,6 @@ func (t *Tgbot) getClientUsage(chatId int64, tgUserName string, tgUserID string) output += t.I18nBot("tgbot.messages.upload", "Upload=="+common.FormatTraffic(traffic.Up)) output += t.I18nBot("tgbot.messages.download", "Download=="+common.FormatTraffic(traffic.Down)) output += t.I18nBot("tgbot.messages.total", "UpDown=="+common.FormatTraffic((traffic.Up+traffic.Down)), "Total=="+total) - output += "" output += t.I18nBot("tgbot.messages.refreshedOn", "Time=="+time.Now().Format("2006-01-02 15:04:05")) t.SendMsgToTgbot(chatId, output) @@ -875,7 +874,6 @@ func (t *Tgbot) searchClient(chatId int64, email string, messageID ...int) { output += t.I18nBot("tgbot.messages.upload", "Upload=="+common.FormatTraffic(traffic.Up)) output += t.I18nBot("tgbot.messages.download", "Download=="+common.FormatTraffic(traffic.Down)) output += t.I18nBot("tgbot.messages.total", "UpDown=="+common.FormatTraffic((traffic.Up+traffic.Down)), "Total=="+total) - output += "" output += t.I18nBot("tgbot.messages.refreshedOn", "Time=="+time.Now().Format("2006-01-02 15:04:05")) inlineKeyboard := tu.InlineKeyboard( @@ -974,7 +972,6 @@ func (t *Tgbot) searchInbound(chatId int64, remark string) { output += t.I18nBot("tgbot.messages.upload", "Upload=="+common.FormatTraffic(traffic.Up)) output += t.I18nBot("tgbot.messages.download", "Download=="+common.FormatTraffic(traffic.Down)) output += t.I18nBot("tgbot.messages.total", "UpDown=="+common.FormatTraffic((traffic.Up+traffic.Down)), "Total=="+total) - output += "" output += t.I18nBot("tgbot.messages.refreshedOn", "Time=="+time.Now().Format("2006-01-02 15:04:05")) t.SendMsgToTgbot(chatId, output) @@ -1035,7 +1032,6 @@ func (t *Tgbot) searchForClient(chatId int64, query string) { output += t.I18nBot("tgbot.messages.upload", "Upload=="+common.FormatTraffic(traffic.Up)) output += t.I18nBot("tgbot.messages.download", "Download=="+common.FormatTraffic(traffic.Down)) output += t.I18nBot("tgbot.messages.total", "UpDown=="+common.FormatTraffic((traffic.Up+traffic.Down)), "Total=="+total) - output += "" output += t.I18nBot("tgbot.messages.refreshedOn", "Time=="+time.Now().Format("2006-01-02 15:04:05")) t.SendMsgToTgbot(chatId, output) @@ -1156,7 +1152,6 @@ func (t *Tgbot) getExhausted() string { output += t.I18nBot("tgbot.messages.upload", "Upload=="+common.FormatTraffic(traffic.Up)) output += t.I18nBot("tgbot.messages.download", "Download=="+common.FormatTraffic(traffic.Down)) output += t.I18nBot("tgbot.messages.total", "UpDown=="+common.FormatTraffic((traffic.Up+traffic.Down)), "Total=="+total) - output += "" output += t.I18nBot("tgbot.messages.refreshedOn", "Time=="+time.Now().Format("2006-01-02 15:04:05")) output += "\r\n \r\n" } diff --git a/web/translation/translate.en_US.toml b/web/translation/translate.en_US.toml index 901533b6..a15bf44c 100644 --- a/web/translation/translate.en_US.toml +++ b/web/translation/translate.en_US.toml @@ -425,21 +425,21 @@ "time" = "⏰ Time: {{ .Time }}\r\n" "inbound" = "📍 Inbound: {{ .Remark }}\r\n" "port" = "🔌 Port: {{ .Port }}\r\n" -"expire" = "📅 Expire Date: {{ .Time }}\r\n \r\n" -"expireIn" = "📅 Expire In: {{ .Time }}\r\n \r\n" +"expire" = "📅 Expire Date: {{ .Time }}\r\n" +"expireIn" = "📅 Expire In: {{ .Time }}\r\n" "active" = "💡 Active: ✅ Yes\r\n" "inactive" = "💡 Active: ❌ No\r\n" "email" = "📧 Email: {{ .Email }}\r\n" "upload" = "🔼 Upload: ↑{{ .Upload }}\r\n" "download" = "🔽 Download: ↓{{ .Download }}\r\n" -"total" = "🔄 Total: ↑↓{{ .UpDown }} / {{ .Total }}\r\n" +"total" = "📊 Total: ↑↓{{ .UpDown }} / {{ .Total }}\r\n" "TGUser" = "👤 Telegram User: {{ .TelegramID }}\r\n" "exhaustedMsg" = "🚨 Exhausted {{ .Type }}:\r\n" "exhaustedCount" = "🚨 Exhausted {{ .Type }} count:\r\n" "disabled" = "🛑 Disabled: {{ .Disabled }}\r\n" "depleteSoon" = "🔜 Deplete soon: {{ .Deplete }}\r\n \r\n" "backupTime" = "🗄 Backup Time: {{ .Time }}\r\n" -"refreshedOn" = "🔄🕒 Refreshed On: {{ .Time }}\r\n" +"refreshedOn" = "\r\n📋🔄 Refreshed On: {{ .Time }}\r\n \r\n" [tgbot.buttons] "closeKeyboard" = "❌ Close Keyboard" diff --git a/web/translation/translate.fa_IR.toml b/web/translation/translate.fa_IR.toml index 5d0f146d..abaa989b 100644 --- a/web/translation/translate.fa_IR.toml +++ b/web/translation/translate.fa_IR.toml @@ -425,21 +425,21 @@ "time" = "⏰ زمان: {{ .Time }}\r\n" "inbound" = "📍 ورودی: {{ .Remark }}\r\n" "port" = "🔌 پورت: {{ .Port }}\r\n" -"expire" = "📅 تاریخ انقضا: {{ .Time }}\r\n \r\n" -"expireIn" = "📅 باقیمانده از انقضا: {{ .Time }}\r\n \r\n" +"expire" = "📅 تاریخ انقضا: {{ .Time }}\r\n" +"expireIn" = "📅 باقیمانده از انقضا: {{ .Time }}\r\n" "active" = "💡 فعال: ✅\r\n" "inactive" = "💡 فعال: ❌\r\n" "email" = "📧 ایمیل: {{ .Email }}\r\n" "upload" = "🔼 آپلود↑: {{ .Upload }}\r\n" "download" = "🔽 دانلود↓: {{ .Download }}\r\n" -"total" = "🔄 کل: {{ .UpDown }} / {{ .Total }}\r\n" +"total" = "📊 کل: {{ .UpDown }} / {{ .Total }}\r\n" "TGUser" = "👤 کاربر تلگرام: {{ .TelegramID }}\r\n" "exhaustedMsg" = "🚨 {{ .Type }} به اتمام رسیده است:\r\n" "exhaustedCount" = "🚨 تعداد {{ .Type }} به اتمام رسیده:\r\n" "disabled" = "🛑 غیرفعال: {{ .Disabled }}\r\n" "depleteSoon" = "🔜 به زودی به پایان خواهد رسید: {{ .Deplete }}\r\n \r\n" "backupTime" = "🗄 زمان پشتیبان‌گیری: {{ .Time }}\r\n" -"refreshedOn" = "🔄🕒 تازه‌سازی شده در: {{ .Time }}\r\n" +"refreshedOn" = "\r\n📋🔄 تازه‌سازی شده در: {{ .Time }}\r\n \r\n" [tgbot.buttons] "closeKeyboard" = "❌ بستن کیبورد" diff --git a/web/translation/translate.ru_RU.toml b/web/translation/translate.ru_RU.toml index 29b27f46..3f0a18e6 100644 --- a/web/translation/translate.ru_RU.toml +++ b/web/translation/translate.ru_RU.toml @@ -425,21 +425,21 @@ "time" = "⏰ Время: {{ .Time }}\r\n" "inbound" = "📍 Входящий поток: {{ .Remark }}\r\n" "port" = "🔌 Порт: {{ .Port }}\r\n" -"expire" = "📅 Дата окончания: {{ .Time }}\r\n \r\n" -"expireIn" = "📅 Окончание через: {{ .Time }}\r\n \r\n" +"expire" = "📅 Дата окончания: {{ .Time }}\r\n" +"expireIn" = "📅 Окончание через: {{ .Time }}\r\n" "active" = "💡 Активен: ✅ Да\r\n" "inactive" = "💡 Активен: ❌ Нет\r\n" "email" = "📧 Email: {{ .Email }}\r\n" "upload" = "🔼 Исходящий трафик: ↑{{ .Upload }}\r\n" "download" = "🔽 Входящий трафик: ↓{{ .Download }}\r\n" -"total" = "🔄 Всего: ↑↓{{ .UpDown }} из {{ .Total }}\r\n" +"total" = "📊 Всего: ↑↓{{ .UpDown }} из {{ .Total }}\r\n" "TGUser" = "👤 Пользователь Telegram: {{ .TelegramID }}\r\n" "exhaustedMsg" = "🚨 Исчерпаны {{ .Type }}:\r\n" "exhaustedCount" = "🚨 Количество исчерпанных {{ .Type }}:\r\n" "disabled" = "🛑 Отключено: {{ .Disabled }}\r\n" "depleteSoon" = "🔜 Скоро исчерпание: {{ .Deplete }}\r\n \r\n" "backupTime" = "🗄 Время резервного копирования: {{ .Time }}\r\n" -"refreshedOn" = "🔄🕒 Обновлено: {{ .Time }}\r\n" +"refreshedOn" = "\r\n📋🔄 Обновлено: {{ .Time }}\r\n \r\n" [tgbot.buttons] "closeKeyboard" = "❌ Закрыть клавиатуру" diff --git a/web/translation/translate.zh_Hans.toml b/web/translation/translate.zh_Hans.toml index d429c409..60f42abc 100644 --- a/web/translation/translate.zh_Hans.toml +++ b/web/translation/translate.zh_Hans.toml @@ -425,21 +425,21 @@ "time" = "⏰ 时间:{{ .Time }}\r\n" "inbound" = "📍 入站:{{ .Remark }}\r\n" "port" = "🔌 端口:{{ .Port }}\r\n" -"expire" = "📅 过期日期:{{ .Time }}\r\n \r\n" -"expireIn" = "📅 剩余时间:{{ .Time }}\r\n \r\n" +"expire" = "📅 过期日期:{{ .Time }}\r\n" +"expireIn" = "📅 剩余时间:{{ .Time }}\r\n" "active" = "💡 激活:✅\r\n" "inactive" = "💡 激活: ❌\r\n" "email" = "📧 邮箱:{{ .Email }}\r\n" "upload" = "🔼 上传↑:{{ .Upload }}\r\n" "download" = "🔽 下载↓:{{ .Download }}\r\n" -"total" = "🔄 总计:{{ .UpDown }} / {{ .Total }}\r\n" +"total" = "📊 总计:{{ .UpDown }} / {{ .Total }}\r\n" "TGUser" = "👤 电报用户:{{ .TelegramID }}\r\n" "exhaustedMsg" = "🚨 耗尽的{{ .Type }}:\r\n" "exhaustedCount" = "🚨 耗尽的{{ .Type }}数量:\r\n" "disabled" = "🛑 禁用:{{ .Disabled }}\r\n" "depleteSoon" = "🔜 即将耗尽:{{ .Deplete }}\r\n \r\n" "backupTime" = "🗄 备份时间:{{ .Time }}\r\n" -"refreshedOn" = "🔄🕒 刷新时间:{{ .Time }}\r\n" +"refreshedOn" = "\r\n📋🔄 刷新时间:{{ .Time }}\r\n \r\n" [tgbot.buttons] "closeKeyboard" = "❌ 关闭键盘"