2020-01-20 08:50:49 +00:00
|
|
|
// DO NOT EDIT. This is code generated via package:intl/generate_localized.dart
|
|
|
|
// This is a library that looks up messages for specific locales by
|
|
|
|
// delegating to the appropriate library.
|
|
|
|
|
|
|
|
// Ignore issues from commonly used lints in this file.
|
|
|
|
// ignore_for_file:implementation_imports, file_names, unnecessary_new
|
|
|
|
// ignore_for_file:unnecessary_brace_in_string_interps, directives_ordering
|
|
|
|
// ignore_for_file:argument_type_not_assignable, invalid_assignment
|
|
|
|
// ignore_for_file:prefer_single_quotes, prefer_generic_function_type_aliases
|
|
|
|
// ignore_for_file:comment_references
|
|
|
|
|
|
|
|
import 'dart:async';
|
|
|
|
|
|
|
|
import 'package:intl/intl.dart';
|
|
|
|
import 'package:intl/message_lookup_by_library.dart';
|
|
|
|
import 'package:intl/src/intl_helpers.dart';
|
|
|
|
|
2020-06-26 08:13:48 +00:00
|
|
|
import 'messages_cs.dart' as messages_cs;
|
2020-05-09 09:49:17 +00:00
|
|
|
import 'messages_de.dart' as messages_de;
|
2020-06-26 08:13:48 +00:00
|
|
|
import 'messages_es.dart' as messages_es;
|
2020-09-08 08:55:32 +00:00
|
|
|
import 'messages_et.dart' as messages_et;
|
2020-09-19 13:29:12 +00:00
|
|
|
import 'messages_eu.dart' as messages_eu;
|
2020-05-17 08:18:31 +00:00
|
|
|
import 'messages_fr.dart' as messages_fr;
|
2020-07-21 08:53:21 +00:00
|
|
|
import 'messages_gl.dart' as messages_gl;
|
|
|
|
import 'messages_hr.dart' as messages_hr;
|
2020-05-09 05:19:29 +00:00
|
|
|
import 'messages_hu.dart' as messages_hu;
|
2020-08-16 10:54:43 +00:00
|
|
|
import 'messages_hy.dart' as messages_hy;
|
2020-07-21 08:53:21 +00:00
|
|
|
import 'messages_ja.dart' as messages_ja;
|
2020-05-09 09:49:17 +00:00
|
|
|
import 'messages_messages.dart' as messages_messages;
|
2020-05-09 13:29:31 +00:00
|
|
|
import 'messages_pl.dart' as messages_pl;
|
2020-07-21 08:53:21 +00:00
|
|
|
import 'messages_ru.dart' as messages_ru;
|
2020-06-26 08:13:48 +00:00
|
|
|
import 'messages_sk.dart' as messages_sk;
|
2020-08-16 10:54:43 +00:00
|
|
|
import 'messages_tr.dart' as messages_tr;
|
2020-07-23 09:38:07 +00:00
|
|
|
import 'messages_uk.dart' as messages_uk;
|
2020-09-03 09:44:42 +00:00
|
|
|
import 'messages_zh_Hans.dart' as messages_zh_hans;
|
2020-01-20 08:50:49 +00:00
|
|
|
|
|
|
|
typedef Future<dynamic> LibraryLoader();
|
|
|
|
Map<String, LibraryLoader> _deferredLibraries = {
|
2020-06-26 08:13:48 +00:00
|
|
|
'cs': () => new Future.value(null),
|
2020-05-09 09:49:17 +00:00
|
|
|
'de': () => new Future.value(null),
|
2020-06-26 08:13:48 +00:00
|
|
|
'es': () => new Future.value(null),
|
2020-09-08 08:55:32 +00:00
|
|
|
'et': () => new Future.value(null),
|
2020-09-19 13:29:12 +00:00
|
|
|
'eu': () => new Future.value(null),
|
2020-05-17 08:18:31 +00:00
|
|
|
'fr': () => new Future.value(null),
|
2020-07-21 08:53:21 +00:00
|
|
|
'gl': () => new Future.value(null),
|
|
|
|
'hr': () => new Future.value(null),
|
2020-05-09 05:19:29 +00:00
|
|
|
'hu': () => new Future.value(null),
|
2020-08-16 10:54:43 +00:00
|
|
|
'hy': () => new Future.value(null),
|
2020-07-21 08:53:21 +00:00
|
|
|
'ja': () => new Future.value(null),
|
2020-05-09 09:49:17 +00:00
|
|
|
'messages': () => new Future.value(null),
|
2020-05-09 13:29:31 +00:00
|
|
|
'pl': () => new Future.value(null),
|
2020-07-21 08:53:21 +00:00
|
|
|
'ru': () => new Future.value(null),
|
2020-06-26 08:13:48 +00:00
|
|
|
'sk': () => new Future.value(null),
|
2020-08-16 10:54:43 +00:00
|
|
|
'tr': () => new Future.value(null),
|
2020-07-23 09:38:07 +00:00
|
|
|
'uk': () => new Future.value(null),
|
2020-09-03 09:44:42 +00:00
|
|
|
'zh_Hans': () => new Future.value(null),
|
2020-01-20 08:50:49 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
MessageLookupByLibrary _findExact(String localeName) {
|
|
|
|
switch (localeName) {
|
2020-06-26 08:13:48 +00:00
|
|
|
case 'cs':
|
|
|
|
return messages_cs.messages;
|
2020-05-09 09:49:17 +00:00
|
|
|
case 'de':
|
|
|
|
return messages_de.messages;
|
2020-06-26 08:13:48 +00:00
|
|
|
case 'es':
|
|
|
|
return messages_es.messages;
|
2020-09-08 08:55:32 +00:00
|
|
|
case 'et':
|
|
|
|
return messages_et.messages;
|
2020-09-19 13:29:12 +00:00
|
|
|
case 'eu':
|
|
|
|
return messages_eu.messages;
|
2020-05-17 08:18:31 +00:00
|
|
|
case 'fr':
|
|
|
|
return messages_fr.messages;
|
2020-07-21 08:53:21 +00:00
|
|
|
case 'gl':
|
|
|
|
return messages_gl.messages;
|
|
|
|
case 'hr':
|
|
|
|
return messages_hr.messages;
|
2020-05-09 05:19:29 +00:00
|
|
|
case 'hu':
|
|
|
|
return messages_hu.messages;
|
2020-08-16 10:54:43 +00:00
|
|
|
case 'hy':
|
|
|
|
return messages_hy.messages;
|
2020-07-21 08:53:21 +00:00
|
|
|
case 'ja':
|
|
|
|
return messages_ja.messages;
|
2020-05-09 09:49:17 +00:00
|
|
|
case 'messages':
|
|
|
|
return messages_messages.messages;
|
2020-05-09 13:29:31 +00:00
|
|
|
case 'pl':
|
|
|
|
return messages_pl.messages;
|
2020-07-21 08:53:21 +00:00
|
|
|
case 'ru':
|
|
|
|
return messages_ru.messages;
|
2020-06-26 08:13:48 +00:00
|
|
|
case 'sk':
|
|
|
|
return messages_sk.messages;
|
2020-08-16 10:54:43 +00:00
|
|
|
case 'tr':
|
|
|
|
return messages_tr.messages;
|
2020-07-23 09:38:07 +00:00
|
|
|
case 'uk':
|
|
|
|
return messages_uk.messages;
|
2020-09-03 09:44:42 +00:00
|
|
|
case 'zh_Hans':
|
|
|
|
return messages_zh_hans.messages;
|
2020-01-20 08:50:49 +00:00
|
|
|
default:
|
|
|
|
return null;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/// User programs should call this before using [localeName] for messages.
|
|
|
|
Future<bool> initializeMessages(String localeName) async {
|
|
|
|
var availableLocale = Intl.verifiedLocale(
|
2020-05-22 10:21:16 +00:00
|
|
|
localeName, (locale) => _deferredLibraries[locale] != null,
|
|
|
|
onFailure: (_) => null);
|
2020-01-20 08:50:49 +00:00
|
|
|
if (availableLocale == null) {
|
|
|
|
return new Future.value(false);
|
|
|
|
}
|
|
|
|
var lib = _deferredLibraries[availableLocale];
|
|
|
|
await (lib == null ? new Future.value(false) : lib());
|
|
|
|
initializeInternalMessageLookup(() => new CompositeMessageLookup());
|
|
|
|
messageLookup.addLocale(availableLocale, _findGeneratedMessagesFor);
|
|
|
|
return new Future.value(true);
|
|
|
|
}
|
|
|
|
|
|
|
|
bool _messagesExistFor(String locale) {
|
|
|
|
try {
|
|
|
|
return _findExact(locale) != null;
|
|
|
|
} catch (e) {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
MessageLookupByLibrary _findGeneratedMessagesFor(String locale) {
|
2020-05-22 10:21:16 +00:00
|
|
|
var actualLocale =
|
|
|
|
Intl.verifiedLocale(locale, _messagesExistFor, onFailure: (_) => null);
|
2020-01-20 08:50:49 +00:00
|
|
|
if (actualLocale == null) return null;
|
|
|
|
return _findExact(actualLocale);
|
|
|
|
}
|