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

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: 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 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') | no next file with comments »
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..75f6d028d51b355d94d82b5f52316215a6d4943c 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);
if (actualLocale == null) return null;
return _findExact(actualLocale);
}
« no previous file with comments | « no previous file | pkg/intl/lib/generate_localized.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698