summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/llwindow/llkeyboard.cpp7
-rw-r--r--indra/llxuixml/lltrans.h11
-rw-r--r--indra/newview/skins/default/xui/en/strings.xml3
3 files changed, 16 insertions, 5 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;
}
diff --git a/indra/llxuixml/lltrans.h b/indra/llxuixml/lltrans.h
index 856b9e04fc..6c8d28b346 100644
--- a/indra/llxuixml/lltrans.h
+++ b/indra/llxuixml/lltrans.h
@@ -103,11 +103,12 @@ public:
return findString(result, xml_desc, empty);
}
- static std::string getKeyboardString(const char* keystring)
- {
- // These map directly - no need to specialize
- return getString( ll_safe_string(keystring) );
- }
+ static std::string getKeyboardString(const char* keystring)
+ {
+ std::string key_str(keystring);
+ std::string trans_str;
+ return findString(trans_str, "Key_" + key_str) ? trans_str : key_str;
+ }
// get the default args
static const LLStringUtil::format_map_t& getDefaultArgs()
diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml
index 2aa34b746b..7a292ab943 100644
--- a/indra/newview/skins/default/xui/en/strings.xml
+++ b/indra/newview/skins/default/xui/en/strings.xml
@@ -2282,6 +2282,9 @@ Expected .wav, .tga, .bmp, .jpg, .jpeg, or .bvh
<string name="accel-win-alt">Alt+</string>
<string name="accel-win-shift">Shift+</string>
+ <string name="Key_Esc">Esc</string>
+ <string name="Key_Home">Home</string>
+
<!-- Previews -->
<string name="FileSaved">File Saved</string>
<string name="Receiving">Receiving</string>