Skip to content

Commit b8b00e5

Browse files
committed
refactor: integrates the localization extension into the CreateHeadlinePage. I will update the DropdownButtonFormField for ContentStatus to display the localized status names, replacing the temporary placeholder text.
1 parent c84fb40 commit b8b00e5

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

lib/content_management/view/create_headline_page.dart

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import 'package:flutter_bloc/flutter_bloc.dart';
33
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/create_headline/create_headline_bloc.dart';
6+
import 'package:ht_dashboard/shared/extensions/content_status_l10n.dart';
67
import 'package:ht_dashboard/l10n/l10n.dart';
78
import 'package:ht_dashboard/shared/constants/pagination_constants.dart';
89
import 'package:ht_dashboard/shared/shared.dart';
@@ -224,12 +225,7 @@ class _CreateHeadlineViewState extends State<_CreateHeadlineView> {
224225
items: ContentStatus.values.map((status) {
225226
return DropdownMenuItem(
226227
value: status,
227-
child: Text(
228-
status.name.replaceFirst(
229-
status.name[0],
230-
status.name[0].toUpperCase(),
231-
),
232-
),
228+
child: Text(status.l10n(context)),
233229
);
234230
}).toList(),
235231
onChanged: (value) {

0 commit comments

Comments
 (0)