diff options
author | andreykproductengine <andreykproductengine@lindenlab.com> | 2019-11-10 19:06:03 +0200 |
---|---|---|
committer | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2020-06-23 14:50:05 +0300 |
commit | 5568018bd20a43c30caca0c6288e63bfae29a2e3 (patch) | |
tree | a5d81dbebe5601230d95b8a1c45dc1b2a577e6ca /indra/llwindow/llkeyboard.cpp | |
parent | e7d383be8a9734a5008690b8a7e1b179e2f2a718 (diff) |
SL-6109 Better key and table localization support and fix for key-replacing
Diffstat (limited to 'indra/llwindow/llkeyboard.cpp')
-rw-r--r-- | indra/llwindow/llkeyboard.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/indra/llwindow/llkeyboard.cpp b/indra/llwindow/llkeyboard.cpp index 8e75325859..5404ac50e5 100644 --- a/indra/llwindow/llkeyboard.cpp +++ b/indra/llwindow/llkeyboard.cpp @@ -327,7 +327,7 @@ BOOL LLKeyboard::keyFromString(const std::string& str, KEY *key) // static -std::string LLKeyboard::stringFromKey(KEY key) +std::string LLKeyboard::stringFromKey(KEY key, bool translate) { std::string res = get_if_there(sKeysToNames, key, std::string()); if (res.empty()) @@ -338,10 +338,13 @@ std::string LLKeyboard::stringFromKey(KEY key) res = std::string(buffer); } - LLKeyStringTranslatorFunc *trans = gKeyboard->mStringTranslator; - if (trans != NULL) + if (translate) { - res = trans(res.c_str()); + LLKeyStringTranslatorFunc *trans = gKeyboard->mStringTranslator; + if (trans != NULL) + { + res = trans(res.c_str()); + } } return res; |