Add separate lang key for FAQ search result subtitles.

Use shorter 'FAQ' prefix for search results instead of full
'Telegram FAQ' that's used for the main FAQ button label.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
John Preston
2026-01-16 12:19:53 +04:00
parent 594dc126e7
commit ecae9c7794
2 changed files with 5 additions and 4 deletions
+1
View File
@@ -1248,6 +1248,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
"lng_settings_faq_button" = "Go to FAQ"; "lng_settings_faq_button" = "Go to FAQ";
"lng_settings_ask_ok" = "Ask a Volunteer"; "lng_settings_ask_ok" = "Ask a Volunteer";
"lng_settings_faq" = "Telegram FAQ"; "lng_settings_faq" = "Telegram FAQ";
"lng_settings_faq_subtitle" = "FAQ";
"lng_settings_faq_link" = "https://telegram.org/faq#general-questions"; "lng_settings_faq_link" = "https://telegram.org/faq#general-questions";
"lng_settings_features" = "Telegram Features"; "lng_settings_features" = "Telegram Features";
"lng_settings_credits" = "My Stars"; "lng_settings_credits" = "My Stars";
@@ -341,7 +341,7 @@ void Search::rebuildResults(const QString &query) {
} else { } else {
const auto showOther = showOtherMethod(); const auto showOther = showOtherMethod();
const auto &registry = Builder::SearchRegistry::Instance(); const auto &registry = Builder::SearchRegistry::Instance();
const auto faqTitle = tr::lng_settings_faq(tr::now); const auto faqSubtitle = tr::lng_settings_faq_subtitle(tr::now);
const auto weak = base::make_weak(controller()); const auto weak = base::make_weak(controller());
for (const auto &result : results) { for (const auto &result : results) {
@@ -361,7 +361,7 @@ void Search::rebuildResults(const QString &query) {
auto subtitle = QString(); auto subtitle = QString();
if (isFaq) { if (isFaq) {
subtitle = faqTitle + u" > "_q + indexed.faqSection; subtitle = faqSubtitle + u" > "_q + indexed.faqSection;
} else { } else {
const auto parentsOnly = entry.id.isEmpty(); const auto parentsOnly = entry.id.isEmpty();
subtitle = registry.sectionPath(entry.section, parentsOnly); subtitle = registry.sectionPath(entry.section, parentsOnly);
@@ -449,7 +449,7 @@ void Search::rebuildFaqResults() {
return; return;
} }
const auto faqTitle = tr::lng_settings_faq(tr::now); const auto faqSubtitle = tr::lng_settings_faq_subtitle(tr::now);
const auto weak = base::make_weak(controller()); const auto weak = base::make_weak(controller());
for (auto i = _faqStartIndex; i < int(_entries.size()); ++i) { for (auto i = _faqStartIndex; i < int(_entries.size()); ++i) {
@@ -463,7 +463,7 @@ void Search::rebuildFaqResults() {
continue; continue;
} }
const auto subtitle = faqTitle + u" > "_q + indexed.faqSection; const auto subtitle = faqSubtitle + u" > "_q + indexed.faqSection;
const auto button = CreateSearchResultButtonRaw( const auto button = CreateSearchResultButtonRaw(
this, this,
indexed.entry.title, indexed.entry.title,