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

Unified Diff: ash/system/tray_user.cc

Issue 9572010: Make the strings in the ash uber tray translatable. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 10 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
« no previous file with comments | « ash/system/settings/tray_settings.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/system/tray_user.cc
diff --git a/ash/system/tray_user.cc b/ash/system/tray_user.cc
index 345c6e88023d5d5cc942422998966244d1a5b72d..1cdfde50c10ed97e801ad11a7de1639daa9c6d19 100644
--- a/ash/system/tray_user.cc
+++ b/ash/system/tray_user.cc
@@ -7,7 +7,7 @@
#include "ash/shell.h"
#include "ash/system/tray/system_tray_delegate.h"
#include "base/utf_string_conversions.h"
-#include "grit/ui_resources.h"
+#include "grit/ash_strings.h"
#include "ui/base/resource/resource_bundle.h"
#include "ui/gfx/size.h"
#include "ui/views/controls/button/button.h"
@@ -23,8 +23,8 @@ namespace {
// alignment and hover-effects.
class TrayButton : public views::TextButton {
public:
- TrayButton(views::ButtonListener* listener, std::string text)
- : views::TextButton(listener, ASCIIToUTF16(text)),
+ TrayButton(views::ButtonListener* listener, const string16& text)
+ : views::TextButton(listener, text),
hover_(false),
hover_bg_(views::Background::CreateSolidBackground(SkColorSetARGB(
10, 0, 0, 0))) {
@@ -91,9 +91,14 @@ class UserView : public views::View,
layout->set_spread_blank_space(true);
button_container->SetLayoutManager(layout);
- shutdown_ = new TrayButton(this, std::string("Shut down"));
- signout_ = new TrayButton(this, std::string("Sign out"));
- lock_ = new TrayButton(this, std::string("Lock"));
+ ui::ResourceBundle& bundle = ui::ResourceBundle::GetSharedInstance();
+
+ shutdown_ = new TrayButton(this, bundle.GetLocalizedString(
+ IDS_ASH_STATUS_TRAY_SHUT_DOWN));
+ signout_ = new TrayButton(this, bundle.GetLocalizedString(
+ IDS_ASH_STATUS_TRAY_SIGN_OUT));
+ lock_ = new TrayButton(this, bundle.GetLocalizedString(
+ IDS_ASH_STATUS_TRAY_LOCK));
button_container->AddChildView(shutdown_);
button_container->AddChildView(signout_);
button_container->AddChildView(lock_);
« no previous file with comments | « ash/system/settings/tray_settings.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698