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

Issue 1140153005: ICU msg format support with more than one arguments (Closed)

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

Description

Add ICU message format support Adopt and customize a ICU message format wrapper used at Google to meet Chromium's need. This will enable formatting of 'complex messages' requiring plural and/or selector (e.g. gender or 'single vs multiple') support with more than one parameters. Besides, l10n_util::GetPluralStringF* is rewritten to use this API. I'm also planning to use this API to add a similar support to Chromium's JavaScript-based UI and extensions. References: MessageFormat specs: http://icu-project.org/apiref/icu4j/com/ibm/icu/text/MessageFormat.html http://icu-project.org/apiref/icu4c/classicu_1_1DecimalFormat.html#details Examples: http://userguide.icu-project.org/formatparse/messages message_formatter_unittest.cc go/plurals inside Google. BUG=481734 TEST=base_unittests --gtest_filter="MessageFormat*" Committed: https://crrev.com/8b581d8b638951f98c0fb0c0116ac18b355b825e Cr-Commit-Position: refs/heads/master@{#342327}

Patch Set 1 #

Patch Set 2 : update #

Patch Set 3 : test now fixed #

Patch Set 4 : use the api #

Patch Set 5 : one more string #

Patch Set 6 : tests added with date,time, & number #

Patch Set 7 : clean up #

Patch Set 8 : rebased to ToT #

Patch Set 9 : fix error in ssl_info #

Patch Set 10 : clean up. add test for formatting double #

Patch Set 11 : ws clean-up #

Patch Set 12 : fix GN build #

Patch Set 13 : l10n_util_plural removed #

Patch Set 14 : fix compile failure #

Patch Set 15 : a few more strings #

Patch Set 16 : return the result directly instead of via an out param #

Patch Set 17 : extensions/browser: dependency made explicit/added : base_i18n #

Patch Set 18 : fix dependency - browser/extensions/api #

Patch Set 19 : icu directly listed in deps #

Patch Set 20 : drop unnecessary dep. on base_i18n from api_registration #

Total comments: 39

Patch Set 21 : review comments addressed #

Total comments: 22

Patch Set 22 : Ryan's comments pt #1 #

Patch Set 23 : Ryan's comments - GN and gtest #

Patch Set 24 : drop explicit icu dep from extension/browser and use uversion instead of utype header #

Total comments: 4

Patch Set 25 : comments addressed #

Total comments: 1

Patch Set 26 : hdr guard style fix #

Total comments: 2

Patch Set 27 : Mark's review comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+535 lines, -138 lines) Patch
M base/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 3 chunks +6 lines, -1 line 0 comments Download
M base/base.gyp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 2 chunks +3 lines, -0 lines 0 comments Download
M base/base.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +2 lines, -0 lines 0 comments Download
A base/i18n/message_formatter.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 1 chunk +111 lines, -0 lines 0 comments Download
A base/i18n/message_formatter.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 1 chunk +141 lines, -0 lines 0 comments Download
A base/i18n/message_formatter_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 1 chunk +180 lines, -0 lines 0 comments Download
M chrome/app/generated_resources.grd View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +8 lines, -4 lines 0 comments Download
M chrome/browser/ssl/ssl_error_info.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +8 lines, -11 lines 0 comments Download
M extensions/browser/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 1 chunk +1 line, -0 lines 0 comments Download
M extensions/browser/api/device_permissions_prompt.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 4 chunks +8 lines, -10 lines 0 comments Download
M extensions/extensions.gyp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 18 19 20 21 22 23 1 chunk +1 line, -0 lines 0 comments Download
M extensions/extensions_strings.grd View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +15 lines, -17 lines 0 comments Download
M ui/base/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +0 lines, -2 lines 0 comments Download
M ui/base/l10n/formatter.cc View 1 2 3 4 5 6 7 8 9 10 11 12 5 chunks +35 lines, -8 lines 0 comments Download
M ui/base/l10n/l10n_util.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +7 lines, -0 lines 0 comments Download
M ui/base/l10n/l10n_util.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 3 chunks +9 lines, -14 lines 0 comments Download
M ui/base/l10n/l10n_util_plurals.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +0 lines, -32 lines 0 comments Download
M ui/base/l10n/l10n_util_plurals.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +0 lines, -37 lines 0 comments Download
M ui/base/ui_base.gyp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +0 lines, -2 lines 0 comments Download

Messages

