diff options
author | yusukes@google.com <yusukes@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-15 08:00:54 +0000 |
---|---|---|
committer | yusukes@google.com <yusukes@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-15 08:00:54 +0000 |
commit | 5643766f0fed86c472d22827c41e5b436a70e1e0 (patch) | |
tree | 4bb2a34921634a16c8f24d673865a56387e3d296 /chrome | |
parent | 0dd4f5fa7b9b01132c1b8609f2b9e474544938f0 (diff) | |
download | chromium_src-5643766f0fed86c472d22827c41e5b436a70e1e0.zip chromium_src-5643766f0fed86c472d22827c41e5b436a70e1e0.tar.gz chromium_src-5643766f0fed86c472d22827c41e5b436a70e1e0.tar.bz2 |
Change the label for the language indicator for Chinese.
For Pinyin, use "拼".
For Chewing, use "酷".
For Cangjie, use "倉".
For now, we use "TW" for Quick since we're not sure which Hanzi is good for the input method.
BUG=chromium-os:4696
TEST=manually checked.
Review URL: http://codereview.chromium.org/2832054
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@52462 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r-- | chrome/browser/chromeos/status/language_menu_button.cc | 10 | ||||
-rw-r--r-- | chrome/browser/chromeos/status/language_menu_button_unittest.cc | 20 |
2 files changed, 28 insertions, 2 deletions
diff --git a/chrome/browser/chromeos/status/language_menu_button.cc b/chrome/browser/chromeos/status/language_menu_button.cc index a8bc7d0..169640d 100644 --- a/chrome/browser/chromeos/status/language_menu_button.cc +++ b/chrome/browser/chromeos/status/language_menu_button.cc @@ -86,6 +86,12 @@ const struct { { "mozc", "\xe3\x81\x82" }, // Japanese Hiragana letter A in UTF-8. { "mozc-dv", "\xe3\x81\x82" }, { "mozc-jp", "\xe3\x81\x82" }, + // For simplified Chinese input methods + { "pinyin", "\xe6\x8b\xbc" }, // U+62FC + // For traditional Chinese input methods + { "chewing", "\xe9\x85\xb7" }, // U+9177 + { "m17n:zh:cangjie", "\xe5\x80\x89" }, // U+5009 + // TODO(yusukes): Add m17n:zh:quick if there's a good Hanzi character for it. // Handle "m17n:t" input methods here since ICU is not able to handle the // language code "t". Note: most users use either latn-pre or latn-post @@ -600,8 +606,8 @@ std::wstring LanguageMenuButton::GetTextForIndicator( } // TODO(yusukes): Some languages have two or more input methods. For example, - // Thai has 3, Traditional Chinese has many. If these input methods could be - // activated at the same time, we should do either of the following: + // Thai has 3, Vietnamese has 4. If these input methods could be activated at + // the same time, we should do either of the following: // (1) Add mappings to |kMappingFromIdToIndicatorText| // (2) Add suffix (1, 2, ...) to |text| when ambiguous. diff --git a/chrome/browser/chromeos/status/language_menu_button_unittest.cc b/chrome/browser/chromeos/status/language_menu_button_unittest.cc index a5094ca..11aabc9 100644 --- a/chrome/browser/chromeos/status/language_menu_button_unittest.cc +++ b/chrome/browser/chromeos/status/language_menu_button_unittest.cc @@ -45,6 +45,26 @@ TEST(LanguageMenuButtonTest, GetTextForIndicatorTest) { } { InputMethodDescriptor desc("pinyin", "Pinyin", "us", "zh-CN"); + EXPECT_EQ(UTF8ToWide("\xe6\x8b\xbc"), + LanguageMenuButton::GetTextForIndicator(desc)); + } + { + InputMethodDescriptor desc("chewing", "Chewing", "us", "zh-TW"); + EXPECT_EQ(UTF8ToWide("\xe9\x85\xb7"), + LanguageMenuButton::GetTextForIndicator(desc)); + } + { + InputMethodDescriptor desc("m17n:zh:cangjie", "Cangjie", "us", "zh-TW"); + EXPECT_EQ(UTF8ToWide("\xe5\x80\x89"), + LanguageMenuButton::GetTextForIndicator(desc)); + } + { + InputMethodDescriptor desc("m17n:zh:quick", "Quick", "us", "zh-TW"); + EXPECT_EQ(UTF8ToWide("TW"), + LanguageMenuButton::GetTextForIndicator(desc)); + } + { + InputMethodDescriptor desc("pinyin", "Pinyin", "us", "zh-CN"); EXPECT_EQ(UTF8ToWide("CN"), LanguageMenuButton::GetTextForIndicator(desc)); } |