fluffychat/lib/l10n/messages_all.dart

111 lines
3.6 KiB
Dart
Raw Normal View History

2020-01-20 09:50:49 +01: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 10:13:48 +02:00
import 'messages_cs.dart' as messages_cs;
2020-05-09 11:49:17 +02:00
import 'messages_de.dart' as messages_de;
2020-06-26 10:13:48 +02:00
import 'messages_es.dart' as messages_es;
2020-05-17 10:18:31 +02:00
import 'messages_fr.dart' as messages_fr;
import 'messages_gl.dart' as messages_gl;
import 'messages_hr.dart' as messages_hr;
import 'messages_hu.dart' as messages_hu;
import 'messages_ja.dart' as messages_ja;
2020-05-09 11:49:17 +02:00
import 'messages_messages.dart' as messages_messages;
2020-05-09 15:29:31 +02:00
import 'messages_pl.dart' as messages_pl;
import 'messages_ru.dart' as messages_ru;
2020-06-26 10:13:48 +02:00
import 'messages_sk.dart' as messages_sk;
import 'messages_uk.dart' as messages_uk;
2020-01-20 09:50:49 +01:00
typedef Future<dynamic> LibraryLoader();
Map<String, LibraryLoader> _deferredLibraries = {
2020-06-26 10:13:48 +02:00
'cs': () => new Future.value(null),
2020-05-09 11:49:17 +02:00
'de': () => new Future.value(null),
2020-06-26 10:13:48 +02:00
'es': () => new Future.value(null),
2020-05-17 10:18:31 +02:00
'fr': () => new Future.value(null),
'gl': () => new Future.value(null),
'hr': () => new Future.value(null),
'hu': () => new Future.value(null),
'ja': () => new Future.value(null),
2020-05-09 11:49:17 +02:00
'messages': () => new Future.value(null),
2020-05-09 15:29:31 +02:00
'pl': () => new Future.value(null),
'ru': () => new Future.value(null),
2020-06-26 10:13:48 +02:00
'sk': () => new Future.value(null),
'uk': () => new Future.value(null),
2020-01-20 09:50:49 +01:00
};
MessageLookupByLibrary _findExact(String localeName) {
switch (localeName) {
2020-06-26 10:13:48 +02:00
case 'cs':
return messages_cs.messages;
2020-05-09 11:49:17 +02:00
case 'de':
return messages_de.messages;
2020-06-26 10:13:48 +02:00
case 'es':
return messages_es.messages;
2020-05-17 10:18:31 +02:00
case 'fr':
return messages_fr.messages;
case 'gl':
return messages_gl.messages;
case 'hr':
return messages_hr.messages;
case 'hu':
return messages_hu.messages;
case 'ja':
return messages_ja.messages;
2020-05-09 11:49:17 +02:00
case 'messages':
return messages_messages.messages;
2020-05-09 15:29:31 +02:00
case 'pl':
return messages_pl.messages;
case 'ru':
return messages_ru.messages;
2020-06-26 10:13:48 +02:00
case 'sk':
return messages_sk.messages;
case 'uk':
return messages_uk.messages;
2020-01-20 09:50:49 +01: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 12:21:16 +02:00
localeName, (locale) => _deferredLibraries[locale] != null,
onFailure: (_) => null);
2020-01-20 09:50:49 +01: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 12:21:16 +02:00
var actualLocale =
Intl.verifiedLocale(locale, _messagesExistFor, onFailure: (_) => null);
2020-01-20 09:50:49 +01:00
if (actualLocale == null) return null;
return _findExact(actualLocale);
}