Browse Source

1

wr_2024_invoice
wurong 5 months ago
parent
commit
6d0a541867
  1. 34
      lib/generated/intl/messages_all.dart
  2. 1625
      lib/generated/intl/messages_en.dart
  3. 1904
      lib/generated/intl/messages_en_US.dart
  4. 1625
      lib/generated/intl/messages_zh_CN.dart
  5. 1625
      lib/generated/intl/messages_zh_Hans_CN.dart
  6. 1614
      lib/generated/intl/messages_zh_Hant_CN.dart
  7. 1620
      lib/generated/intl/messages_zh_TW.dart
  8. 55
      lib/generated/l10n.dart

34
lib/generated/intl/messages_all.dart

@ -11,6 +11,7 @@
import 'dart:async';
import 'package:flutter/foundation.dart';
import 'package:intl/intl.dart';
import 'package:intl/message_lookup_by_library.dart';
import 'package:intl/src/intl_helpers.dart';
@ -24,15 +25,15 @@ import 'messages_zh_TW.dart' as messages_zh_tw;
typedef Future<dynamic> LibraryLoader();
Map<String, LibraryLoader> _deferredLibraries = {
'en': () => new Future.value(null),
'en_US': () => new Future.value(null),
'zh_CN': () => new Future.value(null),
'zh_Hans_CN': () => new Future.value(null),
'zh_Hant_CN': () => new Future.value(null),
'zh_TW': () => new Future.value(null),
'en': () => new SynchronousFuture(null),
'en_US': () => new SynchronousFuture(null),
'zh_CN': () => new SynchronousFuture(null),
'zh_Hans_CN': () => new SynchronousFuture(null),
'zh_Hant_CN': () => new SynchronousFuture(null),
'zh_TW': () => new SynchronousFuture(null),
};
MessageLookupByLibrary _findExact(String localeName) {
MessageLookupByLibrary? _findExact(String localeName) {
switch (localeName) {
case 'en':
return messages_en.messages;
@ -52,19 +53,18 @@ MessageLookupByLibrary _findExact(String localeName) {
}
/// User programs should call this before using [localeName] for messages.
Future<bool> initializeMessages(String localeName) async {
Future<bool> initializeMessages(String localeName) {
var availableLocale = Intl.verifiedLocale(
localeName,
(locale) => _deferredLibraries[locale] != null,
onFailure: (_) => null);
localeName, (locale) => _deferredLibraries[locale] != null,
onFailure: (_) => null);
if (availableLocale == null) {
return new Future.value(false);
return new SynchronousFuture(false);
}
var lib = _deferredLibraries[availableLocale];
await (lib == null ? new Future.value(false) : lib());
lib == null ? new SynchronousFuture(false) : lib();
initializeInternalMessageLookup(() => new CompositeMessageLookup());
messageLookup.addLocale(availableLocale, _findGeneratedMessagesFor);
return new Future.value(true);
return new SynchronousFuture(true);
}
bool _messagesExistFor(String locale) {
@ -75,9 +75,9 @@ bool _messagesExistFor(String locale) {
}
}
MessageLookupByLibrary _findGeneratedMessagesFor(String locale) {
var actualLocale = Intl.verifiedLocale(locale, _messagesExistFor,
onFailure: (_) => null);
MessageLookupByLibrary? _findGeneratedMessagesFor(String locale) {
var actualLocale =
Intl.verifiedLocale(locale, _messagesExistFor, onFailure: (_) => null);
if (actualLocale == null) return null;
return _findExact(actualLocale);
}

1625
lib/generated/intl/messages_en.dart

File diff suppressed because it is too large Load Diff

1904
lib/generated/intl/messages_en_US.dart

File diff suppressed because it is too large Load Diff

1625
lib/generated/intl/messages_zh_CN.dart

File diff suppressed because it is too large Load Diff

1625
lib/generated/intl/messages_zh_Hans_CN.dart

File diff suppressed because it is too large Load Diff

1614
lib/generated/intl/messages_zh_Hant_CN.dart

File diff suppressed because it is too large Load Diff

1620
lib/generated/intl/messages_zh_TW.dart

File diff suppressed because it is too large Load Diff

55
lib/generated/l10n.dart

@ -10,28 +10,43 @@ import 'intl/messages_all.dart';
// ignore_for_file: non_constant_identifier_names, lines_longer_than_80_chars
// ignore_for_file: join_return_with_assignment, prefer_final_in_for_each
// ignore_for_file: avoid_redundant_argument_values
// ignore_for_file: avoid_redundant_argument_values, avoid_escaping_inner_quotes
class S {
S();
static S current;
static const AppLocalizationDelegate delegate =
AppLocalizationDelegate();
static S? _current;
static S get current {
assert(_current != null,
'No instance of S was loaded. Try to initialize the S delegate before accessing S.current.');
return _current!;
}
static const AppLocalizationDelegate delegate = AppLocalizationDelegate();
static Future<S> load(Locale locale) {
final name = (locale.countryCode?.isEmpty ?? false) ? locale.languageCode : locale.toString();
final localeName = Intl.canonicalizedLocale(name);
final name = (locale.countryCode?.isEmpty ?? false)
? locale.languageCode
: locale.toString();
final localeName = Intl.canonicalizedLocale(name);
return initializeMessages(localeName).then((_) {
Intl.defaultLocale = localeName;
S.current = S();
return S.current;
final instance = S();
S._current = instance;
return instance;
});
}
}
static S of(BuildContext context) {
final instance = S.maybeOf(context);
assert(instance != null,
'No instance of S present in the widget tree. Did you add S.delegate in localizationsDelegates?');
return instance!;
}
static S? maybeOf(BuildContext context) {
return Localizations.of<S>(context, S);
}
@ -7214,8 +7229,10 @@ class AppLocalizationDelegate extends LocalizationsDelegate<S> {
Locale.fromSubtags(languageCode: 'en'),
Locale.fromSubtags(languageCode: 'en', countryCode: 'US'),
Locale.fromSubtags(languageCode: 'zh', countryCode: 'CN'),
Locale.fromSubtags(languageCode: 'zh', scriptCode: 'Hans', countryCode: 'CN'),
Locale.fromSubtags(languageCode: 'zh', scriptCode: 'Hant', countryCode: 'CN'),
Locale.fromSubtags(
languageCode: 'zh', scriptCode: 'Hans', countryCode: 'CN'),
Locale.fromSubtags(
languageCode: 'zh', scriptCode: 'Hant', countryCode: 'CN'),
Locale.fromSubtags(languageCode: 'zh', countryCode: 'TW'),
];
}
@ -7228,13 +7245,11 @@ class AppLocalizationDelegate extends LocalizationsDelegate<S> {
bool shouldReload(AppLocalizationDelegate old) => false;
bool _isSupported(Locale locale) {
if (locale != null) {
for (var supportedLocale in supportedLocales) {
if (supportedLocale.languageCode == locale.languageCode) {
return true;
}
for (var supportedLocale in supportedLocales) {
if (supportedLocale.languageCode == locale.languageCode) {
return true;
}
}
return false;
}
}
}

Loading…
Cancel
Save