Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 /** | |
| 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 | |
| 4 * delegating to the appropriate library. | |
| 5 */ | |
| 6 | |
| 7 library messages_all; | |
| 8 | |
| 9 import 'dart:async'; | |
| 10 import 'package:intl/message_lookup_by_library.dart'; | |
| 11 import 'package:intl/src/intl_helpers.dart'; | |
| 12 import 'package:intl/intl.dart'; | |
| 13 | |
| 14 import 'foo_messages_fr.dart' as fr; | |
| 15 import 'foo_messages_de_DE.dart' as de_DE; | |
| 16 | |
| 17 | |
| 18 MessageLookupByLibrary _findExact(localeName) { | |
| 19 switch (localeName) { | |
| 20 case 'fr' : return fr.messages; | |
| 21 case 'de_DE' : return de_DE.messages; | |
| 22 default: return null; | |
| 23 } | |
| 24 } | |
| 25 | |
| 26 /** User programs should call this before using [localeName] for messages.*/ | |
| 27 Future initializeMessages(String localeName) { | |
| 28 initializeInternalMessageLookup(() => new CompositeMessageLookup()); | |
| 29 messageLookup.addLocale(localeName, _findGeneratedMessagesFor); | |
| 30 // var lib = deferredLibraries[localeName]; | |
| 31 // TODO(alanknight): Restore once Issue 12824 is fixed. | |
|
Emily Fortuna
2013/08/29 20:24:15
long line here?
Also, should the TODO start one l
Alan Knight
2013/08/29 20:39:50
Odd. Both done.
| |
| 32 // return lib == null ? new Future.value(false) : lib.load(); | |
| 33 return new Future.value(true); | |
| 34 } | |
| 35 | |
| 36 MessageLookupByLibrary _findGeneratedMessagesFor(locale) { | |
| 37 var actualLocale = Intl.verifiedLocale(locale, (x) => _findExact(x) != null); | |
| 38 if (actualLocale == null) return null; | |
| 39 return _findExact(actualLocale); | |
| 40 } | |
| OLD | NEW |