diff --git a/web/service/tgbot.go b/web/service/tgbot.go index 1d712452..57aaef72 100644 --- a/web/service/tgbot.go +++ b/web/service/tgbot.go @@ -466,8 +466,15 @@ func (t *Tgbot) getClientUsage(chatId int64, tgUserName string) { total = common.FormatTraffic((traffic.Total)) } + active := "" + if traffic.Enable { + active = t.I18nBot("tgbot.messages.yes") + } else { + active = t.I18nBot("tgbot.messages.no") + } + output := "" - output += t.I18nBot("tgbot.messages.active", "Enable=="+strconv.FormatBool(traffic.Enable)) + output += t.I18nBot("tgbot.messages.active", "Enable=="+active) output += t.I18nBot("tgbot.messages.email", "Email=="+traffic.Email) output += t.I18nBot("tgbot.messages.upload", "Upload=="+common.FormatTraffic(traffic.Up)) output += t.I18nBot("tgbot.messages.download", "Download=="+common.FormatTraffic(traffic.Down)) @@ -509,8 +516,15 @@ func (t *Tgbot) searchClient(chatId int64, email string) { total = common.FormatTraffic((traffic.Total)) } + active := "" + if traffic.Enable { + active = t.I18nBot("tgbot.messages.yes") + } else { + active = t.I18nBot("tgbot.messages.no") + } + output := "" - output += t.I18nBot("tgbot.messages.active", "Enable=="+strconv.FormatBool(traffic.Enable)) + output += t.I18nBot("tgbot.messages.active", "Enable=="+active) output += t.I18nBot("tgbot.messages.email", "Email=="+traffic.Email) output += t.I18nBot("tgbot.messages.upload", "Upload=="+common.FormatTraffic(traffic.Up)) output += t.I18nBot("tgbot.messages.download", "Download=="+common.FormatTraffic(traffic.Down)) @@ -565,8 +579,15 @@ func (t *Tgbot) searchInbound(chatId int64, remark string) { total = common.FormatTraffic((traffic.Total)) } + active := "" + if traffic.Enable { + active = t.I18nBot("tgbot.messages.yes") + } else { + active = t.I18nBot("tgbot.messages.no") + } + output := "" - output += t.I18nBot("tgbot.messages.active", "Enable=="+strconv.FormatBool(traffic.Enable)) + output += t.I18nBot("tgbot.messages.active", "Enable=="+active) output += t.I18nBot("tgbot.messages.email", "Email=="+traffic.Email) output += t.I18nBot("tgbot.messages.upload", "Upload=="+common.FormatTraffic(traffic.Up)) output += t.I18nBot("tgbot.messages.download", "Download=="+common.FormatTraffic(traffic.Down)) @@ -608,8 +629,15 @@ func (t *Tgbot) searchForClient(chatId int64, query string) { total = common.FormatTraffic((traffic.Total)) } + active := "" + if traffic.Enable { + active = t.I18nBot("tgbot.messages.yes") + } else { + active = t.I18nBot("tgbot.messages.no") + } + output := "" - output += t.I18nBot("tgbot.messages.active", "Enable=="+strconv.FormatBool(traffic.Enable)) + output += t.I18nBot("tgbot.messages.active", "Enable=="+active) output += t.I18nBot("tgbot.messages.email", "Email=="+traffic.Email) output += t.I18nBot("tgbot.messages.upload", "Upload=="+common.FormatTraffic(traffic.Up)) output += t.I18nBot("tgbot.messages.download", "Download=="+common.FormatTraffic(traffic.Down)) @@ -713,7 +741,14 @@ func (t *Tgbot) getExhausted() string { total = common.FormatTraffic((traffic.Total)) } - output += t.I18nBot("tgbot.messages.active", "Enable=="+strconv.FormatBool(traffic.Enable)) + active := "" + if traffic.Enable { + active = t.I18nBot("tgbot.messages.yes") + } else { + active = t.I18nBot("tgbot.messages.no") + } + + output += t.I18nBot("tgbot.messages.active", "Enable=="+active) output += t.I18nBot("tgbot.messages.email", "Email=="+traffic.Email) output += t.I18nBot("tgbot.messages.upload", "Upload=="+common.FormatTraffic(traffic.Up)) output += t.I18nBot("tgbot.messages.download", "Download=="+common.FormatTraffic(traffic.Down)) diff --git a/web/translation/translate.en_US.toml b/web/translation/translate.en_US.toml index 1e14ead6..b4f90d2e 100644 --- a/web/translation/translate.en_US.toml +++ b/web/translation/translate.en_US.toml @@ -405,6 +405,8 @@ "disabled" = "🛑 Disabled: {{ .Disabled }}\r\n" "depleteSoon" = "🔜 Deplete soon: {{ .Deplete }}\r\n \r\n" "backupTime" = "🗄 Backup Time: {{ .Time }}\r\n" +"yes" = "✅ Yes" +"no" = "❌ No" [tgbot.buttons] "dbBackup" = "Get DB Backup" diff --git a/web/translation/translate.fa_IR.toml b/web/translation/translate.fa_IR.toml index fb99e73b..aa701fc2 100644 --- a/web/translation/translate.fa_IR.toml +++ b/web/translation/translate.fa_IR.toml @@ -404,6 +404,8 @@ "disabled" = "🛑 غیرفعال: {{ .Disabled }}\r\n" "depleteSoon" = "🔜 به زودی به پایان خواهد رسید: {{ .Deplete }}\r\n \r\n" "backupTime" = "🗄 زمان پشتیبان‌گیری: {{ .Time }}\r\n" +"yes" = "✅ بله" +"no" = "❌ خیر" [tgbot.buttons] "dbBackup" = "دریافت پشتیبان پایگاه داده" diff --git a/web/translation/translate.ru_RU.toml b/web/translation/translate.ru_RU.toml index bf4e7a1a..6ab329e8 100644 --- a/web/translation/translate.ru_RU.toml +++ b/web/translation/translate.ru_RU.toml @@ -405,6 +405,8 @@ "disabled" = "🛑 Отключено: {{ .Disabled }}\r\n" "depleteSoon" = "🔜 Скоро отключатся: {{ .Deplete }}\r\n \r\n" "backupTime" = "🗄 Время резервного копирования: {{ .Time }}\r\n" +"yes" = "✅ Да" +"no" = "❌ Нет" [tgbot.buttons] "dbBackup" = "Получить резервную копию базы данных" diff --git a/web/translation/translate.zh_Hans.toml b/web/translation/translate.zh_Hans.toml index da0a6bd2..1978faf8 100644 --- a/web/translation/translate.zh_Hans.toml +++ b/web/translation/translate.zh_Hans.toml @@ -405,6 +405,8 @@ "disabled" = "🛑 禁用:{{ .Disabled }}\r\n" "depleteSoon" = "🔜 即将耗尽:{{ .Deplete }}\r\n \r\n" "backupTime" = "🗄 备份时间:{{ .Time }}\r\n" +"yes" = "✅ 是" +"no" = "❌ 不" [tgbot.buttons] "dbBackup" = "获取数据库备份"