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

Unified Diff: pkg/intl/example/basic/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: 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | pkg/intl/lib/generate_localized.dart » ('j') | pkg/intl/test/intl_test.dart » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/intl/example/basic/messages_all.dart
diff --git a/pkg/intl/example/basic/messages_all.dart b/pkg/intl/example/basic/messages_all.dart
index 9265784b78d696baa7d1e632ad62d68336f54a07..b47c053922517023421852a67bbff802b87ec2d4 100644
--- a/pkg/intl/example/basic/messages_all.dart
+++ b/pkg/intl/example/basic/messages_all.dart
@@ -32,7 +32,8 @@ initializeMessages(localeName) {
}
MessageLookupByLibrary _findGeneratedMessagesFor(locale) {
- var actualLocale = Intl.verifiedLocale(locale, (x) => _findExact(x) != null);
+ var actualLocale = Intl.verifiedLocale(locale, (x) => _findExact(x) != null,
+ onFailure: (_) => null);
Emily Fortuna 2014/02/25 19:16:36 tabs alert!
Alan Knight 2014/02/25 19:18:55 Done.
if (actualLocale == null) return null;
return _findExact(actualLocale);
}
« no previous file with comments | « no previous file | pkg/intl/lib/generate_localized.dart » ('j') | pkg/intl/test/intl_test.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698