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

Unified Diff: ash/common/system/web_notification/web_notification_tray.cc

Issue 2721213002: Adjust RTL formatting for web notifications in cros system tray. (Closed)
Patch Set: Created 3 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/common/system/web_notification/web_notification_tray.cc
diff --git a/ash/common/system/web_notification/web_notification_tray.cc b/ash/common/system/web_notification/web_notification_tray.cc
index 6a2470d36284e35b68d9455f8eff36f17fdb1871..60a8604f18bdb8a6c20cc8aa67d2d84ed49b2908 100644
--- a/ash/common/system/web_notification/web_notification_tray.cc
+++ b/ash/common/system/web_notification/web_notification_tray.cc
@@ -267,10 +267,9 @@ class WebNotificationLabel : public WebNotificationItem {
base::string16 str = base::FormatNumber(notification_count);
if (small_icons_exist) {
- if (!base::i18n::IsRTL())
- str = base::ASCIIToUTF16("+") + str;
- else
- str = str + base::ASCIIToUTF16("+");
+ str = base::ASCIIToUTF16("+") + str;
+ if (base::i18n::IsRTL())
+ base::i18n::WrapStringWithRTLFormatting(&str);
mohsen 2017/03/02 21:45:21 If I understand correctly, when the context is RTL
Evan Stade 2017/03/02 22:22:52 We want to show "99+" in RTL. That is what Chrome
mohsen 2017/03/03 04:25:35 I see. I agree that your change is a better way of
}
view_->SetText(str);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698