From 22b433b4e27c9bfb582a00bf9c2ab1d83895a844 Mon Sep 17 00:00:00 2001 From: pivotman319 Date: Sat, 30 May 2026 22:26:57 +0200 Subject: [PATCH] Add support for multiple plurals to search results (used by Cyrillic langs) --- localization/panorama_english.txt | 6 ++++++ scripts/pages/settings/search.js | 4 ++++ 2 files changed, 10 insertions(+) diff --git a/localization/panorama_english.txt b/localization/panorama_english.txt index 62255d41..d5e04b0c 100644 --- a/localization/panorama_english.txt +++ b/localization/panorama_english.txt @@ -501,6 +501,12 @@ "Settings_General_Search_MatchedEnglishTag" "Matches " "Settings_General_Search_VeryFull" "{s:count} more match" "Settings_General_Search_VeryFull_Plural" "{s:count} more matches" + + // Needed for Cyrillic languages. Russian has two definitions of the word "plural"; one is for + // exactly two matches (Search_VeryFull_Plural), another is for more than two matches (Search_VeryFull_Plural2). + // So this "duplicate" string exists and is used in place. + "Settings_General_Search_VeryFull_Plural2" "{s:count} more matches" + "Settings_Reset_Title" "Confirm Reset" "Settings_Reset_Message_Generic" "Are you sure you want to reset this section's settings to their default values?" "Settings_Reset_Message_Checker" "The following settings are currently different from their default values and will be reset:" diff --git a/scripts/pages/settings/search.js b/scripts/pages/settings/search.js index 043e2e59..2c1adda6 100644 --- a/scripts/pages/settings/search.js +++ b/scripts/pages/settings/search.js @@ -212,6 +212,10 @@ class SettingsSearch { class: 'settings-search__empty-para' }); if (left === 1) p.SetLocalizationString('#Settings_General_Search_VeryFull'); + // Needed for Cyrillic languages. Russian has two definitions of the word "plural"; one is for + // exactly two matches (Search_VeryFull_Plural), another is for more than two matches (Search_VeryFull_Plural2). + // So this "duplicate" string exists and is used in place. + else if (left > 2) p.SetLocalizationString('#Settings_General_Search_VeryFull_Plural2'); else p.SetLocalizationString('#Settings_General_Search_VeryFull_Plural'); p.SetDialogVariable('count', left); }