mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-08-31 06:35:14 +00:00
Use tr:: instead of lang().
This commit is contained in:
@@ -672,7 +672,7 @@ void Application::startLocalStorage() {
|
||||
void Application::forceLogOut(const TextWithEntities &explanation) {
|
||||
const auto box = Ui::show(Box<InformBox>(
|
||||
explanation,
|
||||
lang(lng_passcode_logout)));
|
||||
tr::lng_passcode_logout(tr::now)));
|
||||
box->setCloseByEscape(false);
|
||||
box->setCloseByOutsideClick(false);
|
||||
connect(box, &QObject::destroyed, [=] {
|
||||
|
@@ -126,7 +126,7 @@ void Changelogs::addLocalLogs() {
|
||||
lt_version,
|
||||
QString::fromLatin1(AppVersionStr),
|
||||
lt_changes,
|
||||
lang(lng_new_version_minor),
|
||||
tr::lng_new_version_minor(tr::now),
|
||||
lt_link,
|
||||
qsl("https://desktop.telegram.org/changelog"));
|
||||
addLocalLog(text.trimmed());
|
||||
|
@@ -100,7 +100,9 @@ UrlClickHandler::UrlClickHandler(const QString &url, bool fullDisplayed)
|
||||
}
|
||||
|
||||
QString UrlClickHandler::copyToClipboardContextItemText() const {
|
||||
return lang(isEmail() ? lng_context_copy_email : lng_context_copy_link);
|
||||
return isEmail()
|
||||
? tr::lng_context_copy_email(tr::now)
|
||||
: tr::lng_context_copy_link(tr::now);
|
||||
}
|
||||
|
||||
QString UrlClickHandler::url() const {
|
||||
@@ -161,8 +163,8 @@ void HiddenUrlClickHandler::Open(QString url, QVariant context) {
|
||||
: url;
|
||||
Ui::show(
|
||||
Box<ConfirmBox>(
|
||||
lang(lng_open_this_link) + qsl("\n\n") + displayUrl,
|
||||
lang(lng_open_link),
|
||||
tr::lng_open_this_link(tr::now) + qsl("\n\n") + displayUrl,
|
||||
tr::lng_open_link(tr::now),
|
||||
[=] { Ui::hideLayer(); open(); }),
|
||||
LayerOption::KeepOther);
|
||||
} else {
|
||||
@@ -192,7 +194,7 @@ void BotGameUrlClickHandler::onClick(ClickContext context) const {
|
||||
};
|
||||
Ui::show(Box<ConfirmBox>(
|
||||
lng_allow_bot_pass(lt_bot_name, _bot->name),
|
||||
lang(lng_allow_bot),
|
||||
tr::lng_allow_bot(tr::now),
|
||||
callback));
|
||||
}
|
||||
}
|
||||
@@ -202,7 +204,7 @@ auto HiddenUrlClickHandler::getTextEntity() const -> TextEntity {
|
||||
}
|
||||
|
||||
QString MentionClickHandler::copyToClipboardContextItemText() const {
|
||||
return lang(lng_context_copy_mention);
|
||||
return tr::lng_context_copy_mention(tr::now);
|
||||
}
|
||||
|
||||
void MentionClickHandler::onClick(ClickContext context) const {
|
||||
@@ -241,7 +243,7 @@ QString MentionNameClickHandler::tooltip() const {
|
||||
}
|
||||
|
||||
QString HashtagClickHandler::copyToClipboardContextItemText() const {
|
||||
return lang(lng_context_copy_hashtag);
|
||||
return tr::lng_context_copy_hashtag(tr::now);
|
||||
}
|
||||
|
||||
void HashtagClickHandler::onClick(ClickContext context) const {
|
||||
@@ -256,7 +258,7 @@ auto HashtagClickHandler::getTextEntity() const -> TextEntity {
|
||||
}
|
||||
|
||||
QString CashtagClickHandler::copyToClipboardContextItemText() const {
|
||||
return lang(lng_context_copy_hashtag);
|
||||
return tr::lng_context_copy_hashtag(tr::now);
|
||||
}
|
||||
|
||||
void CashtagClickHandler::onClick(ClickContext context) const {
|
||||
|
@@ -56,7 +56,7 @@ bool JoinGroupByHash(const Match &match, const QVariant &context) {
|
||||
return;
|
||||
}
|
||||
Core::App().hideMediaView();
|
||||
Ui::show(Box<InformBox>(lang(lng_group_invite_bad_link)));
|
||||
Ui::show(Box<InformBox>(tr::lng_group_invite_bad_link(tr::now)));
|
||||
});
|
||||
return true;
|
||||
}
|
||||
@@ -246,7 +246,7 @@ bool ResolvePrivatePost(const Match &match, const QVariant &context) {
|
||||
msgId);
|
||||
};
|
||||
const auto fail = [=] {
|
||||
Ui::show(Box<InformBox>(lang(lng_error_post_link_invalid)));
|
||||
Ui::show(Box<InformBox>(tr::lng_error_post_link_invalid(tr::now)));
|
||||
};
|
||||
const auto auth = &Auth();
|
||||
if (const auto channel = auth->data().channelLoaded(channelId)) {
|
||||
@@ -292,7 +292,7 @@ bool HandleUnknown(const Match &match, const QVariant &context) {
|
||||
};
|
||||
*box = Ui::show(Box<ConfirmBox>(
|
||||
text,
|
||||
lang(lng_menu_update),
|
||||
tr::lng_menu_update(tr::now),
|
||||
callback));
|
||||
} else {
|
||||
Ui::show(Box<InformBox>(text));
|
||||
|
Reference in New Issue
Block a user