2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 14:38:15 +00:00

Add translation bar dropdown menu.

This commit is contained in:
John Preston
2023-01-30 14:10:42 +04:00
parent 1689c1a597
commit f5be551ff8
27 changed files with 700 additions and 384 deletions

View File

@@ -221,6 +221,7 @@ using Order = std::vector<QString>;
u"advanced_chat_management"_q,
u"profile_badge"_q,
u"animated_userpics"_q,
u"translations"_q,
};
}
@@ -333,6 +334,15 @@ using Order = std::vector<QString>;
PremiumPreview::AnimatedUserpics,
},
},
{
u"translations"_q,
Entry{
&st::settingsPremiumIconTranslations,
tr::lng_premium_summary_subtitle_translation(),
tr::lng_premium_summary_about_translation(),
PremiumPreview::RealTimeTranslation,
},
},
};
}
@@ -1887,6 +1897,8 @@ not_null<Ui::GradientButton*> CreateSubscribeButton(
return PremiumPreview::ProfileBadge;
} else if (s == u"animated_userpics"_q) {
return PremiumPreview::AnimatedUserpics;
} else if (s == u"translations"_q) {
return PremiumPreview::RealTimeTranslation;
}
return PremiumPreview::kCount;
}) | ranges::views::filter([](PremiumPreview type) {