Put back the call to verifiedLocale which was removed in cl/122840834
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=122867372
diff --git a/lib/generate_localized.dart b/lib/generate_localized.dart
index ce1b954..b302f45 100644
--- a/lib/generate_localized.dart
+++ b/lib/generate_localized.dart
@@ -176,10 +176,16 @@
var load = lib == null ? new Future.value(false) : lib();
return load.then((_) {
initializeInternalMessageLookup(() => new CompositeMessageLookup());
- messageLookup.addLocale(localeName, _findExact);
+ messageLookup.addLocale(localeName, _findGeneratedMessagesFor);
});
}
+MessageLookupByLibrary _findGeneratedMessagesFor(locale) {
+ var actualLocale = Intl.verifiedLocale(locale, (x) => _findExact(x) != null,
+ onFailure: (_) => null);
+ if (actualLocale == null) return null;
+ return _findExact(actualLocale);
+}
""";
}