From d4f12f2630d41b0dc534c0d3d0d8ae7b3881c680 Mon Sep 17 00:00:00 2001
From: Andrew Dyukov <adyukov@productengine.com>
Date: Wed, 11 Aug 2010 20:39:34 +0300
Subject: 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
---
 indra/llwindow/llkeyboard.cpp | 7 +++++++
 1 file changed, 7 insertions(+)

(limited to 'indra/llwindow')

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;
 }
 
-- 
cgit v1.2.3