summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorzork@chromium.org <zork@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-06-21 06:51:44 +0000
committerzork@chromium.org <zork@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-06-21 06:51:44 +0000
commitc598b0939e37360089f455e28af928f68c685d46 (patch)
treef8972110696b7cc5a5bbe052af8927f27bddc0f1
parent45304378524fbb5d7008c21677fd05094d00daec (diff)
downloadchromium_src-c598b0939e37360089f455e28af928f68c685d46.zip
chromium_src-c598b0939e37360089f455e28af928f68c685d46.tar.gz
chromium_src-c598b0939e37360089f455e28af928f68c685d46.tar.bz2
Use the proper strings and decoration for third party IMEs.
BUG=133894 Review URL: https://chromiumcodereview.appspot.com/10584010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@143351 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--ash/ash_strings.grd6
-rw-r--r--ash/system/ime/tray_ime.cc15
2 files changed, 16 insertions, 5 deletions
diff --git a/ash/ash_strings.grd b/ash/ash_strings.grd
index 702edbf..d710ef7 100644
--- a/ash/ash_strings.grd
+++ b/ash/ash_strings.grd
@@ -345,7 +345,11 @@ CAPS LOCK is on.
Press Search key to cancel.
</message>
<message name="IDS_ASH_STATUS_TRAY_IME_TURNED_ON_BUBBLE" desc="The message shown on a bubble when an IME is enabled">
- Your input method has changed.
+ Your input method has changed to <ph name="INPUT_METHOD_ID">$1<ex>EN</ex></ph>.
+ Press Shift + Alt to switch.
+ </message>
+ <message name="IDS_ASH_STATUS_TRAY_THIRD_PARTY_IME_TURNED_ON_BUBBLE" desc="The message shown on a bubble when a third party IME is enabled">
+ Your input method has changed to <ph name="INPUT_METHOD_ID">$1<ex>EN</ex></ph>*(<ph name="BEGIN_LINK">&lt;a target="_blank" href="$2"&gt;</ph>3rd party<ph name="END_LINK">&lt;/a&gt;<ex>&lt;/a&gt;</ex></ph>).
Press Shift + Alt to switch.
</message>
<message name="IDS_ASH_STATUS_TRAY_DISABLE_SPOKEN_FEEDBACK" desc="The label used in the tray popup to disable spoken feedback.">
diff --git a/ash/system/ime/tray_ime.cc b/ash/system/ime/tray_ime.cc
index b301df7..74a00952 100644
--- a/ash/system/ime/tray_ime.cc
+++ b/ash/system/ime/tray_ime.cc
@@ -19,6 +19,7 @@
#include "base/utf_string_conversions.h"
#include "grit/ash_strings.h"
#include "grit/ui_resources_standard.h"
+#include "ui/base/l10n/l10n_util.h"
#include "ui/base/resource/resource_bundle.h"
#include "ui/gfx/font.h"
#include "ui/gfx/image/image.h"
@@ -170,9 +171,16 @@ class IMENotificationView : public TrayNotificationView {
explicit IMENotificationView(TrayIME* tray)
: TrayNotificationView(IDR_AURA_UBER_TRAY_IME),
tray_(tray) {
+ SystemTrayDelegate* delegate = Shell::GetInstance()->tray_delegate();
+ IMEInfo current;
+ delegate->GetCurrentIME(&current);
+
+ // TODO(zork): Use IDS_ASH_STATUS_TRAY_THIRD_PARTY_IME_TURNED_ON_BUBBLE for
+ // third party IMEs
InitView(new views::Label(
- ui::ResourceBundle::GetSharedInstance().GetLocalizedString(
- IDS_ASH_STATUS_TRAY_IME_TURNED_ON_BUBBLE)));
+ l10n_util::GetStringFUTF16(
+ IDS_ASH_STATUS_TRAY_IME_TURNED_ON_BUBBLE,
+ current.short_name)));
}
void StartAutoCloseTimer(int seconds) {
@@ -229,8 +237,7 @@ TrayIME::~TrayIME() {
void TrayIME::UpdateTrayLabel(const IMEInfo& current, size_t count) {
if (tray_label_) {
if (current.third_party) {
- // TODO(zork): Update this decoration.
- tray_label_->label()->SetText(current.short_name + UTF8ToUTF16("(3rd)"));
+ tray_label_->label()->SetText(current.short_name + UTF8ToUTF16("*"));
} else {
tray_label_->label()->SetText(current.short_name);
}