From 7afb201d42b98731a438fbca17bc0c6e11a5f73c Mon Sep 17 00:00:00 2001 From: RadRussianRus Date: Tue, 8 Oct 2019 01:01:01 +0300 Subject: [PATCH] Localized channel link --- Telegram/SourceFiles/boxes/about_box.cpp | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/Telegram/SourceFiles/boxes/about_box.cpp b/Telegram/SourceFiles/boxes/about_box.cpp index bbcde5961..0e91539d2 100644 --- a/Telegram/SourceFiles/boxes/about_box.cpp +++ b/Telegram/SourceFiles/boxes/about_box.cpp @@ -48,9 +48,23 @@ rpl::producer Text2() { } rpl::producer Text3() { + auto baseLang = Lang::Current().baseId(); + QString channelLink; + + for (const auto language : { "ru", "uk", "be" }) { + if (baseLang.startsWith(QLatin1String(language))) { + channelLink = "https://t.me/kotatogram_ru"; + break; + } + } + + if (channelLink.isEmpty()) { + channelLink = "https://t.me/kotatogram"; + } + return tr::ktg_about_text3( lt_channel_link, - tr::ktg_about_text3_channel() | Ui::Text::ToLink("https://t.me/kotatogram"), + tr::ktg_about_text3_channel() | Ui::Text::ToLink(channelLink), lt_faq_link, tr::lng_about_text3_faq() | Ui::Text::ToLink(telegramFaqLink()), Ui::Text::WithEntities);