summaryrefslogtreecommitdiff
path: root/indra/llui/llemojidictionary.cpp
diff options
context:
space:
mode:
authorAlexander Gavriliuk <alexandrgproductengine@lindenlab.com>2023-09-08 12:19:21 +0200
committerAlexander Gavriliuk <alexandrgproductengine@lindenlab.com>2023-09-08 12:19:21 +0200
commit29a3295c82fb65143f8eea7e27c61436a19b4272 (patch)
treedc6eb03a8dfa3d302c6636db77ed6177d8309f0d /indra/llui/llemojidictionary.cpp
parentc30208d598d43779cea7b5de50c44d4b21b16487 (diff)
SL-19951 EmojiPicker - preserve original character case for German categories
Diffstat (limited to 'indra/llui/llemojidictionary.cpp')
-rw-r--r--indra/llui/llemojidictionary.cpp18
1 files changed, 6 insertions, 12 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)