Skip to content

Commit 50a0fe3

Browse files
committed
refactor: integrates the localization extension into the EditSourcePage. I will update the DropdownButtonFormField to display the proper localized status names, replacing the temporary placeholder text.
1 parent 7f7a37a commit 50a0fe3

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

lib/content_management/view/edit_source_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_source/edit_source_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';
@@ -268,12 +269,7 @@ class _EditSourceViewState extends State<_EditSourceView> {
268269
items: ContentStatus.values.map((status) {
269270
return DropdownMenuItem(
270271
value: status,
271-
child: Text(
272-
status.name.replaceFirst(
273-
status.name[0],
274-
status.name[0].toUpperCase(),
275-
),
276-
),
272+
child: Text(status.l10n(context)),
277273
);
278274
}).toList(),
279275
onChanged: (value) {

0 commit comments

Comments
 (0)