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

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

Issue 7044044: Add pinyin-dv support. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review Created 9 years, 6 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 e2d2ba1489b62ea9550916f409801c58bd89324b..fdb1f8976f46c9573eff8268418840242cf02a95 100644
--- a/chrome/browser/chromeos/input_method/input_method_util.cc
+++ b/chrome/browser/chromeos/input_method/input_method_util.cc
@@ -173,6 +173,8 @@ const struct EnglishToResouceId {
{ "Mozc Chewing (Chewing)",
IDS_OPTIONS_SETTINGS_LANGUAGES_CHEWING_INPUT_METHOD },
{ "Pinyin", IDS_OPTIONS_SETTINGS_LANGUAGES_PINYIN_INPUT_METHOD },
+ { "Pinyin (for US Dvorak keyboard)",
+ IDS_OPTIONS_SETTINGS_LANGUAGES_PINYIN_DV_INPUT_METHOD },
{ "Mozc (US keyboard layout)",
IDS_OPTIONS_SETTINGS_LANGUAGES_JAPANESE_MOZC_US_INPUT_METHOD },
{ "Mozc (US Dvorak keyboard layout)",
@@ -450,13 +452,14 @@ std::string GetLanguageCodeFromDescriptor(
// Handle some Chinese input methods as zh-CN/zh-TW, rather than zh.
// TODO: we should fix this issue in engines rather than here.
if (descriptor.language_code == "zh") {
- if (descriptor.id == "pinyin") {
+ if (descriptor.id == "pinyin" || descriptor.id == "pinyin-dv") {
return "zh-CN";
} else if (descriptor.id == "mozc-chewing" ||
descriptor.id == "m17n:zh:cangjie" ||
descriptor.id == "m17n:zh:quick") {
return "zh-TW";
}
+ LOG(ERROR) << "Unhandled Chinese engine: " << descriptor.id;
}
std::string language_code = NormalizeLanguageCode(descriptor.language_code);

Powered by Google App Engine
This is Rietveld 408576698