2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 06:26:18 +00:00

Use tr:: instead of Lang::Viewer.

This commit is contained in:
John Preston
2019-06-18 14:16:43 +02:00
parent f35085800a
commit 7af0dd105e
43 changed files with 483 additions and 511 deletions

View File

@@ -218,17 +218,17 @@ void SetupRows(
AddRow(
container,
Lang::Viewer(lng_settings_name_label),
tr::lng_settings_name_label(),
Info::Profile::NameValue(self),
lang(lng_profile_copy_fullname),
tr::lng_profile_copy_fullname(tr::now),
[=] { Ui::show(Box<EditNameBox>(self)); },
st::settingsInfoName);
AddRow(
container,
Lang::Viewer(lng_settings_phone_label),
tr::lng_settings_phone_label(),
Info::Profile::PhoneValue(self),
lang(lng_profile_copy_phone),
tr::lng_profile_copy_phone(tr::now),
[] { Ui::show(Box<ChangePhoneBox>()); },
st::settingsInfoPhone);
@@ -239,14 +239,14 @@ void SetupRows(
return username.text.isEmpty();
});
auto label = rpl::combine(
Lang::Viewer(lng_settings_username_label),
tr::lng_settings_username_label(),
std::move(empty)
) | rpl::map([](const QString &label, bool empty) {
return empty ? "t.me/username" : label;
});
auto value = rpl::combine(
std::move(username),
Lang::Viewer(lng_settings_username_add)
tr::lng_settings_username_add()
) | rpl::map([](const TextWithEntities &username, const QString &add) {
if (!username.text.isEmpty()) {
return username;
@@ -263,7 +263,7 @@ void SetupRows(
container,
std::move(label),
std::move(value),
lang(lng_context_copy_mention),
tr::lng_context_copy_mention(tr::now),
[=] { Ui::show(Box<UsernameBox>()); },
st::settingsInfoUsername);
@@ -392,7 +392,7 @@ BioManager SetupBio(
container->add(
object_ptr<Ui::FlatLabel>(
container,
Lang::Viewer(lng_settings_about_bio),
tr::lng_settings_about_bio(),
st::boxDividerLabel),
st::settingsBioLabelPadding);