mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-08-30 22:16:14 +00:00
Use tr:: instead of lang().
This commit is contained in:
@@ -44,13 +44,13 @@ int OnlinePhraseChangeInSeconds(TimeId online, TimeId now) {
|
||||
|
||||
std::optional<QString> OnlineTextSpecial(not_null<UserData*> user) {
|
||||
if (user->isNotificationsUser()) {
|
||||
return lang(lng_status_service_notifications);
|
||||
return tr::lng_status_service_notifications(tr::now);
|
||||
} else if (user->isSupport()) {
|
||||
return lang(lng_status_support);
|
||||
return tr::lng_status_support(tr::now);
|
||||
} else if (user->isBot()) {
|
||||
return lang(lng_status_bot);
|
||||
return tr::lng_status_bot(tr::now);
|
||||
} else if (user->isServiceUser()) {
|
||||
return lang(lng_status_support);
|
||||
return tr::lng_status_support(tr::now);
|
||||
}
|
||||
return std::nullopt;
|
||||
}
|
||||
@@ -59,16 +59,16 @@ std::optional<QString> OnlineTextCommon(TimeId online, TimeId now) {
|
||||
if (online <= 0) {
|
||||
switch (online) {
|
||||
case 0:
|
||||
case -1: return lang(lng_status_offline);
|
||||
case -2: return lang(lng_status_recently);
|
||||
case -3: return lang(lng_status_last_week);
|
||||
case -4: return lang(lng_status_last_month);
|
||||
case -1: return tr::lng_status_offline(tr::now);
|
||||
case -2: return tr::lng_status_recently(tr::now);
|
||||
case -3: return tr::lng_status_last_week(tr::now);
|
||||
case -4: return tr::lng_status_last_month(tr::now);
|
||||
}
|
||||
return (-online > now)
|
||||
? lang(lng_status_online)
|
||||
: lang(lng_status_recently);
|
||||
? tr::lng_status_online(tr::now)
|
||||
: tr::lng_status_recently(tr::now);
|
||||
} else if (online > now) {
|
||||
return lang(lng_status_online);
|
||||
return tr::lng_status_online(tr::now);
|
||||
}
|
||||
return std::nullopt;
|
||||
}
|
||||
@@ -297,7 +297,7 @@ QString OnlineText(TimeId online, TimeId now) {
|
||||
}
|
||||
const auto minutes = (now - online) / 60;
|
||||
if (!minutes) {
|
||||
return lang(lng_status_lastseen_now);
|
||||
return tr::lng_status_lastseen_now(tr::now);
|
||||
} else if (minutes < 60) {
|
||||
return lng_status_lastseen_minutes(lt_count, minutes);
|
||||
}
|
||||
|
Reference in New Issue
Block a user