rollback of changelist 273850130 plus rollback of follow-on fixes
*** Reason for rollback ***
Bad idea, better mechanism in cl/280009042
Note that this also includes rollbacks of the follow-on CLs
cl/274040210
cl/273863139
cl/275558653
*** Original change description ***
Canonicalize the locale in Intl.defaultLocale setter
Retrying CL 273643404, but allowing for null.
***
PiperOrigin-RevId: 280055072
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 750d93d..5fcade6 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,8 +2,6 @@
* Add an analysis_options.yaml and fix or suppress all the complaints from it.
* Add unit tests using dart:ffi to compare formatting output to ICU.
* Bump SDK requirements up to 2.5.0 for dart:ffi availability.
- * Canonicalize the locale in the Intl.defaultLocale setter, so e.g. 'en-US'
- will get turned into the correct 'en_US'
* Attempt to compensate for erratic errors in DateTime creation better, and add
tests for the compensation.
* Add a MessageFormat class. It can prepares strings for display to users,
diff --git a/lib/intl.dart b/lib/intl.dart
index 7dc6f30..f4120c7 100644
--- a/lib/intl.dart
+++ b/lib/intl.dart
@@ -99,7 +99,7 @@
}
static set defaultLocale(String newLocale) {
- _defaultLocale = newLocale == null ? null : canonicalizedLocale(newLocale);
+ _defaultLocale = newLocale;
}
static String _defaultLocale;