From 23542a1db1bb4d793474fcd5b056ac77a8c865a5 Mon Sep 17 00:00:00 2001 From: John Preston Date: Wed, 5 Feb 2025 18:10:13 +0400 Subject: [PATCH] Fix boost group phrases. --- Telegram/Resources/langs/lang.strings | 8 +++++--- Telegram/SourceFiles/ui/boxes/boost_box.cpp | 7 ++++++- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/Telegram/Resources/langs/lang.strings b/Telegram/Resources/langs/lang.strings index 6163c0426..0a3820fea 100644 --- a/Telegram/Resources/langs/lang.strings +++ b/Telegram/Resources/langs/lang.strings @@ -3000,9 +3000,11 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL "lng_boost_channel_ask" = "Ask your **Premium** subscribers to boost your channel with this link:"; "lng_boost_channel_ask_button" = "Copy Link"; -"lng_boost_channel_or" = "or"; -"lng_boost_channel_gifting" = "Boost your channel by gifting your subscribers Telegram Premium. {link}"; -"lng_boost_channel_gifting_link" = "Get boosts >"; +//"lng_boost_channel_or" = "or"; +//"lng_boost_channel_gifting" = "Boost your channel by gifting your subscribers Telegram Premium. {link}"; +//"lng_boost_channel_gifting_link" = "Get boosts >"; +"lng_boost_group_ask" = "Ask your **Premium** members to boost your group with this link:"; +//"lng_boost_group_gifting" = "Boost your group by gifting your members Telegram Premium. {link}"; "lng_feature_stories#one" = "**{count}** Story Per Day"; "lng_feature_stories#other" = "**{count}** Stories Per Day"; diff --git a/Telegram/SourceFiles/ui/boxes/boost_box.cpp b/Telegram/SourceFiles/ui/boxes/boost_box.cpp index 4260eb05f..c70860189 100644 --- a/Telegram/SourceFiles/ui/boxes/boost_box.cpp +++ b/Telegram/SourceFiles/ui/boxes/boost_box.cpp @@ -689,6 +689,7 @@ void AskBoostBox( }, [](AskBoostWearCollectible) { return tr::lng_boost_channel_title_wear(); }); + auto isGroup = false; auto reasonText = v::match(data.reason.data, [&]( AskBoostChannelColor data) { return tr::lng_boost_channel_needs_level_color( @@ -696,6 +697,7 @@ void AskBoostBox( rpl::single(float64(data.requiredLevel)), Ui::Text::RichLangValue); }, [&](AskBoostWallpaper data) { + isGroup = data.group; return (data.group ? tr::lng_boost_group_needs_level_wallpaper : tr::lng_boost_channel_needs_level_wallpaper)( @@ -703,6 +705,7 @@ void AskBoostBox( rpl::single(float64(data.requiredLevel)), Ui::Text::RichLangValue); }, [&](AskBoostEmojiStatus data) { + isGroup = data.group; return (data.group ? tr::lng_boost_group_needs_level_status : tr::lng_boost_channel_needs_level_status)( @@ -710,6 +713,7 @@ void AskBoostBox( rpl::single(float64(data.requiredLevel)), Ui::Text::RichLangValue); }, [&](AskBoostEmojiPack data) { + isGroup = true; return tr::lng_boost_group_needs_level_emoji( lt_count, rpl::single(float64(data.requiredLevel)), @@ -734,7 +738,8 @@ void AskBoostBox( }); auto text = rpl::combine( std::move(reasonText), - tr::lng_boost_channel_ask(Ui::Text::RichLangValue) + (isGroup ? tr::lng_boost_group_ask : tr::lng_boost_channel_ask)( + Ui::Text::RichLangValue) ) | rpl::map([](TextWithEntities &&text, TextWithEntities &&ask) { return text.append(u"\n\n"_q).append(std::move(ask)); });