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

feat: add localizations for Hebrew #251

Merged
merged 2 commits into from
Jul 21, 2024
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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
## [9.2.6]
- added Vietnamese localization messages
- added localizations for Hebrew

## [9.2.5]
- fix: handle change on country selection. onChanged callback would trigger if country field is updated
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,7 @@ This package uses the `flutter_country_selector` package under the hood, which e
- es
- fa
- fr
- he
- hi
- hu
- it
Expand Down
30 changes: 30 additions & 0 deletions l10n/he.arb
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"@@locale": "he",
"invalidPhoneNumber": "מספר טלפון לא חוקי",
"invalidCountry": "מדינה לא חוקית",
"invalidMobilePhoneNumber": "מספר טלפון נייד לא חוקי",
"invalidFixedLinePhoneNumber": "מספר טלפון קווי לא חוקי",
"requiredPhoneNumber": "מספר טלפון נדרש",
"selectACountrySemanticLabel": "בחר מדינה. הבחירה הנוכחית: {countryName} {dialCode}",
"@selectACountrySemanticLabel": {
"description": "תיאור סמנטי של כפתור הבחירה למדינה",
"placeholders": {
"countryName": {
"type": "String"
},
"dialCode": {
"type": "String"
}
}
},
"phoneNumber": "מספר טלפון",
"currentValueSemanticLabel": "הערך הנוכחי: {currentValue}",
"@currentValueSemanticLabel": {
"description": "תיאור סמנטי של קלט הטלפון. התווית או הרמז יתווספו דינמית",
"placeholders": {
"currentValue": {
"type": "String"
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import 'phone_field_localization_impl_en.dart';
import 'phone_field_localization_impl_es.dart';
import 'phone_field_localization_impl_fa.dart';
import 'phone_field_localization_impl_fr.dart';
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';
Expand Down Expand Up @@ -122,6 +123,7 @@ abstract class PhoneFieldLocalizationImpl {
Locale('es'),
Locale('fa'),
Locale('fr'),
Locale('he'),
Locale('hi'),
Locale('hu'),
Locale('it'),
Expand Down Expand Up @@ -208,6 +210,7 @@ class _PhoneFieldLocalizationImplDelegate
'es',
'fa',
'fr',
'he',
'hi',
'hu',
'it',
Expand Down Expand Up @@ -248,6 +251,8 @@ PhoneFieldLocalizationImpl lookupPhoneFieldLocalizationImpl(Locale locale) {
return PhoneFieldLocalizationImplFa();
case 'fr':
return PhoneFieldLocalizationImplFr();
case 'he':
return PhoneFieldLocalizationImplHe();
case 'hi':
return PhoneFieldLocalizationImplHi();
case 'hu':
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
import 'phone_field_localization_impl.dart';

/// The translations for Hebrew (`he`).
class PhoneFieldLocalizationImplHe extends PhoneFieldLocalizationImpl {
PhoneFieldLocalizationImplHe([super.locale = 'he']);

@override
String get invalidPhoneNumber => 'מספר טלפון לא חוקי';

@override
String get invalidCountry => 'מדינה לא חוקית';

@override
String get invalidMobilePhoneNumber => 'מספר טלפון נייד לא חוקי';

@override
String get invalidFixedLinePhoneNumber => 'מספר טלפון קווי לא חוקי';

@override
String get requiredPhoneNumber => 'מספר טלפון נדרש';

@override
String selectACountrySemanticLabel(String countryName, String dialCode) {
return 'בחר מדינה. הבחירה הנוכחית: $countryName $dialCode';
}

@override
String get phoneNumber => 'מספר טלפון';

@override
String currentValueSemanticLabel(String currentValue) {
return 'הערך הנוכחי: $currentValue';
}
}
Loading