summaryrefslogtreecommitdiffstats
path: root/chrome/browser/chromeos/status/input_method_menu.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/chromeos/status/input_method_menu.cc')
-rw-r--r--chrome/browser/chromeos/status/input_method_menu.cc11
1 files changed, 8 insertions, 3 deletions
diff --git a/chrome/browser/chromeos/status/input_method_menu.cc b/chrome/browser/chromeos/status/input_method_menu.cc
index 18eaf44..f91fabd 100644
--- a/chrome/browser/chromeos/status/input_method_menu.cc
+++ b/chrome/browser/chromeos/status/input_method_menu.cc
@@ -659,6 +659,11 @@ string16 InputMethodMenu::GetTextForIndicator(
string16 InputMethodMenu::GetTextForMenu(
const input_method::InputMethodDescriptor& input_method) {
+ if (!input_method.name().empty()) {
+ // If the descriptor has a name, use it.
+ return UTF8ToUTF16(input_method.name());
+ }
+
// We don't show language here. Name of keyboard layout or input method
// usually imply (or explicitly include) its language.
@@ -678,9 +683,9 @@ string16 InputMethodMenu::GetTextForMenu(
string16 text =
manager->GetInputMethodUtil()->TranslateString(input_method.id());
if (text == standard_input_method_text ||
- language_code == "de" ||
- language_code == "fr" ||
- language_code == "nl") {
+ language_code == "de" ||
+ language_code == "fr" ||
+ language_code == "nl") {
text = GetLanguageName(language_code) + UTF8ToUTF16(" - ") + text;
}