Skip to content

Commit

Permalink
Start migration
Browse files Browse the repository at this point in the history
  • Loading branch information
Carapacik committed Dec 3, 2023
1 parent f160559 commit 96d3baa
Show file tree
Hide file tree
Showing 14 changed files with 477 additions and 342 deletions.
23 changes: 23 additions & 0 deletions lib/src/core/assets/generated/assets.gen.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 18 additions & 0 deletions lib/src/core/assets/generated/fonts.gen.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 5 additions & 4 deletions lib/src/core/localization/generated/intl/messages_all.dart
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ import 'messages_en.dart' as messages_en;
import 'messages_ru.dart' as messages_ru;

typedef Future<dynamic> LibraryLoader();

Map<String, LibraryLoader> _deferredLibraries = {
'en': () => new SynchronousFuture(null),
'ru': () => new SynchronousFuture(null),
Expand All @@ -39,8 +38,9 @@ MessageLookupByLibrary? _findExact(String localeName) {

/// User programs should call this before using [localeName] for messages.
Future<bool> initializeMessages(String localeName) {
var availableLocale =
Intl.verifiedLocale(localeName, (locale) => _deferredLibraries[locale] != null, onFailure: (_) => null);
var availableLocale = Intl.verifiedLocale(
localeName, (locale) => _deferredLibraries[locale] != null,
onFailure: (_) => null);
if (availableLocale == null) {
return new SynchronousFuture(false);
}
Expand All @@ -60,7 +60,8 @@ bool _messagesExistFor(String locale) {
}

MessageLookupByLibrary? _findGeneratedMessagesFor(String locale) {
var actualLocale = Intl.verifiedLocale(locale, _messagesExistFor, onFailure: (_) => null);
var actualLocale =
Intl.verifiedLocale(locale, _messagesExistFor, onFailure: (_) => null);
if (actualLocale == null) return null;
return _findExact(actualLocale);
}
29 changes: 18 additions & 11 deletions lib/src/core/localization/generated/intl/messages_en.dart
Original file line number Diff line number Diff line change
Expand Up @@ -20,44 +20,49 @@ typedef String MessageIfAbsent(String messageStr, List<dynamic> args);
class MessageLookup extends MessageLookupByLibrary {
String get localeName => 'en';

static String m0(attemptNumber) => "I couldn\'t guess the word in ${attemptNumber} attempts.";
static String m0(attemptNumber) =>
"I couldn\'t guess the word in ${attemptNumber} attempts.";

static String m1(attemptNumber) => "The word is solved in ${attemptNumber}/6 attempts.";
static String m1(attemptNumber) =>
"The word is solved in ${attemptNumber}/6 attempts.";

static String m2(number) => "Level ${number}";

final messages = _notInlinedMessages(_notInlinedMessages);

static Map<String, Function> _notInlinedMessages(_) => <String, Function>{
"about": MessageLookupByLibrary.simpleMessage("About"),
"appDictionary": MessageLookupByLibrary.simpleMessage("App dictionary"),
"appLanguage": MessageLookupByLibrary.simpleMessage("App language"),
"appTitle": MessageLookupByLibrary.simpleMessage("Wordly Plus"),
"casual": MessageLookupByLibrary.simpleMessage("Default"),
"checkResult": MessageLookupByLibrary.simpleMessage("You can check your result here:"),
"checkResult": MessageLookupByLibrary.simpleMessage(
"You can check your result here:"),
"checkResultLose": m0,
"checkResultWin": m1,
"colorMode": MessageLookupByLibrary.simpleMessage("Color mode"),
"contact": MessageLookupByLibrary.simpleMessage(
"If you didn\'t find a word in the dictionary\nor it has the wrong definition,\nwrite to us, we will add it\nin the next update.\n"),
"currentStreak": MessageLookupByLibrary.simpleMessage("Current\nStreak"),
"currentStreak":
MessageLookupByLibrary.simpleMessage("Current\nStreak"),
"daily": MessageLookupByLibrary.simpleMessage("Daily"),
"en": MessageLookupByLibrary.simpleMessage("English"),
"guessDistribution": MessageLookupByLibrary.simpleMessage("Guess distribution"),
"guessDistribution":
MessageLookupByLibrary.simpleMessage("Guess distribution"),
"highContrast": MessageLookupByLibrary.simpleMessage("High contrast"),
"levelNumber": m2,
"levels": MessageLookupByLibrary.simpleMessage("Levels"),
"loseMessage": MessageLookupByLibrary.simpleMessage("You lost"),
"maxStreak": MessageLookupByLibrary.simpleMessage("Max\nStreak"),
"nextLevel": MessageLookupByLibrary.simpleMessage("Next level"),
"nextWord": MessageLookupByLibrary.simpleMessage("Next word in"),
"notPlayed": MessageLookupByLibrary.simpleMessage("You haven\'t played a single game"),
"notPlayed": MessageLookupByLibrary.simpleMessage(
"You haven\'t played a single game"),
"other": MessageLookupByLibrary.simpleMessage("Other"),
"played": MessageLookupByLibrary.simpleMessage("Played"),
"ru": MessageLookupByLibrary.simpleMessage("Russian"),
"secretWord": MessageLookupByLibrary.simpleMessage("Secret word"),
"sendMessage":
MessageLookupByLibrary.simpleMessage("subject=WordlyPlus%20-%20New%20word&body=Word%20-%0AMeaning%20-"),
"sendMessage": MessageLookupByLibrary.simpleMessage(
"subject=WordlyPlus%20-%20New%20word&body=Word%20-%0AMeaning%20-"),
"settings": MessageLookupByLibrary.simpleMessage("Settings"),
"share": MessageLookupByLibrary.simpleMessage("Share"),
"start": MessageLookupByLibrary.simpleMessage("Start game"),
Expand All @@ -71,7 +76,9 @@ class MessageLookup extends MessageLookupByLibrary {
"viewStatistic": MessageLookupByLibrary.simpleMessage("View statistic"),
"winMessage": MessageLookupByLibrary.simpleMessage("You win!"),
"winRate": MessageLookupByLibrary.simpleMessage("Win\nrate"),
"wordNotFound": MessageLookupByLibrary.simpleMessage("Word not found in dictionary"),
"wordTooShort": MessageLookupByLibrary.simpleMessage("Word is not correct length")
"wordNotFound": MessageLookupByLibrary.simpleMessage(
"Word not found in dictionary"),
"wordTooShort":
MessageLookupByLibrary.simpleMessage("Word is not correct length")
};
}
31 changes: 20 additions & 11 deletions lib/src/core/localization/generated/intl/messages_ru.dart
Original file line number Diff line number Diff line change
Expand Up @@ -20,21 +20,23 @@ typedef String MessageIfAbsent(String messageStr, List<dynamic> args);
class MessageLookup extends MessageLookupByLibrary {
String get localeName => 'ru';

static String m0(attemptNumber) => "У меня не получилось разгадать слово за ${attemptNumber} попыток.";
static String m0(attemptNumber) =>
"У меня не получилось разгадать слово за ${attemptNumber} попыток.";

static String m1(attemptNumber) => "Я угадал слово за ${attemptNumber}/6 попыток.";
static String m1(attemptNumber) =>
"Я угадал слово за ${attemptNumber}/6 попыток.";

static String m2(number) => "Уровень ${number}";

final messages = _notInlinedMessages(_notInlinedMessages);

static Map<String, Function> _notInlinedMessages(_) => <String, Function>{
"about": MessageLookupByLibrary.simpleMessage("О приложении"),
"appDictionary": MessageLookupByLibrary.simpleMessage("Язык словаря"),
"appLanguage": MessageLookupByLibrary.simpleMessage("Язык приложения"),
"appTitle": MessageLookupByLibrary.simpleMessage("Словень Плюс"),
"casual": MessageLookupByLibrary.simpleMessage("Обычный"),
"checkResult": MessageLookupByLibrary.simpleMessage("Можешь проверить свой результат тут:"),
"checkResult": MessageLookupByLibrary.simpleMessage(
"Можешь проверить свой результат тут:"),
"checkResultLose": m0,
"checkResultWin": m1,
"colorMode": MessageLookupByLibrary.simpleMessage("Цветовой режим"),
Expand All @@ -43,15 +45,19 @@ class MessageLookup extends MessageLookupByLibrary {
"currentStreak": MessageLookupByLibrary.simpleMessage("Текущая\nСерия"),
"daily": MessageLookupByLibrary.simpleMessage("Ежедневный"),
"en": MessageLookupByLibrary.simpleMessage("Английский"),
"guessDistribution": MessageLookupByLibrary.simpleMessage("Распределение догадок"),
"highContrast": MessageLookupByLibrary.simpleMessage("Высокий контраст"),
"guessDistribution":
MessageLookupByLibrary.simpleMessage("Распределение догадок"),
"highContrast":
MessageLookupByLibrary.simpleMessage("Высокий контраст"),
"levelNumber": m2,
"levels": MessageLookupByLibrary.simpleMessage("Уровни"),
"loseMessage": MessageLookupByLibrary.simpleMessage("Вы проиграли"),
"maxStreak": MessageLookupByLibrary.simpleMessage("Макс.\nСерия"),
"nextLevel": MessageLookupByLibrary.simpleMessage("Следующий уровень"),
"nextWord": MessageLookupByLibrary.simpleMessage("Следующее слово через"),
"notPlayed": MessageLookupByLibrary.simpleMessage("Вы не сыграли ни одной игры"),
"nextWord":
MessageLookupByLibrary.simpleMessage("Следующее слово через"),
"notPlayed":
MessageLookupByLibrary.simpleMessage("Вы не сыграли ни одной игры"),
"other": MessageLookupByLibrary.simpleMessage("Другой"),
"played": MessageLookupByLibrary.simpleMessage("Сыграно"),
"ru": MessageLookupByLibrary.simpleMessage("Русский"),
Expand All @@ -68,10 +74,13 @@ class MessageLookup extends MessageLookupByLibrary {
"themeSystem": MessageLookupByLibrary.simpleMessage("Системная"),
"tutorial": MessageLookupByLibrary.simpleMessage("Как играть"),
"viewLevels": MessageLookupByLibrary.simpleMessage("Посмотреть уровни"),
"viewStatistic": MessageLookupByLibrary.simpleMessage("Посмотреть статистику"),
"viewStatistic":
MessageLookupByLibrary.simpleMessage("Посмотреть статистику"),
"winMessage": MessageLookupByLibrary.simpleMessage("Вы победили!"),
"winRate": MessageLookupByLibrary.simpleMessage("Показатель\nпобед"),
"wordNotFound": MessageLookupByLibrary.simpleMessage("Слово не найдено в словаре"),
"wordTooShort": MessageLookupByLibrary.simpleMessage("Слово неправильной длины")
"wordNotFound":
MessageLookupByLibrary.simpleMessage("Слово не найдено в словаре"),
"wordTooShort":
MessageLookupByLibrary.simpleMessage("Слово неправильной длины")
};
}
16 changes: 9 additions & 7 deletions lib/src/core/localization/generated/l10n.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 96d3baa

Please sign in to comment.