mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2026-07-25 06:54:43 +00:00
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:
@@ -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 ®istry = Builder::SearchRegistry::Instance();
|
const auto ®istry = 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,
|
||||||
|
|||||||
Reference in New Issue
Block a user