Skip to content

Commit

Permalink
Add Czech and Slovak translations (#259)
Browse files Browse the repository at this point in the history
* Add Czech and Slovak translation

* Document Czech and Slovak translation

---------

Co-authored-by: cedvdb <[email protected]>
  • Loading branch information
Treuova and cedvdb authored Sep 6, 2024
1 parent 85bd720 commit 70d3b0e
Show file tree
Hide file tree
Showing 7 changed files with 152 additions and 6 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## [9.2.7]

- added Slovak localization
- added Czech localization

## [9.2.6]
- added Vietnamese localization messages
- added localizations for Hebrew
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@ This package uses the `flutter_country_selector` package under the hood, which e
### Supported languages

- ar
- cs
- de
- el
- en
Expand All @@ -193,6 +194,7 @@ This package uses the `flutter_country_selector` package under the hood, which e
- nl
- pt
- ru
- sk
- sv
- tr
- uk
Expand Down
30 changes: 30 additions & 0 deletions l10n/cs.arb
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"@@locale": "cs",
"invalidPhoneNumber": "Neplatné telefonní číslo",
"invalidCountry": "Neplatná země",
"invalidMobilePhoneNumber": "Neplatné číslo mobilního telefonu",
"invalidFixedLinePhoneNumber": "Neplatné číslo pevné linky",
"requiredPhoneNumber": "Telefonní číslo je povinné",
"selectACountrySemanticLabel": "Vyberte zemi. Aktuální výběr: {countryName} {dialCode}",
"@selectACountrySemanticLabel": {
"description": "semantic description of the country button",
"placeholders": {
"countryName": {
"type": "String"
},
"dialCode": {
"type": "String"
}
}
},
"phoneNumber": "Telefonní číslo",
"currentValueSemanticLabel": "Aktuální hodnota: {currentValue}",
"@currentValueSemanticLabel": {
"description": "semantic description of the phone input. The label or hint will be dynamically added",
"placeholders": {
"currentValue": {
"type": "String"
}
}
}
}
30 changes: 30 additions & 0 deletions l10n/sk.arb
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"@@locale": "sk",
"invalidPhoneNumber": "Neplatné telefónne číslo",
"invalidCountry": "Neplatná krajina",
"invalidMobilePhoneNumber": "Neplatné číslo mobilného telefónu",
"invalidFixedLinePhoneNumber": "Neplatné číslo pevnej linky",
"requiredPhoneNumber": "Telefónne číslo je povinné",
"selectACountrySemanticLabel": "Vyberte krajinu. Aktuálny výber: {countryName} {dialCode}",
"@selectACountrySemanticLabel": {
"description": "semantic description of the country button",
"placeholders": {
"countryName": {
"type": "String"
},
"dialCode": {
"type": "String"
}
}
},
"phoneNumber": "Telefónne číslo",
"currentValueSemanticLabel": "Aktuálna hodnota: {currentValue}",
"@currentValueSemanticLabel": {
"description": "semantic description of the phone input. The label or hint will be dynamically added",
"placeholders": {
"currentValue": {
"type": "String"
}
}
}
}
19 changes: 13 additions & 6 deletions lib/src/localization/generated/phone_field_localization_impl.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import 'package:intl/intl.dart' as intl;

import 'phone_field_localization_impl_ar.dart';
import 'phone_field_localization_impl_ckb.dart';
import 'phone_field_localization_impl_cs.dart';
import 'phone_field_localization_impl_de.dart';
import 'phone_field_localization_impl_el.dart';
import 'phone_field_localization_impl_en.dart';
Expand All @@ -17,19 +18,21 @@ import 'phone_field_localization_impl_he.dart';
import 'phone_field_localization_impl_hi.dart';
import 'phone_field_localization_impl_hu.dart';
import 'phone_field_localization_impl_it.dart';
import 'phone_field_localization_impl_ko.dart';
import 'phone_field_localization_impl_ku.dart';
import 'phone_field_localization_impl_nb.dart';
import 'phone_field_localization_impl_nl.dart';
import 'phone_field_localization_impl_pt.dart';
import 'phone_field_localization_impl_ru.dart';
import 'phone_field_localization_impl_sk.dart';
import 'phone_field_localization_impl_sv.dart';
import 'phone_field_localization_impl_tr.dart';
import 'phone_field_localization_impl_uk.dart';
import 'phone_field_localization_impl_uz.dart';
import 'phone_field_localization_impl_vi.dart';
import 'phone_field_localization_impl_zh.dart';

// ignore_for_file: type=lint

