diff --git a/lib/l10n/app_localizations.dart b/lib/l10n/app_localizations.dart index 70f412d..b88c8ce 100644 --- a/lib/l10n/app_localizations.dart +++ b/lib/l10n/app_localizations.dart @@ -1645,6 +1645,24 @@ abstract class AppLocalizations { /// In en, this message translates to: /// **'Enable Notifications'** String get feedActionTypeEnableNotifications; + + /// Label for the search input in the country picker + /// + /// In en, this message translates to: + /// **'Search'** + String get countryPickerSearchLabel; + + /// Hint text for the search input in the country picker + /// + /// In en, this message translates to: + /// **'Start typing to search...'** + String get countryPickerSearchHint; + + /// Label displayed when no country is selected in the picker form field + /// + /// In en, this message translates to: + /// **'Select a country'** + String get countryPickerSelectCountryLabel; } class _AppLocalizationsDelegate diff --git a/lib/l10n/app_localizations_ar.dart b/lib/l10n/app_localizations_ar.dart index 3c56a72..04471a0 100644 --- a/lib/l10n/app_localizations_ar.dart +++ b/lib/l10n/app_localizations_ar.dart @@ -868,4 +868,13 @@ class AppLocalizationsAr extends AppLocalizations { @override String get feedActionTypeEnableNotifications => 'تفعيل الإشعارات'; + + @override + String get countryPickerSearchLabel => 'بحث'; + + @override + String get countryPickerSearchHint => 'ابدأ الكتابة للبحث...'; + + @override + String get countryPickerSelectCountryLabel => 'اختر دولة'; } diff --git a/lib/l10n/app_localizations_en.dart b/lib/l10n/app_localizations_en.dart index cec717e..462f47e 100644 --- a/lib/l10n/app_localizations_en.dart +++ b/lib/l10n/app_localizations_en.dart @@ -867,4 +867,13 @@ class AppLocalizationsEn extends AppLocalizations { @override String get feedActionTypeEnableNotifications => 'Enable Notifications'; + + @override + String get countryPickerSearchLabel => 'Search'; + + @override + String get countryPickerSearchHint => 'Start typing to search...'; + + @override + String get countryPickerSelectCountryLabel => 'Select a country'; } diff --git a/lib/l10n/arb/app_ar.arb b/lib/l10n/arb/app_ar.arb index d4e0482..95552bf 100644 --- a/lib/l10n/arb/app_ar.arb +++ b/lib/l10n/arb/app_ar.arb @@ -1077,4 +1077,17 @@ "@feedActionTypeEnableNotifications": { "description": "نوع إجراء الموجز لتفعيل الإشعارات" } + , + "countryPickerSearchLabel": "بحث", + "@countryPickerSearchLabel": { + "description": "تسمية حقل البحث في منتقي البلد" + }, + "countryPickerSearchHint": "ابدأ الكتابة للبحث...", + "@countryPickerSearchHint": { + "description": "نص تلميح لحقل البحث في منتقي البلد" + }, + "countryPickerSelectCountryLabel": "اختر دولة", + "@countryPickerSelectCountryLabel": { + "description": "التسمية المعروضة عند عدم اختيار أي دولة في حقل نموذج منتقي البلد" + } } \ No newline at end of file diff --git a/lib/l10n/arb/app_en.arb b/lib/l10n/arb/app_en.arb index 7ce83bb..3192882 100644 --- a/lib/l10n/arb/app_en.arb +++ b/lib/l10n/arb/app_en.arb @@ -1077,4 +1077,17 @@ "@feedActionTypeEnableNotifications": { "description": "Feed action type for enabling notifications" } + , + "countryPickerSearchLabel": "Search", + "@countryPickerSearchLabel": { + "description": "Label for the search input in the country picker" + }, + "countryPickerSearchHint": "Start typing to search...", + "@countryPickerSearchHint": { + "description": "Hint text for the search input in the country picker" + }, + "countryPickerSelectCountryLabel": "Select a country", + "@countryPickerSelectCountryLabel": { + "description": "Label displayed when no country is selected in the picker form field" + } } diff --git a/lib/shared/widgets/country_picker_form_field.dart b/lib/shared/widgets/country_picker_form_field.dart index 7057473..d9be519 100644 --- a/lib/shared/widgets/country_picker_form_field.dart +++ b/lib/shared/widgets/country_picker_form_field.dart @@ -1,5 +1,6 @@ import 'package:country_picker/country_picker.dart' as picker; import 'package:flutter/material.dart'; +import 'package:flutter_news_app_web_dashboard_full_source_code/l10n/l10n.dart'; import 'package:ui_kit/ui_kit.dart'; /// A form field for selecting a country using the `country_picker` package. @@ -23,6 +24,7 @@ class CountryPickerFormField extends StatelessWidget { @override Widget build(BuildContext context) { + final l10n = AppLocalizationsX(context).l10n; return InkWell( onTap: () { picker.showCountryPicker( @@ -37,9 +39,8 @@ class CountryPickerFormField extends StatelessWidget { topRight: Radius.circular(AppSpacing.md), ), inputDecoration: InputDecoration( - labelText: 'Search', // TODO(fulleni): Localize this string - hintText: - 'Start typing to search...', // TODO(fulleni): Localize this + labelText: l10n.countryPickerSearchLabel, + hintText: l10n.countryPickerSearchHint, prefixIcon: const Icon(Icons.search), border: OutlineInputBorder( borderSide: BorderSide( @@ -74,7 +75,7 @@ class CountryPickerFormField extends StatelessWidget { ] else Expanded( child: Text( - 'Select a country', // TODO(you): Localize this string + l10n.countryPickerSelectCountryLabel, style: Theme.of(context) .textTheme .bodyLarge