Moved out url for credits terms to lang pack.

This commit is contained in:
23rd 2024-06-06 19:33:03 +03:00 committed by John Preston
parent 9176bf2e47
commit aafa8631e0
2 changed files with 6 additions and 4 deletions

View File

@ -2316,6 +2316,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
"lng_credits_summary_options_more" = "More Options";
"lng_credits_summary_options_about" = "By proceeding and purchasing Stars, you agree with the {link}.";
"lng_credits_summary_options_about_link" = "Terms and Conditions";
"lng_credits_summary_options_about_url" = "https://telegram.org/tos/stars";
"lng_credits_summary_history_tab_full" = "All Transactions";
"lng_credits_summary_history_tab_in" = "Incoming";
"lng_credits_summary_history_tab_out" = "Outgoing";

View File

@ -269,10 +269,11 @@ void FillCreditOptions(
{
auto text = tr::lng_credits_summary_options_about(
lt_link,
tr::lng_credits_summary_options_about_link(
) | rpl::map([](const QString &t) {
using namespace Ui::Text;
return Link(t, u"https://telegram.org/tos"_q);
rpl::combine(
tr::lng_credits_summary_options_about_link(),
tr::lng_credits_summary_options_about_url()
) | rpl::map([](const QString &text, const QString &url) {
return Ui::Text::Link(text, url);
}),
Ui::Text::RichLangValue);
Ui::AddSkip(content);