diff options
author | Alexander Gavriliuk <alexandrgproductengine@lindenlab.com> | 2023-09-08 12:19:21 +0200 |
---|---|---|
committer | Alexander Gavriliuk <alexandrgproductengine@lindenlab.com> | 2023-09-08 12:19:21 +0200 |
commit | 29a3295c82fb65143f8eea7e27c61436a19b4272 (patch) | |
tree | dc6eb03a8dfa3d302c6636db77ed6177d8309f0d /indra | |
parent | c30208d598d43779cea7b5de50c44d4b21b16487 (diff) |
SL-19951 EmojiPicker - preserve original character case for German categories
Diffstat (limited to 'indra')
-rw-r--r-- | indra/llui/llemojidictionary.cpp | 18 | ||||
-rw-r--r-- | indra/newview/llfloateremojipicker.cpp | 2 |
2 files changed, 7 insertions, 13 deletions
diff --git a/indra/llui/llemojidictionary.cpp b/indra/llui/llemojidictionary.cpp index 89758f538b..1ee97ea2d2 100644 --- a/indra/llui/llemojidictionary.cpp +++ b/indra/llui/llemojidictionary.cpp @@ -204,8 +204,7 @@ void LLEmojiDictionary::loadTranslations() { const LLSD& sd = *it; const std::string& name = sd["Name"].asStringRef(); - std::string category = sd["Category"].asString(); - LLStringUtil::toLower(category); + const std::string& category = sd["Category"].asStringRef(); if (!name.empty() && !category.empty()) { mTranslations[name] = category; @@ -373,22 +372,17 @@ llwchar LLEmojiDictionary::loadIcon(const LLSD& sd) return (1 == icon.size()) ? icon[0] : L'\0'; } -static inline std::list<std::string> loadStrings(const LLSD& sd, const std::string key) -{ - auto toLower = [](std::string& str) { LLStringUtil::toLower(str); }; - return llsd_array_to_list<std::string>(sd[key], toLower); -} - std::list<std::string> LLEmojiDictionary::loadCategories(const LLSD& sd) { - static const std::string categoriesKey("Categories"); - return loadStrings(sd, categoriesKey); + static const std::string key("Categories"); + return llsd_array_to_list<std::string>(sd[key]); } std::list<std::string> LLEmojiDictionary::loadShortCodes(const LLSD& sd) { - static const std::string shortCodesKey("ShortCodes"); - return loadStrings(sd, shortCodesKey); + static const std::string key("ShortCodes"); + auto toLower = [](std::string& str) { LLStringUtil::toLower(str); }; + return llsd_array_to_list<std::string>(sd[key], toLower); } void LLEmojiDictionary::translateCategories(std::list<std::string>& categories) diff --git a/indra/newview/llfloateremojipicker.cpp b/indra/newview/llfloateremojipicker.cpp index d24f627cdf..1169100336 100644 --- a/indra/newview/llfloateremojipicker.cpp +++ b/indra/newview/llfloateremojipicker.cpp @@ -461,7 +461,7 @@ void LLFloaterEmojiPicker::fillEmojis(bool fromResize) bool showDivider = true; bool mixedFolder = maxRows; LLEmojiGridRow* row = nullptr; - if (!mixedFolder) + if (!mixedFolder && !isupper(category.front())) { LLStringUtil::capitalize(category); } |