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

Issue 1951493002: Fix i18n number formats in tray power displays (Closed)

Created:
4 years, 7 months ago by Greg Levin
Modified:
4 years, 7 months ago
CC:
chromium-reviews, kalyank, sadrul, oshima+watch_chromium.org, derat+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Fix i18n number formats in tray power displays BUG=612181 TEST=Switch language to Bengali (India), open systray menu, notice that power values (% and time remaining) are displayed using Bengali, rather than Arabic, numberic characters. Committed: https://crrev.com/5cff4d12a49e6164f4c12f0179cacf46a20d9fa4 Cr-Commit-Position: refs/heads/master@{#394830}

Patch Set 1 #

Total comments: 14

Patch Set 2 : Use MessageFormatter in power_status_view.cc #

Total comments: 4

Patch Set 3 : Move time formatting into TimeDurationFormat() #

Total comments: 12

Patch Set 4 : Address reviews #

Patch Set 5 : Add unit test for TimeDurationFormat() #

Total comments: 6

Patch Set 6 : Fix test, address reviews #

Total comments: 1

Patch Set 7 : Switch unit test from Bengali to Persian for Android (and merge) #

Unified diffs Side-by-side diffs Delta from patch set Stats (+115 lines, -39 lines) Patch
M ash/ash_chromeos_strings.grdp View 1 2 3 4 5 6 1 chunk +4 lines, -7 lines 0 comments Download
M ash/system/chromeos/power/battery_notification.cc View 1 2 3 3 chunks +8 lines, -10 lines 0 comments Download
M ash/system/chromeos/power/power_status_view.cc View 1 2 3 4 5 6 2 chunks +13 lines, -22 lines 0 comments Download
M base/i18n/time_formatting.h View 1 2 3 3 chunks +15 lines, -0 lines 0 comments Download
M base/i18n/time_formatting.cc View 1 2 3 3 chunks +31 lines, -0 lines 0 comments Download
M base/i18n/time_formatting_unittest.cc View 1 2 3 4 5 6 1 chunk +44 lines, -0 lines 0 comments Download

Messages

