Skip to content

Commit ff9ee46

Browse files
committed
refactor(app_configuration): localize ad type labels in article ad settings form
- Add import for AdType localization extension - Replace ad type name with localized version in ButtonSegment label
1 parent fe12a4d commit ff9ee46

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/app_configuration/widgets/article_ad_settings_form.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import 'package:core/core.dart';
22
import 'package:flutter/material.dart';
33
import 'package:flutter_news_app_web_dashboard_full_source_code/l10n/l10n.dart';
4+
import 'package:flutter_news_app_web_dashboard_full_source_code/shared/extensions/ad_type_l10n.dart';
45
import 'package:flutter_news_app_web_dashboard_full_source_code/shared/extensions/in_article_ad_slot_type_l10n.dart';
56
import 'package:ui_kit/ui_kit.dart';
67

@@ -97,7 +98,7 @@ class _ArticleAdSettingsFormState extends State<ArticleAdSettingsForm>
9798
.map(
9899
(type) => ButtonSegment<AdType>(
99100
value: type,
100-
label: Text(type.name),
101+
label: Text(type.l10n(context)),
101102
),
102103
)
103104
.toList(),

0 commit comments

Comments
 (0)