Total messages: 75 (32 generated)
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1140153005/200001
5 years, 5 months ago (2015-07-09 23:37:02 UTC) #2
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: linux_chromium_gn_rel on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_gn_rel/builds/108077) (exceeded global ...
5 years, 5 months ago (2015-07-09 23:57:16 UTC) #4
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1140153005/220001
5 years, 5 months ago (2015-07-10 00:22:25 UTC) #6
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
5 years, 5 months ago (2015-07-10 02:28:44 UTC) #8
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1140153005/240001
5 years, 5 months ago (2015-07-14 20:18:23 UTC) #10
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: mac_chromium_rel_ng on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_ng/builds/87280) win8_chromium_ng on ...
5 years, 5 months ago (2015-07-14 20:26:10 UTC) #12
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1140153005/260001
5 years, 5 months ago (2015-07-14 23:53:13 UTC) #14
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
5 years, 5 months ago (2015-07-15 01:03:15 UTC) #16
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1140153005/300001
5 years, 5 months ago (2015-07-17 21:14:22 UTC) #18
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: linux_chromium_chromeos_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_chromeos_rel_ng/builds/79946) linux_chromium_gn_rel on ...
5 years, 5 months ago (2015-07-17 21:41:48 UTC) #20
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1140153005/320001
5 years, 5 months ago (2015-07-18 00:25:53 UTC) #24
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: mac_chromium_rel_ng on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_ng/builds/88860)
5 years, 5 months ago (2015-07-18 00:40:14 UTC) #26
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1140153005/360001
5 years, 5 months ago (2015-07-22 19:17:20 UTC) #28
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: linux_chromium_gn_chromeos_rel on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_gn_chromeos_rel/builds/60727) linux_chromium_gn_dbg on ...
5 years, 5 months ago (2015-07-22 19:22:35 UTC) #30
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1140153005/380001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1140153005/380001
5 years, 4 months ago (2015-07-28 17:08:12 UTC) #32
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
5 years, 4 months ago (2015-07-28 18:35:24 UTC) #34
jungshik at Google
Can you take a look? Thanks avi: new functions in base/i18n, ui/base/l10n thakis : build ...
5 years, 4 months ago (2015-07-30 18:04:37 UTC) #36
Reilly Grant (use Gerrit)
https://codereview.chromium.org/1140153005/diff/380001/ui/base/l10n/l10n_util.h File ui/base/l10n/l10n_util.h (right): https://codereview.chromium.org/1140153005/diff/380001/ui/base/l10n/l10n_util.h#newcode176 ui/base/l10n/l10n_util.h:176: UI_BASE_EXPORT base::string16 GetSingleOrMultipleStringFUTF16(int message_id, I'm confused why a number ...
5 years, 4 months ago (2015-07-30 18:10:09 UTC) #37
Avi (use Gerrit)
lgtm with nits. https://codereview.chromium.org/1140153005/diff/380001/base/i18n/message_formatter.cc File base/i18n/message_formatter.cc (right): https://codereview.chromium.org/1140153005/diff/380001/base/i18n/message_formatter.cc#newcode12 base/i18n/message_formatter.cc:12: one blank line https://codereview.chromium.org/1140153005/diff/380001/base/i18n/message_formatter.cc#newcode21 base/i18n/message_formatter.cc:21: } ...
5 years, 4 months ago (2015-07-30 19:19:49 UTC) #38
Reilly Grant (use Gerrit)
https://codereview.chromium.org/1140153005/diff/380001/extensions/extensions_strings.grd File extensions/extensions_strings.grd (right): https://codereview.chromium.org/1140153005/diff/380001/extensions/extensions_strings.grd#newcode371 extensions/extensions_strings.grd:371: multiple {The application "<ph name="APP_NAME">{1}<ex>Chrome Dev Editor</ex></ph>" is requesting ...
5 years, 4 months ago (2015-07-30 19:22:07 UTC) #39
Ryan Sleevi
ssl_info LGTM % a series of API concerns & nits. https://codereview.chromium.org/1140153005/diff/380001/base/i18n/message_formatter.cc File base/i18n/message_formatter.cc (right): https://codereview.chromium.org/1140153005/diff/380001/base/i18n/message_formatter.cc#newcode42 ...
5 years, 4 months ago (2015-07-30 23:21:51 UTC) #40
jungshik at Google
Thanks a lot for reviewing and comments. I believe I addressed them all. Can you ...
5 years, 4 months ago (2015-07-31 21:36:16 UTC) #41
Reilly Grant (use Gerrit)
//extensions lgtm
5 years, 4 months ago (2015-07-31 22:00:16 UTC) #42
Ryan Sleevi
A few more comments about the build system - you may want to have brettw ...
5 years, 4 months ago (2015-07-31 22:19:36 UTC) #43
jungshik at Google
Ryan, thanks a lot for review/comments. I took care of them. Can you go over ...
5 years, 4 months ago (2015-08-01 14:00:58 UTC) #45
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1140153005/460001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1140153005/460001
5 years, 4 months ago (2015-08-01 14:17:00 UTC) #47
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
5 years, 4 months ago (2015-08-01 16:33:02 UTC) #49
Ryan Sleevi
LGTM % new nits :) https://codereview.chromium.org/1140153005/diff/400001/base/base.gyp File base/base.gyp (right): https://codereview.chromium.org/1140153005/diff/400001/base/base.gyp#newcode290 base/base.gyp:290: 'base', On 2015/08/01 14:00:58, ...
5 years, 4 months ago (2015-08-03 08:01:41 UTC) #50
jungshik at Google
Thanks again. Two nits are fixed in the updated PS. On 2015/08/03 08:01:41, Ryan Sleevi ...
5 years, 4 months ago (2015-08-03 20:18:58 UTC) #51
jungshik at Google
Thanks, Ryan. Brett, do you have any comment on build (GN) change (see Ryan's comment ...
5 years, 4 months ago (2015-08-03 20:32:19 UTC) #52
brettw
build changes seem correct https://codereview.chromium.org/1140153005/diff/470001/base/i18n/message_formatter.h File base/i18n/message_formatter.h (right): https://codereview.chromium.org/1140153005/diff/470001/base/i18n/message_formatter.h#newcode109 base/i18n/message_formatter.h:109: #endif Blank line before this, ...
5 years, 4 months ago (2015-08-04 17:04:19 UTC) #53
jungshik at Google
On 2015/08/04 17:04:19, brettw wrote: > build changes seem correct Thanks. > > https://codereview.chromium.org/1140153005/diff/470001/base/i18n/message_formatter.h > ...
5 years, 4 months ago (2015-08-04 17:13:55 UTC) #54
jungshik at Google
Brett, can you approve base/* (including build conf) changes? Thanks On 2015/08/04 17:13:55, jungshik at ...
5 years, 4 months ago (2015-08-04 18:32:10 UTC) #55
jungshik at Google
Turned out that Brett is not a base/ owner. Mark, can you take a look ...
5 years, 4 months ago (2015-08-05 19:15:46 UTC) #57
Mark Mentovai
LGTM in base. https://codereview.chromium.org/1140153005/diff/490001/base/i18n/message_formatter.h File base/i18n/message_formatter.h (right): https://codereview.chromium.org/1140153005/diff/490001/base/i18n/message_formatter.h#newcode14 base/i18n/message_formatter.h:14: // For versioned icu namespace Kinda ...
5 years, 4 months ago (2015-08-06 18:56:42 UTC) #58
jungshik at Google
Thanks a lot for the review, Mark. The latest PS (being uploaded) addressed your comments. ...
5 years, 4 months ago (2015-08-06 21:49:56 UTC) #59
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1140153005/510001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1140153005/510001
5 years, 4 months ago (2015-08-06 21:53:53 UTC) #65
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_x64_rel_ng on tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_x64_rel_ng/builds/87697)
5 years, 4 months ago (2015-08-06 22:57:07 UTC) #67
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1140153005/510001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1140153005/510001
5 years, 4 months ago (2015-08-06 23:38:14 UTC) #69
commit-bot: I haz the power
Try jobs failed on following builders: mac_chromium_10.10_rel_ng on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_10.10_rel_ng/builds/2907)
5 years, 4 months ago (2015-08-07 02:43:56 UTC) #71
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1140153005/510001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1140153005/510001
5 years, 4 months ago (2015-08-07 10:06:32 UTC) #73
commit-bot: I haz the power
Committed patchset #27 (id:510001)
5 years, 4 months ago (2015-08-07 10:11:18 UTC) #74
commit-bot: I haz the power
5 years, 4 months ago (2015-08-07 10:11:57 UTC) #75
Message was sent while issue was closed.
Patchset 27 (id:??) landed as
https://crrev.com/8b581d8b638951f98c0fb0c0116ac18b355b825e
Cr-Commit-Position: refs/heads/master@{#342327}

Powered by Google App Engine
This is Rietveld 408576698