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

Issue 13814018: Make use of the patterns in Intl number formatting (Closed)

Created:
7 years, 8 months ago by Alan Knight
Modified:
7 years, 8 months ago
Reviewers:
Emily Fortuna
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Make use of the patterns in Intl number formatting This adds code to parse and use the information from the pattern string used to create a NumberFormat. It adds tests taken from the Closure tests and also tests comparing a simple format to the ICU output for a large set of locales. In addition it has changes to - part number_format.dart in intl.dart rather than having it as a separate library - Update the algorithm to incorporate some additions in Closure - Allow setting a few of the internal parameters, which the Closure tests wanted to use - Add named constructors for the standard formats, e.g. DECIMAL_FORMAT - Access _defaultLocale consistently via the getCurrentLocale() method rather than directly, so it can never be uninitialized. - Regenerated the locale data Committed: https://code.google.com/p/dart/source/detail?r=21166

Patch Set 1 #

Patch Set 2 : Don't always initialize _defaultLocale #

Total comments: 3

Patch Set 3 : Addressing review comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1362 lines, -216 lines) Patch
M pkg/intl/lib/intl.dart View 1 3 chunks +5 lines, -3 lines 0 comments Download
M pkg/intl/lib/number_format.dart View 1 2 11 chunks +499 lines, -43 lines 0 comments Download
M pkg/intl/lib/number_symbols.dart View 1 chunk +0 lines, -1 line 0 comments Download
M pkg/intl/lib/number_symbols_data.dart View 49 chunks +157 lines, -157 lines 0 comments Download
A pkg/intl/test/number_closure_test.dart View 1 2 1 chunk +388 lines, -0 lines 0 comments Download
M pkg/intl/test/number_format_test.dart View 1 2 3 chunks +61 lines, -12 lines 0 comments Download
A pkg/intl/test/number_test_data.dart View 1 chunk +252 lines, -0 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
Alan Knight
7 years, 8 months ago (2013-04-09 18:27:34 UTC) #1
Emily Fortuna
lgtm! whew! :-) https://codereview.chromium.org/13814018/diff/2001/pkg/intl/lib/number_format.dart File pkg/intl/lib/number_format.dart (right): https://codereview.chromium.org/13814018/diff/2001/pkg/intl/lib/number_format.dart#newcode131 pkg/intl/lib/number_format.dart:131: NumberFormat.DECIMAL_PATTERN([String locale]) : personal preference: I'd ...
7 years, 8 months ago (2013-04-09 19:39:15 UTC) #2
Alan Knight
https://codereview.chromium.org/13814018/diff/2001/pkg/intl/lib/number_format.dart File pkg/intl/lib/number_format.dart (right): https://codereview.chromium.org/13814018/diff/2001/pkg/intl/lib/number_format.dart#newcode546 pkg/intl/lib/number_format.dart:546: throw new FormatException('Too many percent/permill'); On 2013/04/09 19:39:15, Emily ...
7 years, 8 months ago (2013-04-09 19:58:27 UTC) #3
Alan Knight
7 years, 8 months ago (2013-04-09 19:58:48 UTC) #4
Message was sent while issue was closed.
Committed patchset #3 manually as r21166 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698