Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(96)

Unified Diff: chrome/browser/chromeos/input_method/input_method_util.cc

Issue 7385007: chromeos: Fix chromeos TODO in input_method_util.h (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chromeos/input_method/input_method_util.cc
diff --git a/chrome/browser/chromeos/input_method/input_method_util.cc b/chrome/browser/chromeos/input_method/input_method_util.cc
index 7bac1ce6219e7ef65a6e04e4e658ca3881a7ef6c..97a4aba55dd9de0fc9b6f2ebd78cbfa628b33f27 100644
--- a/chrome/browser/chromeos/input_method/input_method_util.cc
+++ b/chrome/browser/chromeos/input_method/input_method_util.cc
@@ -77,7 +77,7 @@ struct IdMaps {
}
// Go through the languages listed in kExtraLanguages.
- for (size_t i = 0; i < arraysize(kExtraLanguages); ++i) {
+ for (size_t i = 0; i < kExtraLanguagesLength; ++i) {
const char* language_code = kExtraLanguages[i].language_code;
const char* input_method_id = kExtraLanguages[i].input_method_id;
InputMethodIdToDescriptorMap::const_iterator iter =
@@ -358,6 +358,20 @@ bool GetLocalizedString(const std::string& english_string,
} // namespace
+const ExtraLanguage kExtraLanguages[] = {
+ // Language Code Input Method ID
+ { "en-AU", "xkb:us::eng" }, // For Austrailia, use US keyboard layout.
+ { "id", "xkb:us::eng" }, // For Indonesian, use US keyboard layout.
+ // The code "fil" comes from app/l10_util.cc.
+ { "fil", "xkb:us::eng" }, // For Filipino, use US keyboard layout.
+ // For Netherlands, use US international keyboard layout.
+ { "nl", "xkb:us:intl:eng" },
+ // The code "es-419" comes from app/l10_util.cc.
+ // For Spanish in Latin America, use Latin American keyboard layout.
+ { "es-419", "xkb:latam::spa" },
+};
+const size_t kExtraLanguagesLength = arraysize(kExtraLanguages);
+
std::wstring GetString(const std::string& english_string,
const std::string& input_method_id) {
string16 localized_string;

Powered by Google App Engine
This is Rietveld 408576698