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

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

Issue 11953069: Make standalone (non-browser) locale detection for windows also accept short locale names (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Also update the status file Created 7 years, 11 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/test/find_default_locale_standalone_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/intl/lib/intl_standalone.dart
diff --git a/pkg/intl/lib/intl_standalone.dart b/pkg/intl/lib/intl_standalone.dart
index cce7722eead2d850eb85bba473e682789d92e7ba..fc22cf965dea8931ea0ac99379b989e402139010 100644
--- a/pkg/intl/lib/intl_standalone.dart
+++ b/pkg/intl/lib/intl_standalone.dart
@@ -52,7 +52,7 @@ Future<String> findSystemLocale() {
* Regular expression to match the expected output of systeminfo on
* Windows. e.g. System Locale:<tab>en_US;English (United States)
*/
-RegExp _sysInfoRegex = new RegExp(r"System Locale:\s+(\w\w-\w+);");
+RegExp sysInfoRegex = new RegExp(r"System Locale:\s+((\w\w;)|(\w\w-\w+;))");
/**
* Regular expression to match the expected output of reading the defaults
@@ -62,7 +62,7 @@ RegExp _sysInfoRegex = new RegExp(r"System Locale:\s+(\w\w-\w+);");
* "pt-PT",
* ...
*/
-RegExp _appleDefaultsRegex = new RegExp(r'(\w\w_\w+)');
+RegExp _appleDefaultsRegex = new RegExp(r'((\w\w)_\w+)');
/**
* Check to see if we have a "LANG" environment variable we can use and return
@@ -90,7 +90,7 @@ Future _getAppleDefaults() {
*/
Future _getWindowsSystemInfo() {
var p = Process.run('systeminfo', []);
- var myResult = p.then((result) => _checkResult(result, _sysInfoRegex));
+ var myResult = p.then((result) => _checkResult(result, sysInfoRegex));
return myResult;
}
« no previous file with comments | « no previous file | pkg/intl/test/find_default_locale_standalone_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698