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

Side by Side Diff: pkg/intl/example/basic/messages_all.dart

Issue 14070010: Refactor Future constructors. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Added co19 issue number. Created 7 years, 8 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/http/test/multipart_test.dart ('k') | pkg/intl/lib/date_symbol_data_local.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 imports all of the different message libraries and provides an 6 * This imports all of the different message libraries and provides an
7 * [initializeMessages] function that sets up the lookup for a particular 7 * [initializeMessages] function that sets up the lookup for a particular
8 * library. 8 * library.
9 */ 9 */
10 library messages_all; 10 library messages_all;
(...skipping 10 matching lines...) Expand all
21 switch (localeName) { 21 switch (localeName) {
22 case 'th_TH' : return th_TH.messages; 22 case 'th_TH' : return th_TH.messages;
23 case 'de' : return de.messages; 23 case 'de' : return de.messages;
24 default: return null; 24 default: return null;
25 } 25 }
26 } 26 }
27 27
28 initializeMessages(localeName) { 28 initializeMessages(localeName) {
29 initializeInternalMessageLookup(() => new CompositeMessageLookup()); 29 initializeInternalMessageLookup(() => new CompositeMessageLookup());
30 messageLookup.addLocale(localeName, _findGeneratedMessagesFor); 30 messageLookup.addLocale(localeName, _findGeneratedMessagesFor);
31 return new Future.immediate(null); 31 return new Future.value();
32 } 32 }
33 33
34 MessageLookupByLibrary _findGeneratedMessagesFor(locale) { 34 MessageLookupByLibrary _findGeneratedMessagesFor(locale) {
35 var actualLocale = Intl.verifiedLocale(locale, (x) => _findExact(x) != null); 35 var actualLocale = Intl.verifiedLocale(locale, (x) => _findExact(x) != null);
36 if (actualLocale == null) return null; 36 if (actualLocale == null) return null;
37 return _findExact(actualLocale); 37 return _findExact(actualLocale);
38 } 38 }
OLDNEW
« no previous file with comments | « pkg/http/test/multipart_test.dart ('k') | pkg/intl/lib/date_symbol_data_local.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698