Total messages: 48 (14 generated)
Greg Levin
stevenjb@, do you have time to take a quick look, since you're already cc'd on ...
4 years, 7 months ago (2016-05-03 18:59:03 UTC) #2
Daniel Erat
https://codereview.chromium.org/1951493002/diff/1/ash/system/chromeos/power/battery_notification.cc File ash/system/chromeos/power/battery_notification.cc (right): https://codereview.chromium.org/1951493002/diff/1/ash/system/chromeos/power/battery_notification.cc#newcode67 ash/system/chromeos/power/battery_notification.cc:67: IDS_ASH_STATUS_TRAY_BATTERY_TIME_UNTIL_FULL, base::FormatNumber(hour), just to check, is some combination of ...
4 years, 7 months ago (2016-05-03 19:17:33 UTC) #4
stevenjb
https://codereview.chromium.org/1951493002/diff/1/ash/system/chromeos/power/battery_notification.cc File ash/system/chromeos/power/battery_notification.cc (right): https://codereview.chromium.org/1951493002/diff/1/ash/system/chromeos/power/battery_notification.cc#newcode67 ash/system/chromeos/power/battery_notification.cc:67: IDS_ASH_STATUS_TRAY_BATTERY_TIME_UNTIL_FULL, base::FormatNumber(hour), On 2016/05/03 19:17:33, Daniel Erat wrote: > ...
4 years, 7 months ago (2016-05-03 19:49:09 UTC) #5
jungshik at Google
https://codereview.chromium.org/1951493002/diff/1/ash/system/chromeos/power/battery_notification.cc File ash/system/chromeos/power/battery_notification.cc (right): https://codereview.chromium.org/1951493002/diff/1/ash/system/chromeos/power/battery_notification.cc#newcode67 ash/system/chromeos/power/battery_notification.cc:67: IDS_ASH_STATUS_TRAY_BATTERY_TIME_UNTIL_FULL, base::FormatNumber(hour), On 2016/05/03 19:49:09, stevenjb wrote: > On ...
4 years, 7 months ago (2016-05-10 08:50:44 UTC) #7
jungshik at Google
https://codereview.chromium.org/1951493002/diff/1/ash/system/chromeos/power/power_status_view.cc File ash/system/chromeos/power/power_status_view.cc (right): https://codereview.chromium.org/1951493002/diff/1/ash/system/chromeos/power/power_status_view.cc#newcode95 ash/system/chromeos/power/power_status_view.cc:95: base::FormatNumber(status.GetRoundedBatteryPercent())); On 2016/05/10 08:50:44, jshin (jungshik at google) wrote: ...
4 years, 7 months ago (2016-05-10 09:28:17 UTC) #8
Greg Levin
Here's an intermediate patch with just power_status_view.cc. I have a few questions I wanted to ...
4 years, 7 months ago (2016-05-10 23:33:43 UTC) #9
Greg Levin
Ok, here's a working draft. Please have another look! https://codereview.chromium.org/1951493002/diff/1/ash/system/chromeos/power/battery_notification.cc File ash/system/chromeos/power/battery_notification.cc (right): https://codereview.chromium.org/1951493002/diff/1/ash/system/chromeos/power/battery_notification.cc#newcode67 ash/system/chromeos/power/battery_notification.cc:67: ...
4 years, 7 months ago (2016-05-11 19:43:02 UTC) #10
jungshik at Google
On 2016/05/10 23:33:43, Greg Levin wrote: > Here's an intermediate patch with just power_status_view.cc. I ...
4 years, 7 months ago (2016-05-11 20:32:28 UTC) #11
jungshik at Google
https://codereview.chromium.org/1951493002/diff/20001/ash/system/chromeos/power/power_status_view.cc File ash/system/chromeos/power/power_status_view.cc (right): https://codereview.chromium.org/1951493002/diff/20001/ash/system/chromeos/power/power_status_view.cc#newcode112 ash/system/chromeos/power/power_status_view.cc:112: : IDS_ASH_STATUS_TRAY_BATTERY_TIME_LEFT_SHORT); Please use l10n_util::GetStringUTF16()
4 years, 7 months ago (2016-05-11 20:32:39 UTC) #12
Daniel Erat
lgtm (but i am deferring to jungshik for the tricky parts of this :-P)
4 years, 7 months ago (2016-05-11 20:47:31 UTC) #13
jungshik at Google
Thank you for writing a helper API. My previous comment was written without noticing PS ...
4 years, 7 months ago (2016-05-11 21:11:45 UTC) #14
jungshik at Google
One more comment. :-) https://codereview.chromium.org/1951493002/diff/40001/ash/system/chromeos/power/battery_notification.cc File ash/system/chromeos/power/battery_notification.cc (right): https://codereview.chromium.org/1951493002/diff/40001/ash/system/chromeos/power/battery_notification.cc#newcode56 ash/system/chromeos/power/battery_notification.cc:56: IDS_ASH_STATUS_TRAY_BATTERY_PERCENT, percentage); You can change ...
4 years, 7 months ago (2016-05-11 21:19:49 UTC) #15
jungshik at Google
Just in case it's not clear, overall, PS #3 looks good except for a potential ...
4 years, 7 months ago (2016-05-11 21:33:15 UTC) #16
jungshik at Google
On 2016/05/11 21:33:15, jshin (jungshik at google) wrote: > Just in case it's not clear, ...
4 years, 7 months ago (2016-05-12 17:18:08 UTC) #17
Greg Levin
> Just in case it's not clear, overall, PS #3 looks good except for a ...
4 years, 7 months ago (2016-05-12 19:31:44 UTC) #18
Greg Levin
https://codereview.chromium.org/1951493002/diff/80001/base/i18n/time_formatting_unittest.cc File base/i18n/time_formatting_unittest.cc (right): https://codereview.chromium.org/1951493002/diff/80001/base/i18n/time_formatting_unittest.cc#newcode223 base/i18n/time_formatting_unittest.cc:223: #endif I just copied this from other tests in ...
4 years, 7 months ago (2016-05-13 14:54:08 UTC) #19
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1951493002/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1951493002/80001
4 years, 7 months ago (2016-05-13 17:36:42 UTC) #21
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: linux_android_rel_ng on tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/linux_android_rel_ng/builds/70059)
4 years, 7 months ago (2016-05-13 19:41:00 UTC) #23
jungshik at Google
Thanks a lot. LGTM with a few minor issues noted below addressed. https://codereview.chromium.org/1951493002/diff/20001/ash/system/chromeos/power/power_status_view.cc File ash/system/chromeos/power/power_status_view.cc ...
4 years, 7 months ago (2016-05-13 23:00:36 UTC) #24
jungshik at Google
https://codereview.chromium.org/1951493002/diff/80001/base/i18n/time_formatting_unittest.cc File base/i18n/time_formatting_unittest.cc (right): https://codereview.chromium.org/1951493002/diff/80001/base/i18n/time_formatting_unittest.cc#newcode175 base/i18n/time_formatting_unittest.cc:175: i18n::SetICUDefaultLocale("en_US"); On 2016/05/13 23:00:35, jshin (jungshik at google) wrote: ...
4 years, 7 months ago (2016-05-13 23:06:16 UTC) #25
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1951493002/100001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1951493002/100001
4 years, 7 months ago (2016-05-14 17:29:06 UTC) #27
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 7 months ago (2016-05-14 18:40:09 UTC) #29
jungshik at Google
>> Just in case it's not clear, overall, PS #3 looks good except for a ...
4 years, 7 months ago (2016-05-15 05:33:05 UTC) #30
jungshik at Google
Thanks again. LGTM again. https://codereview.chromium.org/1951493002/diff/80001/base/i18n/time_formatting_unittest.cc File base/i18n/time_formatting_unittest.cc (right): https://codereview.chromium.org/1951493002/diff/80001/base/i18n/time_formatting_unittest.cc#newcode175 base/i18n/time_formatting_unittest.cc:175: i18n::SetICUDefaultLocale("en_US"); On 2016/05/13 23:06:15, jshin ...
4 years, 7 months ago (2016-05-15 05:43:04 UTC) #31
Greg Levin
https://codereview.chromium.org/1951493002/diff/20001/ash/system/chromeos/power/power_status_view.cc File ash/system/chromeos/power/power_status_view.cc (right): https://codereview.chromium.org/1951493002/diff/20001/ash/system/chromeos/power/power_status_view.cc#newcode112 ash/system/chromeos/power/power_status_view.cc:112: : IDS_ASH_STATUS_TRAY_BATTERY_TIME_LEFT_SHORT); On 2016/05/13 23:00:35, jshin (jungshik at google) ...
4 years, 7 months ago (2016-05-16 17:12:56 UTC) #33
jungshik at Google
On 2016/05/16 17:12:56, Greg Levin wrote: > https://codereview.chromium.org/1951493002/diff/20001/ash/system/chromeos/power/power_status_view.cc > File ash/system/chromeos/power/power_status_view.cc (right): > > https://codereview.chromium.org/1951493002/diff/20001/ash/system/chromeos/power/power_status_view.cc#newcode112 ...
4 years, 7 months ago (2016-05-16 21:46:33 UTC) #34
Greg Levin
> After my last comment, I realized what's going on. Chrome on Android is NOT ...
4 years, 7 months ago (2016-05-17 12:56:34 UTC) #35
jungshik at Google
On 2016/05/17 12:56:34, Greg Levin wrote: > > After my last comment, I realized what's ...
4 years, 7 months ago (2016-05-17 23:04:15 UTC) #36
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1951493002/120001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1951493002/120001
4 years, 7 months ago (2016-05-18 16:58:14 UTC) #38
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: ios-device-gn on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-device-gn/builds/7805)
4 years, 7 months ago (2016-05-18 17:04:03 UTC) #40
stevenjb
lgtm
4 years, 7 months ago (2016-05-19 15:51:13 UTC) #41
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1951493002/120001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1951493002/120001
4 years, 7 months ago (2016-05-19 17:21:05 UTC) #44
commit-bot: I haz the power
Committed patchset #7 (id:120001)
4 years, 7 months ago (2016-05-19 19:22:15 UTC) #46
commit-bot: I haz the power
4 years, 7 months ago (2016-05-19 19:23:55 UTC) #48
Message was sent while issue was closed.
Patchset 7 (id:??) landed as
https://crrev.com/5cff4d12a49e6164f4c12f0179cacf46a20d9fa4
Cr-Commit-Position: refs/heads/master@{#394830}

Powered by Google App Engine
This is Rietveld 408576698