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

Side by Side Diff: pkg/intl/test/message_extraction/foo_messages_all.dart

Issue 179783004: Verify the default locale in case we're given an invalid one and need to fall back. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Review fixes Created 6 years, 10 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « pkg/intl/test/intl_test.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /** 1 /**
2 * DO NOT EDIT. This is code generated via pkg/intl/generate_localized.dart 2 * DO NOT EDIT. This is code generated via pkg/intl/generate_localized.dart
3 * This is a library that looks up messages for specific locales by 3 * This is a library that looks up messages for specific locales by
4 * delegating to the appropriate library. 4 * delegating to the appropriate library.
5 */ 5 */
6 6
7 library messages_all; 7 library messages_all;
8 8
9 import 'dart:async'; 9 import 'dart:async';
10 import 'package:intl/message_lookup_by_library.dart'; 10 import 'package:intl/message_lookup_by_library.dart';
(...skipping 16 matching lines...) Expand all
27 Future initializeMessages(String localeName) { 27 Future initializeMessages(String localeName) {
28 initializeInternalMessageLookup(() => new CompositeMessageLookup()); 28 initializeInternalMessageLookup(() => new CompositeMessageLookup());
29 messageLookup.addLocale(localeName, _findGeneratedMessagesFor); 29 messageLookup.addLocale(localeName, _findGeneratedMessagesFor);
30 // TODO(alanknight): Restore once Issue 12824 is fixed. 30 // TODO(alanknight): Restore once Issue 12824 is fixed.
31 // var lib = deferredLibraries[localeName]; 31 // var lib = deferredLibraries[localeName];
32 // return lib == null ? new Future.value(false) : lib.load(); 32 // return lib == null ? new Future.value(false) : lib.load();
33 return new Future.value(true); 33 return new Future.value(true);
34 } 34 }
35 35
36 MessageLookupByLibrary _findGeneratedMessagesFor(locale) { 36 MessageLookupByLibrary _findGeneratedMessagesFor(locale) {
37 var actualLocale = Intl.verifiedLocale(locale, (x) => _findExact(x) != null); 37 var actualLocale = Intl.verifiedLocale(locale, (x) => _findExact(x) != null,
38 onFailure: (_) => null);
38 if (actualLocale == null) return null; 39 if (actualLocale == null) return null;
39 return _findExact(actualLocale); 40 return _findExact(actualLocale);
40 } 41 }
OLDNEW
« no previous file with comments | « pkg/intl/test/intl_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698