mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2025-08-30 06:46:17 +00:00
fix tg bot expiryTime + additions to translations
This commit is contained in:
parent
2c233dffa5
commit
a547530aa2
5 changed files with 8 additions and 5 deletions
|
@ -701,8 +701,8 @@ func (t *Tgbot) getClientUsage(chatId int64, tgUserName string, tgUserID string)
|
||||||
expiryTime := ""
|
expiryTime := ""
|
||||||
if traffic.ExpiryTime == 0 {
|
if traffic.ExpiryTime == 0 {
|
||||||
expiryTime = t.I18nBot("tgbot.unlimited")
|
expiryTime = t.I18nBot("tgbot.unlimited")
|
||||||
} else if traffic.ExpiryTime < 0 {
|
} else if (traffic.ExpiryTime/1000 - time.Now().Unix() < 259200) {
|
||||||
expiryTime = fmt.Sprintf("%d %s", traffic.ExpiryTime/-86400000, t.I18nBot("tgbot.days"))
|
expiryTime = fmt.Sprintf("%d %s", traffic.ExpiryTime/3600000, t.I18nBot("tgbot.hours"))
|
||||||
} else {
|
} else {
|
||||||
expiryTime = time.Unix((traffic.ExpiryTime / 1000), 0).Format("2006-01-02 15:04:05")
|
expiryTime = time.Unix((traffic.ExpiryTime / 1000), 0).Format("2006-01-02 15:04:05")
|
||||||
}
|
}
|
||||||
|
|
|
@ -384,6 +384,7 @@
|
||||||
"months" = "Months"
|
"months" = "Months"
|
||||||
"day" = "Day"
|
"day" = "Day"
|
||||||
"days" = "Days"
|
"days" = "Days"
|
||||||
|
"hours" = "Hours"
|
||||||
"unknown" = "Unknown"
|
"unknown" = "Unknown"
|
||||||
"inbounds" = "Inbounds"
|
"inbounds" = "Inbounds"
|
||||||
"clients" = "Clients"
|
"clients" = "Clients"
|
||||||
|
|
|
@ -384,6 +384,7 @@
|
||||||
"months" = "ماهها"
|
"months" = "ماهها"
|
||||||
"day" = "روز"
|
"day" = "روز"
|
||||||
"days" = "روزها"
|
"days" = "روزها"
|
||||||
|
"hours" = "ساعت ها"
|
||||||
"unknown" = "نامشخص"
|
"unknown" = "نامشخص"
|
||||||
"inbounds" = "ورودیها"
|
"inbounds" = "ورودیها"
|
||||||
"clients" = "کلاینتها"
|
"clients" = "کلاینتها"
|
||||||
|
|
|
@ -428,8 +428,8 @@
|
||||||
"expireIn" = "📅 Окончание через: {{ .Time }}\r\n \r\n"
|
"expireIn" = "📅 Окончание через: {{ .Time }}\r\n \r\n"
|
||||||
"active" = "💡 Активен: {{ .Enable }}\r\n"
|
"active" = "💡 Активен: {{ .Enable }}\r\n"
|
||||||
"email" = "📧 Email: {{ .Email }}\r\n"
|
"email" = "📧 Email: {{ .Email }}\r\n"
|
||||||
"upload" = "🔼 Загрузка↑: {{ .Upload }}\r\n"
|
"upload" = "🔼 Исходящий трафик: {{ .Upload }}\r\n"
|
||||||
"download" = "🔽 Скачивание↓: {{ .Download }}\r\n"
|
"download" = "🔽 Входящий трафик: {{ .Download }}\r\n"
|
||||||
"total" = "🔄 Всего: {{ .UpDown }} / {{ .Total }}\r\n"
|
"total" = "🔄 Всего: {{ .UpDown }} / {{ .Total }}\r\n"
|
||||||
"TGUser" = "👤 Пользователь Telegram: {{ .TelegramID }}\r\n"
|
"TGUser" = "👤 Пользователь Telegram: {{ .TelegramID }}\r\n"
|
||||||
"exhaustedMsg" = "🚨 Исчерпаны {{ .Type }}:\r\n"
|
"exhaustedMsg" = "🚨 Исчерпаны {{ .Type }}:\r\n"
|
||||||
|
@ -437,7 +437,7 @@
|
||||||
"disabled" = "🛑 Отключено: {{ .Disabled }}\r\n"
|
"disabled" = "🛑 Отключено: {{ .Disabled }}\r\n"
|
||||||
"depleteSoon" = "🔜 Скоро исчерпание: {{ .Deplete }}\r\n \r\n"
|
"depleteSoon" = "🔜 Скоро исчерпание: {{ .Deplete }}\r\n \r\n"
|
||||||
"backupTime" = "🗄 Время резервного копирования: {{ .Time }}\r\n"
|
"backupTime" = "🗄 Время резервного копирования: {{ .Time }}\r\n"
|
||||||
"refreshedOn" = "🔄🕒 Обновлено: {{ .Time }}\r\n"
|
"refreshedOn" = "🔄🕒 Данные обновлены: {{ .Time }}\r\n"
|
||||||
|
|
||||||
[tgbot.buttons]
|
[tgbot.buttons]
|
||||||
"closeKeyboard" = "❌ Закрыть клавиатуру"
|
"closeKeyboard" = "❌ Закрыть клавиатуру"
|
||||||
|
|
|
@ -384,6 +384,7 @@
|
||||||
"months" = "月"
|
"months" = "月"
|
||||||
"day" = "天"
|
"day" = "天"
|
||||||
"days" = "天"
|
"days" = "天"
|
||||||
|
"hours" = "小时"
|
||||||
"unknown" = "未知"
|
"unknown" = "未知"
|
||||||
"inbounds" = "入站连接"
|
"inbounds" = "入站连接"
|
||||||
"clients" = "客户端"
|
"clients" = "客户端"
|
||||||
|
|
Loading…
Reference in a new issue