Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Czech language support 🇨🇿🇪🇺 #614

Merged
merged 1 commit into from
Aug 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions ios/Runner/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,17 @@
<string>6.0</string>
<key>CFBundleLocalizations</key>
<array>
<string>de</string>
<string>en</string>
<string>cs</string>
<string>de</string>
<string>el</string>
<string>es</string>
<string>fi</string>
<string>fr</string>
<string>it</string>
<string>pt</string>
<string>sv</string>
<string>sk</string>
<string>sv</string>
</array>
<key>CFBundleName</key>
<string>c_breez</string>
Expand Down
7 changes: 4 additions & 3 deletions lib/bloc/user_profile/default_profile_generator.dart
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,13 @@ class DefaultProfile {
case 'pt':
return "$animal $color";

case 'en':
case 'el':
case 'cs':
case 'de':
case 'el':
case 'en':
case 'fi':
case 'sv':
case 'sk':
case 'sv':
default:
return "$color $animal";
}
Expand Down
6 changes: 4 additions & 2 deletions lib/bloc/user_profile/profile_animal.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import 'package:breez_translations/generated/breez_translations.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';
Expand Down Expand Up @@ -182,16 +183,17 @@ extension ProfileAnimalExtension on ProfileAnimal {
}

Map<String, Map<String, ProfileAnimal>> _animalsFromName = {
"cs": _buildAnimalsFromName(BreezTranslationsCs()),
"de": _buildAnimalsFromName(BreezTranslationsDe()),
"en": _buildAnimalsFromName(BreezTranslationsEn()),
"el": _buildAnimalsFromName(BreezTranslationsEl()),
"en": _buildAnimalsFromName(BreezTranslationsEn()),
"es": _buildAnimalsFromName(BreezTranslationsEs()),
"fi": _buildAnimalsFromName(BreezTranslationsFi()),
"fr": _buildAnimalsFromName(BreezTranslationsFr()),
"it": _buildAnimalsFromName(BreezTranslationsIt()),
"pt": _buildAnimalsFromName(BreezTranslationsPt()),
"sv": _buildAnimalsFromName(BreezTranslationsSv()),
"sk": _buildAnimalsFromName(BreezTranslationsSk()),
"sv": _buildAnimalsFromName(BreezTranslationsSv()),
};

Map<String, ProfileAnimal> _buildAnimalsFromName(BreezTranslations local) => {
Expand Down
6 changes: 4 additions & 2 deletions lib/bloc/user_profile/profile_color.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import 'package:breez_translations/generated/breez_translations.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';
Expand Down Expand Up @@ -177,16 +178,17 @@ extension ProfileColorExtension on ProfileColor {
}

Map<String, Map<String, ProfileColor>> _colorsFromName = {
"cs": _buildColorsFromName(BreezTranslationsCs()),
"de": _buildColorsFromName(BreezTranslationsDe()),
"en": _buildColorsFromName(BreezTranslationsEn()),
"el": _buildColorsFromName(BreezTranslationsEl()),
"en": _buildColorsFromName(BreezTranslationsEn()),
"es": _buildColorsFromName(BreezTranslationsEs()),
"fi": _buildColorsFromName(BreezTranslationsFi()),
"fr": _buildColorsFromName(BreezTranslationsFr()),
"it": _buildColorsFromName(BreezTranslationsIt()),
"pt": _buildColorsFromName(BreezTranslationsPt()),
"sv": _buildColorsFromName(BreezTranslationsSv()),
"sk": _buildColorsFromName(BreezTranslationsSk()),
"sv": _buildColorsFromName(BreezTranslationsSv()),
};

Map<String, ProfileColor> _buildColorsFromName(BreezTranslations local) => {
Expand Down
5 changes: 3 additions & 2 deletions lib/utils/date.dart
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,16 @@ class BreezDateUtils {
}

static void setupLocales() {
timeago.setLocaleMessages('cs', timeago.CsMessages());
timeago.setLocaleMessages('de', timeago.DeMessages());
timeago.setLocaleMessages('en', timeago.EnMessages());
timeago.setLocaleMessages('el', timeago.GrMessages());
timeago.setLocaleMessages('en', timeago.EnMessages());
timeago.setLocaleMessages('es', timeago.EsMessages());
timeago.setLocaleMessages('fi', timeago.FiMessages());
timeago.setLocaleMessages('fr', timeago.FrMessages());
timeago.setLocaleMessages('it', timeago.ItMessages());
timeago.setLocaleMessages('pt', timeago.PtBrMessages());
timeago.setLocaleMessages('sv', timeago.SvMessages());
timeago.setLocaleMessages('sk', timeago.EnMessages()); // TODO: add sk locale
timeago.setLocaleMessages('sv', timeago.SvMessages());
}
}
4 changes: 2 additions & 2 deletions pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,8 @@ packages:
dependency: "direct main"
description:
path: "."
ref: a8951fbebdcac5cd63e58ae5e4f711fcd5aed14b
resolved-ref: a8951fbebdcac5cd63e58ae5e4f711fcd5aed14b
ref: "077a94046e0b7ff9bd1aff225616541dea0ba208"
resolved-ref: "077a94046e0b7ff9bd1aff225616541dea0ba208"
url: "https://github.com/breez/Breez-Translations"
source: git
version: "1.0.0"
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ dependencies:
breez_translations:
git:
url: https://github.com/breez/Breez-Translations
ref: a8951fbebdcac5cd63e58ae5e4f711fcd5aed14b
ref: 077a94046e0b7ff9bd1aff225616541dea0ba208
clipboard_watcher: ^0.2.0
connectivity_plus: ^4.0.1
drag_and_drop_lists: ^0.3.3
Expand Down
Loading