diff --git a/ios/Runner/Info.plist b/ios/Runner/Info.plist index 133e3a5d0..a8c6498f1 100644 --- a/ios/Runner/Info.plist +++ b/ios/Runner/Info.plist @@ -7,6 +7,7 @@ CFBundleLocalizations en + bg cs de el diff --git a/lib/bloc/user_profile/default_profile_generator.dart b/lib/bloc/user_profile/default_profile_generator.dart index a9431bf2e..f900d7731 100644 --- a/lib/bloc/user_profile/default_profile_generator.dart +++ b/lib/bloc/user_profile/default_profile_generator.dart @@ -22,6 +22,7 @@ class DefaultProfile { case 'pt': return "$animal $color"; + case 'bg': case 'cs': case 'de': case 'el': diff --git a/lib/bloc/user_profile/profile_animal.dart b/lib/bloc/user_profile/profile_animal.dart index 549cd7f74..174fa3e35 100644 --- a/lib/bloc/user_profile/profile_animal.dart +++ b/lib/bloc/user_profile/profile_animal.dart @@ -1,12 +1,15 @@ import 'package:breez_translations/generated/breez_translations.dart'; +import 'package:breez_translations/generated/breez_translations_bg.dart'; +import 'package:breez_translations/generated/breez_translations_cs.dart'; import 'package:breez_translations/generated/breez_translations_de.dart'; -import 'package:breez_translations/generated/breez_translations_en.dart'; import 'package:breez_translations/generated/breez_translations_el.dart'; +import 'package:breez_translations/generated/breez_translations_en.dart'; import 'package:breez_translations/generated/breez_translations_es.dart'; import 'package:breez_translations/generated/breez_translations_fi.dart'; import 'package:breez_translations/generated/breez_translations_fr.dart'; import 'package:breez_translations/generated/breez_translations_it.dart'; import 'package:breez_translations/generated/breez_translations_pt.dart'; +import 'package:breez_translations/generated/breez_translations_sk.dart'; import 'package:breez_translations/generated/breez_translations_sv.dart'; import 'package:flutter/material.dart'; @@ -178,6 +181,8 @@ extension ProfileAnimalExtension on ProfileAnimal { } Map> _animalsFromName = { + "bg": _buildAnimalsFromName(BreezTranslationsBg()), + "cs": _buildAnimalsFromName(BreezTranslationsCs()), "de": _buildAnimalsFromName(BreezTranslationsDe()), "el": _buildAnimalsFromName(BreezTranslationsEl()), "en": _buildAnimalsFromName(BreezTranslationsEn()), @@ -186,6 +191,7 @@ Map> _animalsFromName = { "fr": _buildAnimalsFromName(BreezTranslationsFr()), "it": _buildAnimalsFromName(BreezTranslationsIt()), "pt": _buildAnimalsFromName(BreezTranslationsPt()), + "sk": _buildAnimalsFromName(BreezTranslationsSk()), "sv": _buildAnimalsFromName(BreezTranslationsSv()), }; diff --git a/lib/bloc/user_profile/profile_color.dart b/lib/bloc/user_profile/profile_color.dart index 10e9e8f68..281a1a76d 100644 --- a/lib/bloc/user_profile/profile_color.dart +++ b/lib/bloc/user_profile/profile_color.dart @@ -1,4 +1,6 @@ import 'package:breez_translations/generated/breez_translations.dart'; +import 'package:breez_translations/generated/breez_translations_bg.dart'; +import 'package:breez_translations/generated/breez_translations_cs.dart'; import 'package:breez_translations/generated/breez_translations_de.dart'; import 'package:breez_translations/generated/breez_translations_en.dart'; import 'package:breez_translations/generated/breez_translations_el.dart'; @@ -7,6 +9,7 @@ import 'package:breez_translations/generated/breez_translations_fi.dart'; import 'package:breez_translations/generated/breez_translations_fr.dart'; import 'package:breez_translations/generated/breez_translations_it.dart'; import 'package:breez_translations/generated/breez_translations_pt.dart'; +import 'package:breez_translations/generated/breez_translations_sk.dart'; import 'package:breez_translations/generated/breez_translations_sv.dart'; import 'package:flutter/material.dart'; @@ -173,6 +176,8 @@ extension ProfileColorExtension on ProfileColor { } Map> _colorsFromName = { + "bg": _buildColorsFromName(BreezTranslationsBg()), + "cs": _buildColorsFromName(BreezTranslationsCs()), "de": _buildColorsFromName(BreezTranslationsDe()), "el": _buildColorsFromName(BreezTranslationsEl()), "en": _buildColorsFromName(BreezTranslationsEn()), @@ -181,6 +186,7 @@ Map> _colorsFromName = { "fr": _buildColorsFromName(BreezTranslationsFr()), "it": _buildColorsFromName(BreezTranslationsIt()), "pt": _buildColorsFromName(BreezTranslationsPt()), + "sk": _buildColorsFromName(BreezTranslationsSk()), "sv": _buildColorsFromName(BreezTranslationsSv()), }; diff --git a/lib/routes/security_pin/security_and_backup/security_tiles/pin_interval_tile.dart b/lib/routes/security_pin/security_and_backup/security_tiles/pin_interval_tile.dart index f556c09f1..baef6af7a 100644 --- a/lib/routes/security_pin/security_and_backup/security_tiles/pin_interval_tile.dart +++ b/lib/routes/security_pin/security_and_backup/security_tiles/pin_interval_tile.dart @@ -84,6 +84,7 @@ class _PinIntervalTileState extends State { } const enLocale = EnglishDurationLocale(); final locales = { + "bg": enLocale, // TODO add BulgarianDurationLocale "cs": const CzechDurationLocale(), "de": const GermanDurationLocale(), "el": enLocale, // TODO add GreekDurationLocale diff --git a/lib/utils/date.dart b/lib/utils/date.dart index 75dd0a032..15068982d 100644 --- a/lib/utils/date.dart +++ b/lib/utils/date.dart @@ -40,6 +40,7 @@ class BreezDateUtils { } static void setupLocales() { + timeago.setLocaleMessages('bg', timeago.EnMessages()); // TODO: add bg locale timeago.setLocaleMessages('cs', timeago.CsMessages()); timeago.setLocaleMessages('de', timeago.DeMessages()); timeago.setLocaleMessages('el', timeago.GrMessages()); diff --git a/pubspec.lock b/pubspec.lock index 44f08d3ed..d91c52a4a 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -190,8 +190,8 @@ packages: dependency: "direct main" description: path: "." - ref: db1ed37860d4378316e23ab52c5c21d32b4e7831 - resolved-ref: db1ed37860d4378316e23ab52c5c21d32b4e7831 + ref: ba8d9bd644a013521389d225bb6850dcd4a2918f + resolved-ref: ba8d9bd644a013521389d225bb6850dcd4a2918f url: "https://github.com/breez/Breez-Translations.git" source: git version: "1.0.0" diff --git a/pubspec.yaml b/pubspec.yaml index 062e2beb4..0ee32036c 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -17,7 +17,7 @@ dependencies: breez_translations: git: url: https://github.com/breez/Breez-Translations.git - ref: db1ed37860d4378316e23ab52c5c21d32b4e7831 + ref: ba8d9bd644a013521389d225bb6850dcd4a2918f clipboard_watcher: ^0.2.0 collection: ^1.18.0 confetti: ^0.7.0 diff --git a/test/utils/exceptions_test.dart b/test/utils/exceptions_test.dart index acfabf925..5d913f005 100644 --- a/test/utils/exceptions_test.dart +++ b/test/utils/exceptions_test.dart @@ -1,4 +1,6 @@ import 'package:breez/utils/exceptions.dart'; +import 'package:breez_translations/generated/breez_translations_bg.dart'; +import 'package:breez_translations/generated/breez_translations_cs.dart'; import 'package:breez_translations/generated/breez_translations_de.dart'; import 'package:breez_translations/generated/breez_translations_el.dart'; import 'package:breez_translations/generated/breez_translations_en.dart'; @@ -7,6 +9,7 @@ import 'package:breez_translations/generated/breez_translations_fi.dart'; import 'package:breez_translations/generated/breez_translations_fr.dart'; import 'package:breez_translations/generated/breez_translations_it.dart'; import 'package:breez_translations/generated/breez_translations_pt.dart'; +import 'package:breez_translations/generated/breez_translations_sk.dart'; import 'package:breez_translations/generated/breez_translations_sv.dart'; import 'package:flutter/services.dart'; import 'package:flutter_test/flutter_test.dart'; @@ -108,6 +111,8 @@ void main() { }); final locales = { + "bg": BreezTranslationsBg(), + "cs": BreezTranslationsCs(), "de": BreezTranslationsDe(), "el": BreezTranslationsEl(), "en": BreezTranslationsEn(), @@ -116,6 +121,7 @@ void main() { "fr": BreezTranslationsFr(), "it": BreezTranslationsIt(), "pt": BreezTranslationsPt(), + "sk": BreezTranslationsSk(), "sv": BreezTranslationsSv(), }; group("localizedExceptionMessage", () {