Fix boost group phrases.

This commit is contained in:
John Preston 2025-02-05 18:10:13 +04:00
parent 1bf50d60d8
commit 23542a1db1
2 changed files with 11 additions and 4 deletions

View file

@ -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";

View file

@ -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));
});