Skip to content

Commit 6ae462e

Browse files
committed
feat(l10n): add excerpt and country fields
- Added 'excerpt' and 'countryName' fields - Updated translations for all locales - Updated ARB files with descriptions - Renamed category to topic in routes - Updated route paths and names
1 parent 3aadf18 commit 6ae462e

File tree

7 files changed

+55
-15
lines changed

7 files changed

+55
-15
lines changed

lib/l10n/app_localizations.dart

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1016,6 +1016,18 @@ abstract class AppLocalizations {
10161016
/// **'Title'**
10171017
String get headlineTitle;
10181018

1019+
/// Label for the excerpt input field
1020+
///
1021+
/// In en, this message translates to:
1022+
/// **'Excerpt'**
1023+
String get excerpt;
1024+
1025+
/// Label for the country name dropdown field
1026+
///
1027+
/// In en, this message translates to:
1028+
/// **'Country'**
1029+
String get countryName;
1030+
10191031
/// Column header for published date
10201032
///
10211033
/// In en, this message translates to:

lib/l10n/app_localizations_ar.dart

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -535,6 +535,12 @@ class AppLocalizationsAr extends AppLocalizations {
535535
@override
536536
String get headlineTitle => 'العنوان';
537537

538+
@override
539+
String get excerpt => 'المقتطف';
540+
541+
@override
542+
String get countryName => 'البلد';
543+
538544
@override
539545
String get publishedAt => 'تاريخ النشر';
540546

lib/l10n/app_localizations_en.dart

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -533,6 +533,12 @@ class AppLocalizationsEn extends AppLocalizations {
533533
@override
534534
String get headlineTitle => 'Title';
535535

536+
@override
537+
String get excerpt => 'Excerpt';
538+
539+
@override
540+
String get countryName => 'Country';
541+
536542
@override
537543
String get publishedAt => 'Published At';
538544

lib/l10n/arb/app_ar.arb

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -636,6 +636,14 @@
636636
"@headlineTitle": {
637637
"description": "رأس العمود لعنوان الخبر"
638638
},
639+
"excerpt": "المقتطف",
640+
"@excerpt": {
641+
"description": "تسمية حقل إدخال المقتطف"
642+
},
643+
"countryName": "البلد",
644+
"@countryName": {
645+
"description": "تسمية حقل القائمة المنسدلة لاسم البلد"
646+
},
639647
"publishedAt": "تاريخ النشر",
640648
"@publishedAt": {
641649
"description": "رأس العمود لتاريخ النشر"

lib/l10n/arb/app_en.arb

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -636,6 +636,14 @@
636636
"@headlineTitle": {
637637
"description": "Column header for headline title"
638638
},
639+
"excerpt": "Excerpt",
640+
"@excerpt": {
641+
"description": "Label for the excerpt input field"
642+
},
643+
"countryName": "Country",
644+
"@countryName": {
645+
"description": "Label for the country name dropdown field"
646+
},
639647
"publishedAt": "Published At",
640648
"@publishedAt": {
641649
"description": "Column header for published date"
@@ -923,4 +931,4 @@
923931
}
924932
}
925933

926-
}
934+
}

lib/router/router.dart

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -170,16 +170,16 @@ GoRouter createRouter({
170170
},
171171
),
172172
GoRoute(
173-
path: Routes.createCategory,
174-
name: Routes.createCategoryName,
175-
builder: (context, state) => const CreateCategoryPage(),
173+
path: Routes.createTopic,
174+
name: Routes.createTopicName,
175+
builder: (context, state) => const CreateTopicPage(),
176176
),
177177
GoRoute(
178-
path: Routes.editCategory,
179-
name: Routes.editCategoryName,
178+
path: Routes.editTopic,
179+
name: Routes.editTopicName,
180180
builder: (context, state) {
181181
final id = state.pathParameters['id']!;
182-
return EditCategoryPage(categoryId: id);
182+
return EditTopicPage(topicId: id);
183183
},
184184
),
185185
GoRoute(

lib/router/routes.dart

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -56,17 +56,17 @@ abstract final class Routes {
5656
/// The name for the edit headline page route.
5757
static const String editHeadlineName = 'editHeadline';
5858

59-
/// The path for creating a new category.
60-
static const String createCategory = 'create-category';
59+
/// The path for creating a new topic.
60+
static const String createTopic = 'create-topic';
6161

62-
/// The name for the create category page route.
63-
static const String createCategoryName = 'createCategory';
62+
/// The name for the create topic page route.
63+
static const String createTopicName = 'createTopic';
6464

65-
/// The path for editing an existing category.
66-
static const String editCategory = 'edit-category/:id';
65+
/// The path for editing an existing topic.
66+
static const String editTopic = 'edit-topic/:id';
6767

68-
/// The name for the edit category page route.
69-
static const String editCategoryName = 'editCategory';
68+
/// The name for the edit topic page route.
69+
static const String editTopicName = 'editTopic';
7070

7171
/// The path for creating a new source.
7272
static const String createSource = 'create-source';

0 commit comments

Comments
 (0)