Skip to content

Commit 106eee4

Browse files
committed
feat: Add localization for category editing
- Added translations for edit category screen - Included success and error messages - Added labels for icon URL field
1 parent 7798dfc commit 106eee4

File tree

5 files changed

+123
-0
lines changed

5 files changed

+123
-0
lines changed

lib/l10n/app_localizations.dart

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1081,6 +1081,42 @@ abstract class AppLocalizations {
10811081
/// In en, this message translates to:
10821082
/// **'Language'**
10831083
String get language;
1084+
1085+
/// Title for the Edit Category page
1086+
///
1087+
/// In en, this message translates to:
1088+
/// **'Edit Category'**
1089+
String get editCategory;
1090+
1091+
/// Tooltip for the save changes button
1092+
///
1093+
/// In en, this message translates to:
1094+
/// **'Save Changes'**
1095+
String get saveChanges;
1096+
1097+
/// Message displayed while loading category data
1098+
///
1099+
/// In en, this message translates to:
1100+
/// **'Loading Category'**
1101+
String get loadingCategory;
1102+
1103+
/// Label for the icon URL input field
1104+
///
1105+
/// In en, this message translates to:
1106+
/// **'Icon URL'**
1107+
String get iconUrl;
1108+
1109+
/// Message displayed when a category is updated successfully
1110+
///
1111+
/// In en, this message translates to:
1112+
/// **'Category updated successfully.'**
1113+
String get categoryUpdatedSuccessfully;
1114+
1115+
/// Error message when updating a category fails because the original data wasn't loaded
1116+
///
1117+
/// In en, this message translates to:
1118+
/// **'Cannot update: Original category data not loaded.'**
1119+
String get cannotUpdateCategoryError;
10841120
}
10851121

10861122
class _AppLocalizationsDelegate

lib/l10n/app_localizations_ar.dart

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -566,4 +566,23 @@ class AppLocalizationsAr extends AppLocalizations {
566566

567567
@override
568568
String get language => 'اللغة';
569+
570+
@override
571+
String get editCategory => 'تعديل الفئة';
572+
573+
@override
574+
String get saveChanges => 'حفظ التغييرات';
575+
576+
@override
577+
String get loadingCategory => 'جاري تحميل الفئة';
578+
579+
@override
580+
String get iconUrl => 'رابط الأيقونة';
581+
582+
@override
583+
String get categoryUpdatedSuccessfully => 'تم تحديث الفئة بنجاح.';
584+
585+
@override
586+
String get cannotUpdateCategoryError =>
587+
'لا يمكن التحديث: لم يتم تحميل بيانات الفئة الأصلية.';
569588
}

lib/l10n/app_localizations_en.dart

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -564,4 +564,23 @@ class AppLocalizationsEn extends AppLocalizations {
564564

565565
@override
566566
String get language => 'Language';
567+
568+
@override
569+
String get editCategory => 'Edit Category';
570+
571+
@override
572+
String get saveChanges => 'Save Changes';
573+
574+
@override
575+
String get loadingCategory => 'Loading Category';
576+
577+
@override
578+
String get iconUrl => 'Icon URL';
579+
580+
@override
581+
String get categoryUpdatedSuccessfully => 'Category updated successfully.';
582+
583+
@override
584+
String get cannotUpdateCategoryError =>
585+
'Cannot update: Original category data not loaded.';
567586
}

lib/l10n/arb/app_ar.arb

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -680,4 +680,29 @@
680680
"@language": {
681681
"description": "رأس العمود للغة"
682682
}
683+
,
684+
"editCategory": "تعديل الفئة",
685+
"@editCategory": {
686+
"description": "عنوان صفحة تعديل الفئة"
687+
},
688+
"saveChanges": "حفظ التغييرات",
689+
"@saveChanges": {
690+
"description": "تلميح لزر حفظ التغييرات"
691+
},
692+
"loadingCategory": "جاري تحميل الفئة",
693+
"@loadingCategory": {
694+
"description": "رسالة تُعرض أثناء تحميل بيانات الفئة"
695+
},
696+
"iconUrl": "رابط الأيقونة",
697+
"@iconUrl": {
698+
"description": "تسمية حقل إدخال رابط الأيقونة"
699+
},
700+
"categoryUpdatedSuccessfully": "تم تحديث الفئة بنجاح.",
701+
"@categoryUpdatedSuccessfully": {
702+
"description": "رسالة تُعرض عند تحديث الفئة بنجاح"
703+
},
704+
"cannotUpdateCategoryError": "لا يمكن التحديث: لم يتم تحميل بيانات الفئة الأصلية.",
705+
"@cannotUpdateCategoryError": {
706+
"description": "رسالة خطأ عند فشل تحديث الفئة بسبب عدم تحميل البيانات الأصلية"
707+
}
683708
}

lib/l10n/arb/app_en.arb

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -679,5 +679,29 @@
679679
"language": "Language",
680680
"@language": {
681681
"description": "Column header for language"
682+
},
683+
"editCategory": "Edit Category",
684+
"@editCategory": {
685+
"description": "Title for the Edit Category page"
686+
},
687+
"saveChanges": "Save Changes",
688+
"@saveChanges": {
689+
"description": "Tooltip for the save changes button"
690+
},
691+
"loadingCategory": "Loading Category",
692+
"@loadingCategory": {
693+
"description": "Message displayed while loading category data"
694+
},
695+
"iconUrl": "Icon URL",
696+
"@iconUrl": {
697+
"description": "Label for the icon URL input field"
698+
},
699+
"categoryUpdatedSuccessfully": "Category updated successfully.",
700+
"@categoryUpdatedSuccessfully": {
701+
"description": "Message displayed when a category is updated successfully"
702+
},
703+
"cannotUpdateCategoryError": "Cannot update: Original category data not loaded.",
704+
"@cannotUpdateCategoryError": {
705+
"description": "Error message when updating a category fails because the original data wasn't loaded"
682706
}
683707
}

0 commit comments

Comments
 (0)