commit | 6a2dd2bcfe9fbc8b2f52b9a6ba5b0954f4ab4893 | [log] [tgz] |
---|---|---|
author | jshin <jshin@chromium.org> | Fri Aug 07 19:11:09 2015 +0900 |
committer | Qijiang Fan <fqj@google.com> | Thu Jun 04 19:25:13 2020 +0900 |
tree | eb94679d5320c20370d92f63937841095c932ccd | |
parent | 8115a59ce0e5881ecb304cd6f6943e3700ce6560 [diff] |
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*" Review URL: https://codereview.chromium.org/1140153005 Cr-Commit-Position: refs/heads/master@{#342327} CrOS-Libchrome-Original-Commit: 8b581d8b638951f98c0fb0c0116ac18b355b825e