/// Callers can lookup localized strings with an instance of PhoneFieldLocalizationImpl
/// returned by `PhoneFieldLocalizationImpl.of(context)`.
///
Expand Down Expand Up @@ -117,6 +120,7 @@ abstract class PhoneFieldLocalizationImpl {
static const List<Locale> supportedLocales = <Locale>[
Locale('ar'),
Locale('ckb'),
Locale('cs'),
Locale('de'),
Locale('el'),
Locale('en'),
Expand All @@ -127,12 +131,12 @@ abstract class PhoneFieldLocalizationImpl {
Locale('hi'),
Locale('hu'),
Locale('it'),
Locale('ko'),
Locale('ku'),
Locale('nb'),
Locale('nl'),
Locale('pt'),
Locale('ru'),
Locale('sk'),
Locale('sv'),
Locale('tr'),
Locale('uk'),
Expand Down Expand Up @@ -204,22 +208,23 @@ class _PhoneFieldLocalizationImplDelegate
bool isSupported(Locale locale) => <String>[
'ar',
'ckb',
'cs',
'de',
'el',
'en',
'es',
'fa',
'fr',
'he',
'he',
'hi',
'hu',
'it',
'ko',
'ku',
'nb',
'nl',
'pt',
'ru',
'sk',
'sv',
'tr',
'uk',
Expand All @@ -239,6 +244,8 @@ PhoneFieldLocalizationImpl lookupPhoneFieldLocalizationImpl(Locale locale) {
return PhoneFieldLocalizationImplAr();
case 'ckb':
return PhoneFieldLocalizationImplCkb();
case 'cs':
return PhoneFieldLocalizationImplCs();
case 'de':
return PhoneFieldLocalizationImplDe();
case 'el':
Expand All @@ -259,8 +266,6 @@ PhoneFieldLocalizationImpl lookupPhoneFieldLocalizationImpl(Locale locale) {
return PhoneFieldLocalizationImplHu();
case 'it':
return PhoneFieldLocalizationImplIt();
case 'ko':
return PhoneFieldLocalizationImplKo();
case 'ku':
return PhoneFieldLocalizationImplKu();
case 'nb':
Expand All @@ -271,6 +276,8 @@ PhoneFieldLocalizationImpl lookupPhoneFieldLocalizationImpl(Locale locale) {
return PhoneFieldLocalizationImplPt();
case 'ru':
return PhoneFieldLocalizationImplRu();
case 'sk':
return PhoneFieldLocalizationImplSk();
case 'sv':
return PhoneFieldLocalizationImplSv();
case 'tr':
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
import 'phone_field_localization_impl.dart';

// ignore_for_file: type=lint

/// The translations for Czech (`cs`).
class PhoneFieldLocalizationImplCs extends PhoneFieldLocalizationImpl {
PhoneFieldLocalizationImplCs([String locale = 'cs']) : super(locale);

@override
String get invalidPhoneNumber => 'Neplatné telefonní číslo';

@override
String get invalidCountry => 'Neplatná země';

@override
String get invalidMobilePhoneNumber => 'Neplatné číslo mobilního telefonu';

@override
String get invalidFixedLinePhoneNumber => 'Neplatné číslo pevné linky';

@override
String get requiredPhoneNumber => 'Telefonní číslo je povinné';

@override
String selectACountrySemanticLabel(String countryName, String dialCode) {
return 'Vyberte zemi. Aktuální výběr: $countryName $dialCode';
}

@override
String get phoneNumber => 'Telefonní číslo';

@override
String currentValueSemanticLabel(String currentValue) {
return 'Aktuální hodnota: $currentValue';
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
import 'phone_field_localization_impl.dart';

// ignore_for_file: type=lint

/// The translations for Slovak (`sk`).
class PhoneFieldLocalizationImplSk extends PhoneFieldLocalizationImpl {
PhoneFieldLocalizationImplSk([String locale = 'sk']) : super(locale);

@override
String get invalidPhoneNumber => 'Neplatné telefónne číslo';

@override
String get invalidCountry => 'Neplatná krajina';

@override
String get invalidMobilePhoneNumber => 'Neplatné číslo mobilného telefónu';

@override
String get invalidFixedLinePhoneNumber => 'Neplatné číslo pevnej linky';

@override
String get requiredPhoneNumber => 'Telefónne číslo je povinné';

@override
String selectACountrySemanticLabel(String countryName, String dialCode) {
return 'Vyberte krajinu. Aktuálny výber: $countryName $dialCode';
}

@override
String get phoneNumber => 'Telefónne číslo';

@override
String currentValueSemanticLabel(String currentValue) {
return 'Aktuálna hodnota: $currentValue';
}
}

0 comments on commit 70d3b0e

Please sign in to comment.