fix tg bot + translations

This commit is contained in:
somebodywashere 2023-05-27 18:34:35 +00:00
parent 5d865526d2
commit a624f2640d
2 changed files with 2 additions and 1 deletions

View file

@ -702,7 +702,7 @@ func (t *Tgbot) getClientUsage(chatId int64, tgUserName string, tgUserID string)
if traffic.ExpiryTime == 0 { if traffic.ExpiryTime == 0 {
expiryTime = t.I18nBot("tgbot.unlimited") expiryTime = t.I18nBot("tgbot.unlimited")
} else if (traffic.ExpiryTime/1000 - time.Now().Unix() < 259200) { } else if (traffic.ExpiryTime/1000 - time.Now().Unix() < 259200) {
expiryTime = fmt.Sprintf("%d %s", traffic.ExpiryTime/3600000, t.I18nBot("tgbot.hours")) expiryTime = fmt.Sprintf("%d %s", (traffic.ExpiryTime/1000 - time.Now().Unix())/3600, 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")
} }

View file

@ -384,6 +384,7 @@
"months" = "Месяцев" "months" = "Месяцев"
"day" = "День" "day" = "День"
"days" = "Дней" "days" = "Дней"
"hours" = Часов
"unknown" = "Неизвестно" "unknown" = "Неизвестно"
"inbounds" = "Входящие" "inbounds" = "Входящие"
"clients" = "Клиенты" "clients" = "Клиенты"