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

Unified Diff: pkg/intl/lib/intl.dart

Issue 13814018: Make use of the patterns in Intl number formatting (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Addressing review comments Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | pkg/intl/lib/number_format.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/intl/lib/intl.dart
diff --git a/pkg/intl/lib/intl.dart b/pkg/intl/lib/intl.dart
index c3cbdd574cb0e36b2572aecbf504fcc8da63af86..9a9c5298a8bf564790e893ebe93e2706fb17b6ac 100644
--- a/pkg/intl/lib/intl.dart
+++ b/pkg/intl/lib/intl.dart
@@ -21,12 +21,15 @@ import 'src/intl_helpers.dart';
import 'dart:math';
import 'date_symbols.dart';
import 'src/date_format_internal.dart';
+import "number_symbols.dart";
+import "number_symbols_data.dart";
part 'date_format.dart';
part 'src/date_format_field.dart';
part 'src/date_format_helpers.dart';
part 'bidi_formatter.dart';
part 'bidi_utils.dart';
+part 'number_format.dart';
/**
* The Intl class provides a common entry point for internationalization
@@ -170,7 +173,7 @@ class Intl {
// difficult. As a result, we call this more often. Consider keeping
// verified locales for each purpose if it turns out to be a performance
// issue.
- if (newLocale == null) return systemLocale;
+ if (newLocale == null) return getCurrentLocale();
if (localeExists(newLocale)) {
return newLocale;
}
@@ -244,8 +247,7 @@ class Intl {
// We have to do this silliness because Locale is not known at compile time,
// but must be a static variable in order to be visible to the Intl.message
// invocation.
- if (_defaultLocale == null) _defaultLocale = systemLocale;
- var oldLocale = _defaultLocale;
+ var oldLocale = getCurrentLocale();
_defaultLocale = locale;
var result = message_function();
_defaultLocale = oldLocale;
« no previous file with comments | « no previous file | pkg/intl/lib/number_format.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698