From 89cfc6f8e63bc62d3f6a8fb33a8f4858f5071ecb Mon Sep 17 00:00:00 2001 From: Konstantin Pastbin Date: Sat, 3 Jan 2026 23:12:09 +0700 Subject: [PATCH] [search] Enable Lithuanian for search categories/synonyms Signed-off-by: Konstantin Pastbin --- libs/indexer/categories_holder.hpp | 41 +++++++++++++++--------------- 1 file changed, 21 insertions(+), 20 deletions(-) diff --git a/libs/indexer/categories_holder.hpp b/libs/indexer/categories_holder.hpp index 1d86b49eb..870d8537c 100644 --- a/libs/indexer/categories_holder.hpp +++ b/libs/indexer/categories_holder.hpp @@ -58,15 +58,15 @@ public: // Should match codes in the array below. static int8_t constexpr kEnglishCode = 1; static int8_t constexpr kUnsupportedLocaleCode = -1; - static int8_t constexpr kSimplifiedChineseCode = 44; - static int8_t constexpr kTraditionalChineseCode = 45; + static int8_t constexpr kSimplifiedChineseCode = 45; + static int8_t constexpr kTraditionalChineseCode = 46; // *NOTE* These constants should be updated when adding new // translation to categories.txt. When editing, keep in mind to check // CategoriesHolder::MapLocaleToInteger() and // CategoriesHolder::MapIntegerToLocale() as their implementations // strongly depend on the contents of the variable. // TODO: Refactor for more flexibility and to avoid breaking rules in two methods mentioned above. - static std::array constexpr kLocaleMapping = {{ + static std::array constexpr kLocaleMapping = {{ {"en", kEnglishCode}, {"en-AU", 2}, {"en-GB", 3}, @@ -93,23 +93,24 @@ public: {"it", 24}, {"ja", 25}, {"ko", 26}, - {"lv", 27}, - {"mr", 28}, - {"nb", 29}, - {"nl", 30}, - {"pl", 31}, - {"pt", 32}, - {"pt-BR", 33}, - {"ro", 34}, - {"ru", 35}, - {"sk", 36}, - {"sr", 37}, - {"sv", 38}, - {"sw", 39}, - {"th", 40}, - {"tr", 41}, - {"uk", 42}, - {"vi", 43}, + {"lt", 27}, + {"lv", 28}, + {"mr", 29}, + {"nb", 30}, + {"nl", 31}, + {"pl", 32}, + {"pt", 33}, + {"pt-BR", 34}, + {"ro", 35}, + {"ru", 36}, + {"sk", 37}, + {"sr", 38}, + {"sv", 39}, + {"sw", 40}, + {"th", 41}, + {"tr", 42}, + {"uk", 43}, + {"vi", 44}, {"zh-Hans", kSimplifiedChineseCode}, {"zh-Hant", kTraditionalChineseCode}, }};