l10n.dart 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  1. // GENERATED CODE - DO NOT MODIFY BY HAND
  2. import 'package:flutter/material.dart';
  3. import 'package:intl/intl.dart';
  4. import 'intl/messages_all.dart';
  5. // **************************************************************************
  6. // Generator: Flutter Intl IDE plugin
  7. // Made by Localizely
  8. // **************************************************************************
  9. // ignore_for_file: non_constant_identifier_names, lines_longer_than_80_chars
  10. // ignore_for_file: join_return_with_assignment, prefer_final_in_for_each
  11. // ignore_for_file: avoid_redundant_argument_values
  12. class S {
  13. S();
  14. static S current;
  15. static const AppLocalizationDelegate delegate =
  16. AppLocalizationDelegate();
  17. static Future<S> load(Locale locale) {
  18. final name = (locale.countryCode?.isEmpty ?? false) ? locale.languageCode : locale.toString();
  19. final localeName = Intl.canonicalizedLocale(name);
  20. return initializeMessages(localeName).then((_) {
  21. Intl.defaultLocale = localeName;
  22. S.current = S();
  23. return S.current;
  24. });
  25. }
  26. static S of(BuildContext context) {
  27. return Localizations.of<S>(context, S);
  28. }
  29. /// `2048`
  30. String get titleName {
  31. return Intl.message(
  32. '2048',
  33. name: 'titleName',
  34. desc: '',
  35. args: [],
  36. );
  37. }
  38. /// `Play 2048 Game flutter`
  39. String get titleWelcome {
  40. return Intl.message(
  41. 'Play 2048 Game flutter',
  42. name: 'titleWelcome',
  43. desc: '',
  44. args: [],
  45. );
  46. }
  47. /// `Join and get to the 2048 tile!`
  48. String get titleWelDesc {
  49. return Intl.message(
  50. 'Join and get to the 2048 tile!',
  51. name: 'titleWelDesc',
  52. desc: '',
  53. args: [],
  54. );
  55. }
  56. /// `BEST`
  57. String get labelBest {
  58. return Intl.message(
  59. 'BEST',
  60. name: 'labelBest',
  61. desc: '',
  62. args: [],
  63. );
  64. }
  65. /// `SCORE`
  66. String get labelScore {
  67. return Intl.message(
  68. 'SCORE',
  69. name: 'labelScore',
  70. desc: '',
  71. args: [],
  72. );
  73. }
  74. /// `New Game`
  75. String get btnNewGame {
  76. return Intl.message(
  77. 'New Game',
  78. name: 'btnNewGame',
  79. desc: '',
  80. args: [],
  81. );
  82. }
  83. }
  84. class AppLocalizationDelegate extends LocalizationsDelegate<S> {
  85. const AppLocalizationDelegate();
  86. List<Locale> get supportedLocales {
  87. return const <Locale>[
  88. Locale.fromSubtags(languageCode: 'en'),
  89. Locale.fromSubtags(languageCode: 'zh'),
  90. ];
  91. }
  92. @override
  93. bool isSupported(Locale locale) => _isSupported(locale);
  94. @override
  95. Future<S> load(Locale locale) => S.load(locale);
  96. @override
  97. bool shouldReload(AppLocalizationDelegate old) => false;
  98. bool _isSupported(Locale locale) {
  99. if (locale != null) {
  100. for (var supportedLocale in supportedLocales) {
  101. if (supportedLocale.languageCode == locale.languageCode) {
  102. return true;
  103. }
  104. }
  105. }
  106. return false;
  107. }
  108. }