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

Issue 1049513002: Use the ICU syntax message for plural formatting (Closed)

Created:
5 years, 8 months ago by jungshik at Google
Modified:
5 years, 7 months ago
CC:
chromium-reviews, chromium-apps-reviews_chromium.org, jamarante_chromium.org, tfarina, jshin+watch_chromium.org, extensions-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Use the ICU syntax message for plural formatting. Chrome trail-blazed using ICU plural format support in 2008~9. Due to the lack of support for plural in our translation pipeline, Chrome decided to use 6 strings (for each plural category) for each logical string and builds ICU's plural message pattern at run-time. Now that we can utilize the translation pipeline that supports ICU syntax directly (as are Android and other Google products), we'd better switch to directly using ICU syntax. That way, adding a new string requiring a plural formatting is made much simpler. And if necessary, we can add a gender support easily. BUG=471827 TEST=ui_base_unit_tests --gtest_filter=*Format* Committed: https://crrev.com/3a6c36bbd58de11de968cea7c271d5516d320dce Cr-Commit-Position: refs/heads/master@{#324517}

Patch Set 1 #

Patch Set 2 : change time formatters #

Patch Set 3 : convert all time format strings to ICU syntax #

Patch Set 4 : delete old strings for elapsed days/hours #

Patch Set 5 : fix errors #

Patch Set 6 : fix icu syntax + grd interaction #

Patch Set 7 : icu syntax added to desc #

Patch Set 8 : remove place holder for # #

Patch Set 9 : comment update #

Total comments: 1

Patch Set 10 : description update #

Patch Set 11 : lint fix #

Patch Set 12 : more lint fixes #

Patch Set 13 : ios whitelist update #

Unified diffs Side-by-side diffs Delta from patch set Stats (+229 lines, -2095 lines) Patch
M build/ios/grit_whitelist.txt View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +22 lines, -132 lines 0 comments Download
M chrome/app/generated_resources.grd View 2 chunks +16 lines, -219 lines 0 comments Download
M chrome/browser/extensions/extension_install_prompt.cc View 1 2 3 4 5 6 7 8 1 chunk +4 lines, -27 lines 0 comments Download
M chrome/browser/ui/views/apps/app_info_dialog/app_info_permissions_panel.cc View 1 2 3 4 5 2 chunks +4 lines, -27 lines 0 comments Download
M ui/base/l10n/formatter.h View 1 2 3 4 5 6 7 8 9 10 11 3 chunks +10 lines, -10 lines 0 comments Download
M ui/base/l10n/formatter.cc View 1 2 3 4 5 6 7 8 9 10 11 4 chunks +52 lines, -85 lines 0 comments Download
M ui/base/l10n/l10n_util.h View 1 2 3 4 5 6 7 8 1 chunk +6 lines, -9 lines 0 comments Download
M ui/base/l10n/l10n_util.cc View 1 2 3 4 5 6 7 8 1 chunk +10 lines, -11 lines 0 comments Download
M ui/base/l10n/l10n_util_plurals.h View 1 2 3 4 2 chunks +7 lines, -5 lines 0 comments Download
M ui/base/l10n/l10n_util_plurals.cc View 1 2 3 4 1 chunk +9 lines, -37 lines 0 comments Download
M ui/base/l10n/time_format.cc View 1 2 3 4 5 6 7 8 9 10 11 3 chunks +7 lines, -7 lines 0 comments Download
M ui/base/l10n/time_format_unittest.cc View 1 2 3 4 5 4 chunks +16 lines, -16 lines 0 comments Download
M ui/strings/ui_strings.grd View 1 2 3 4 5 6 7 8 9 1 chunk +66 lines, -1510 lines 0 comments Download

Messages

Total messages: 23 (8 generated)
jungshik at Google
Can you take a look? In the latest CL, I decided to follow a convention ...
5 years, 8 months ago (2015-04-03 06:48:38 UTC) #3
tony
This looks much simpler! xtb -> pak should be fine. {} and # don't have ...
5 years, 8 months ago (2015-04-03 20:30:51 UTC) #4
jungshik at Google
On 2015/04/03 20:30:51, tony wrote: > This looks much simpler! xtb -> pak should be ...
5 years, 8 months ago (2015-04-03 22:51:59 UTC) #5
jungshik at Google
Thiemo and Sam, do you have any comment?
5 years, 8 months ago (2015-04-06 18:43:19 UTC) #6
Sam McNally
Thanks for cleaning this up! LGTM with one question. https://codereview.chromium.org/1049513002/diff/160001/ui/strings/ui_strings.grd File ui/strings/ui_strings.grd (right): https://codereview.chromium.org/1049513002/diff/160001/ui/strings/ui_strings.grd#newcode222 ui/strings/ui_strings.grd:222: ...
5 years, 8 months ago (2015-04-07 01:30:58 UTC) #7
jungshik at Google
finnur@chromium.org: Please review changes in chrome/browser/extension pkasting@chromium.org: Please review changes in chrome/browser/ui.
5 years, 8 months ago (2015-04-08 23:08:54 UTC) #9
jungshik at Google
On 2015/04/07 01:30:58, Sam McNally wrote: > Thanks for cleaning this up! LGTM with one ...
5 years, 8 months ago (2015-04-08 23:09:54 UTC) #10
Peter Kasting
LGTM, awesome
5 years, 8 months ago (2015-04-08 23:29:59 UTC) #11
Finnur
On 2015/04/08 23:29:59, Peter Kasting wrote: > LGTM, awesome Second that. Awesome! LGTM.
5 years, 8 months ago (2015-04-09 09:16:21 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1049513002/220001
5 years, 8 months ago (2015-04-09 17:31:58 UTC) #15
commit-bot: I haz the power
Try jobs failed on following builders: ios_rel_device_ninja on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios_rel_device_ninja/builds/55834)
5 years, 8 months ago (2015-04-09 17:41:19 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1049513002/240001
5 years, 8 months ago (2015-04-09 19:55:41 UTC) #20
commit-bot: I haz the power
Committed patchset #13 (id:240001)
5 years, 8 months ago (2015-04-09 21:58:22 UTC) #21
commit-bot: I haz the power
Patchset 13 (id:??) landed as https://crrev.com/3a6c36bbd58de11de968cea7c271d5516d320dce Cr-Commit-Position: refs/heads/master@{#324517}
5 years, 8 months ago (2015-04-09 21:59:15 UTC) #22
Avi (use Gerrit)
5 years, 7 months ago (2015-04-28 00:37:11 UTC) #23
Message was sent while issue was closed.
On 2015/04/09 21:59:15, I haz the power (commit-bot) wrote:
> Patchset 13 (id:??) landed as
> https://crrev.com/3a6c36bbd58de11de968cea7c271d5516d320dce
> Cr-Commit-Position: refs/heads/master@{#324517}

Holy crap! Yay!!!!!!

Powered by Google App Engine
This is Rietveld 408576698