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

Unified Diff: ash/system/chromeos/network/tray_sms.cc

Issue 2002783002: Use plural formats and native digits (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: plural: use "=1" instead of "one" for pop-up block infobar Created 4 years, 7 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 | « no previous file | base/strings/string_number_conversions.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/system/chromeos/network/tray_sms.cc
diff --git a/ash/system/chromeos/network/tray_sms.cc b/ash/system/chromeos/network/tray_sms.cc
index 144a4cc5f9e96bc1f021f8a2a1a41b70158dff64..802de063b7a1b5bf1e997c3cadd89e04f51cb2a3 100644
--- a/ash/system/chromeos/network/tray_sms.cc
+++ b/ash/system/chromeos/network/tray_sms.cc
@@ -67,8 +67,11 @@ class TraySms::SmsDefaultView : public TrayItemMore {
void Update() {
int message_count = static_cast<TraySms*>(owner())->messages().GetSize();
- base::string16 label = l10n_util::GetStringFUTF16(
- IDS_ASH_STATUS_TRAY_SMS_MESSAGES, base::IntToString16(message_count));
+ // TODO(jshin): Currently, a tabular format is used ("SMS Messages:
+ // <count>"). Check with UX if '<count> SMS messages' with a proper plural
+ // support is desired.
+ base::string16 label = l10n_util::GetStringFUTF16Int(
+ IDS_ASH_STATUS_TRAY_SMS_MESSAGES, message_count);
SetLabel(label);
SetAccessibleName(label);
}
@@ -93,6 +96,9 @@ class TraySms::SmsMessageView : public views::View,
const std::string& message)
: owner_(owner),
index_(index) {
+ // TODO(jshin): Convert ASCII digits in |number| (phone number) to native
+ // digits if necessary. |number| can contain non-digit characters and may
+ // have to be converted one-by-one or use libphonenumber's formating API.
number_label_ = new views::Label(
l10n_util::GetStringFUTF16(IDS_ASH_STATUS_TRAY_SMS_NUMBER,
base::UTF8ToUTF16(number)),
« no previous file with comments | « no previous file | base/strings/string_number_conversions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698