diff --git a/Telegram/SourceFiles/boxes/auto_download_box.cpp b/Telegram/SourceFiles/boxes/auto_download_box.cpp index d042b9679..f9b70c0f3 100644 --- a/Telegram/SourceFiles/boxes/auto_download_box.cpp +++ b/Telegram/SourceFiles/boxes/auto_download_box.cpp @@ -63,14 +63,14 @@ void AutoDownloadBox::setupContent() { }; const auto values = Ui::CreateChild>(content); - const auto add = [&](Type type, LangKey label) { + const auto add = [&](Type type, rpl::producer label) { if (ranges::find(kHidden, type) != end(kHidden)) { return; } const auto value = settings->bytesLimit(_source, type); AddButton( content, - label, + std::move(label), st::settingsButton )->toggleOn( rpl::single(value > 0) @@ -80,13 +80,13 @@ void AutoDownloadBox::setupContent() { }, content->lifetime()); values->emplace(type, value); }; - add(Type::Photo, lng_media_photo_title); - add(Type::VoiceMessage, lng_media_audio_title); - add(Type::VideoMessage, lng_media_video_messages_title); - add(Type::Video, lng_media_video_title); - add(Type::File, lng_media_file_title); - add(Type::Music, lng_media_music_title); - add(Type::GIF, lng_media_animation_title); + add(Type::Photo, tr::lng_media_photo_title()); + add(Type::VoiceMessage, tr::lng_media_audio_title()); + add(Type::VideoMessage, tr::lng_media_video_messages_title()); + add(Type::Video, tr::lng_media_video_title()); + add(Type::File, tr::lng_media_file_title()); + add(Type::Music, tr::lng_media_music_title()); + add(Type::GIF, tr::lng_media_animation_title()); const auto limits = Ui::CreateChild>(content); using Pair = base::flat_map::value_type; @@ -98,7 +98,7 @@ void AutoDownloadBox::setupContent() { const auto limit = Ui::CreateChild(content, initialLimit); AddButtonWithLabel( content, - lng_media_size_limit, + tr::lng_media_size_limit(), limits->events_starting_with_copy( initialLimit ) | rpl::map([](int value) { diff --git a/Telegram/SourceFiles/boxes/change_phone_box.cpp b/Telegram/SourceFiles/boxes/change_phone_box.cpp index 6b31780e4..edf34d2d5 100644 --- a/Telegram/SourceFiles/boxes/change_phone_box.cpp +++ b/Telegram/SourceFiles/boxes/change_phone_box.cpp @@ -350,9 +350,7 @@ void ChangePhoneBox::prepare() { const auto label = Ui::CreateChild( this, - Lang::Viewer( - lng_change_phone_about - ) | Ui::Text::ToRichLangValue(), + tr::lng_change_phone_about(Ui::Text::RichLangValue), st::changePhoneDescription); label->moveToLeft((st::boxWideWidth - label->width()) / 2, st::changePhoneDescriptionTop); diff --git a/Telegram/SourceFiles/boxes/create_poll_box.cpp b/Telegram/SourceFiles/boxes/create_poll_box.cpp index 74c4b4941..6045602a6 100644 --- a/Telegram/SourceFiles/boxes/create_poll_box.cpp +++ b/Telegram/SourceFiles/boxes/create_poll_box.cpp @@ -597,7 +597,7 @@ not_null CreatePollBox::setupQuestion( not_null container) { using namespace Settings; - AddSubsectionTitle(container, lng_polls_create_question); + AddSubsectionTitle(container, tr::lng_polls_create_question()); const auto question = container->add( object_ptr( container, @@ -645,7 +645,7 @@ object_ptr CreatePollBox::setupContent() { const auto question = setupQuestion(container); AddDivider(container); AddSkip(container); - AddSubsectionTitle(container, lng_polls_create_options); + AddSubsectionTitle(container, tr::lng_polls_create_options()); const auto options = lifetime().make_state( getDelegate()->outerContainer(), container); diff --git a/Telegram/SourceFiles/boxes/edit_privacy_box.cpp b/Telegram/SourceFiles/boxes/edit_privacy_box.cpp index 98fda2c80..8af1f0f4c 100644 --- a/Telegram/SourceFiles/boxes/edit_privacy_box.cpp +++ b/Telegram/SourceFiles/boxes/edit_privacy_box.cpp @@ -311,13 +311,13 @@ void EditPrivacyBox::setupContent() { content, object_ptr