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

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

Issue 12038073: Remove the code that attempts to find a locale from the command line VM in Windows. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Switch back to having test in 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 fc22cf965dea8931ea0ac99379b989e402139010..e40126ff5d2af02872044ce6de0482ba6ca0e464 100644
--- a/pkg/intl/lib/intl_standalone.dart
+++ b/pkg/intl/lib/intl_standalone.dart
@@ -35,12 +35,10 @@ import "intl.dart";
Future<String> findSystemLocale() {
// On *nix systems we expect this is an environment variable, which is the
// easiest thing to check. On a Mac the environment variable may be present
- // so always check it first.
+ // so always check it first. We have no mechanism for this right now on
+ // Windows, so it will just fail.
String baseLocale = _checkEnvironmentVariable();
if (baseLocale != null) return _setLocale(baseLocale);
- if (Platform.operatingSystem == 'windows') {
- return _getWindowsSystemInfo();
- }
if (Platform.operatingSystem == 'macos') {
return _getAppleDefaults();
}
@@ -49,12 +47,6 @@ 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\w-\w+;))");
-
-/**
* Regular expression to match the expected output of reading the defaults
* database for AppleLanguages on Mac systems.
* e.g. {
@@ -86,15 +78,6 @@ Future _getAppleDefaults() {
}
/**
- * Run the "systemlocale" command and return the output in a future.
- */
-Future _getWindowsSystemInfo() {
- var p = Process.run('systeminfo', []);
- var myResult = p.then((result) => _checkResult(result, sysInfoRegex));
- return myResult;
-}
-
-/**
* Given [result], find its text and extract the locale from it using
* [regex], and set it as the system locale. If the process didn't run correctly
* then don't set the variable and return a future that completes with null.
« 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