Skip to content

Commit ef53b5e

Browse files
committed
refactor: integrates the localization extension into the EditCategoryPage. I will update the DropdownButtonFormField to display the proper localized status names, replacing the temporary placeholder text.
1 parent ce656a5 commit ef53b5e

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

lib/content_management/view/edit_category_page.dart

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import 'package:go_router/go_router.dart';
44
import 'package:ht_dashboard/content_management/bloc/content_management_bloc.dart';
55
import 'package:ht_dashboard/content_management/bloc/edit_category/edit_category_bloc.dart';
66
import 'package:ht_dashboard/l10n/l10n.dart';
7+
import 'package:ht_dashboard/shared/extensions/content_status_l10n.dart';
78
import 'package:ht_dashboard/shared/constants/pagination_constants.dart';
89
import 'package:ht_dashboard/shared/shared.dart';
910
import 'package:ht_data_repository/ht_data_repository.dart';
@@ -202,12 +203,7 @@ class _EditCategoryViewState extends State<_EditCategoryView> {
202203
items: ContentStatus.values.map((status) {
203204
return DropdownMenuItem(
204205
value: status,
205-
child: Text(
206-
status.name.replaceFirst(
207-
status.name[0],
208-
status.name[0].toUpperCase(),
209-
),
210-
),
206+
child: Text(status.l10n(context)),
211207
);
212208
}).toList(),
213209
onChanged: (value) {

0 commit comments

Comments
 (0)