summaryrefslogtreecommitdiff
path: root/indra/llwindow
diff options
context:
space:
mode:
authorAndrew Dyukov <adyukov@productengine.com>2010-08-11 20:39:34 +0300
committerAndrew Dyukov <adyukov@productengine.com>2010-08-11 20:39:34 +0300
commitec28b9af16c7f5eb365b945743d85fe75cc8383f (patch)
treef9707d9342904db845cfacc6653efdf99be60aa1 /indra/llwindow
parent79e767b91da71c32d499ba4ffb4ee0b972d301e4 (diff)
EXT-8425 FIXED Translated names of "Home" and "Esc" keys shown in shortcuts.
Each key has KEY (typedef of U8) represantation which is paired with text version of key. To get strings corresponding to keys LLKeyboard::stringFromKey() is used. - Added translation of keys into LLKeyboard::stringFromKey(). - Added corresponding strings into strings.xml. - Changed LLTrans::getKeyboardString() so that it correctly process key names that are not found in strings.xml(returns English name instead of "MissingString"). Reviewed by Vadim Savchuk at https://codereview.productengine.com/secondlife/r/845/ --HG-- branch : product-engine
Diffstat (limited to 'indra/llwindow')
-rw-r--r--indra/llwindow/llkeyboard.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/indra/llwindow/llkeyboard.cpp b/indra/llwindow/llkeyboard.cpp
index 16cbf815e0..8f26f980d1 100644
--- a/indra/llwindow/llkeyboard.cpp
+++ b/indra/llwindow/llkeyboard.cpp
@@ -343,6 +343,13 @@ std::string LLKeyboard::stringFromKey(KEY key)
buffer[1] = '\0';
res = std::string(buffer);
}
+
+ LLKeyStringTranslatorFunc *trans = gKeyboard->mStringTranslator;
+ if (trans != NULL)
+ {
+ res = trans(res.c_str());
+ }
+
return res;
}