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

Side by Side Diff: pkg/intl/lib/intl_standalone.dart

Issue 11312203: "Reverting 14829-14832" (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « pkg/intl/lib/date_format.dart ('k') | pkg/intl/lib/src/date_format_helpers.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 /** 5 /**
6 * This provides facilities for Internationalization that are only available 6 * This provides facilities for Internationalization that are only available
7 * when running standalone. You should import only one of this or 7 * when running standalone. You should import only one of this or
8 * intl_browser.dart. Right now the only thing provided here is finding 8 * intl_browser.dart. Right now the only thing provided here is finding
9 * the operating system locale. 9 * the operating system locale.
10 */ 10 */
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 return _getAppleDefaults(); 44 return _getAppleDefaults();
45 } 45 }
46 // We can't find anything, don't set the system locale and return null. 46 // We can't find anything, don't set the system locale and return null.
47 return new Future.immediate(null); 47 return new Future.immediate(null);
48 } 48 }
49 49
50 /** 50 /**
51 * Regular expression to match the expected output of systeminfo on 51 * Regular expression to match the expected output of systeminfo on
52 * Windows. e.g. System Locale:<tab>en_US;English (United States) 52 * Windows. e.g. System Locale:<tab>en_US;English (United States)
53 */ 53 */
54 RegExp _sysInfoRegex = new RegExp(r"System Locale:\s+(\w\w-\w+);"); 54 RegExp _sysInfoRegex = const RegExp(r"System Locale:\s+(\w\w-\w+);");
55 55
56 /** 56 /**
57 * Regular expression to match the expected output of reading the defaults 57 * Regular expression to match the expected output of reading the defaults
58 * database for AppleLanguages on Mac systems. 58 * database for AppleLanguages on Mac systems.
59 * e.g. { 59 * e.g. {
60 * en, 60 * en,
61 * "pt-PT", 61 * "pt-PT",
62 * ... 62 * ...
63 */ 63 */
64 RegExp _appleDefaultsRegex = new RegExp(r'(\w\w_\w+)'); 64 RegExp _appleDefaultsRegex = const RegExp(r'(\w\w_\w+)');
65 65
66 /** 66 /**
67 * Check to see if we have a "LANG" environment variable we can use and return 67 * Check to see if we have a "LANG" environment variable we can use and return
68 * it if found. Otherwise return null; 68 * it if found. Otherwise return null;
69 */ 69 */
70 String _checkEnvironmentVariable() { 70 String _checkEnvironmentVariable() {
71 try { 71 try {
72 return Platform.environment['LANG']; 72 return Platform.environment['LANG'];
73 } catch (e) {}; 73 } catch (e) {};
74 return null; 74 return null;
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 return new Future.immediate(locale); 107 return new Future.immediate(locale);
108 } 108 }
109 109
110 /** 110 /**
111 * Set [Intl.systemLocale] to be the canonicalizedLocale of [aLocale]. 111 * Set [Intl.systemLocale] to be the canonicalizedLocale of [aLocale].
112 */ 112 */
113 Future<String> _setLocale(aLocale) { 113 Future<String> _setLocale(aLocale) {
114 Intl.systemLocale = Intl.canonicalizedLocale(aLocale); 114 Intl.systemLocale = Intl.canonicalizedLocale(aLocale);
115 return new Future.immediate(Intl.systemLocale); 115 return new Future.immediate(Intl.systemLocale);
116 } 116 }
OLDNEW
« no previous file with comments | « pkg/intl/lib/date_format.dart ('k') | pkg/intl/lib/src/date_format_helpers.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698