Skip to content

Commit 97a1e03

Browse files
committed
feat(localization): add localization support for in-article ad slot types
- Import InArticleAdSlotTypeL10N extension - Replace slot type name with localized version in UI
1 parent 489e068 commit 97a1e03

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
@@ -4,6 +4,7 @@ import 'package:flutter_news_app_web_dashboard_full_source_code/app_configuratio
44
import 'package:flutter_news_app_web_dashboard_full_source_code/l10n/app_localizations.dart';
55
import 'package:flutter_news_app_web_dashboard_full_source_code/l10n/l10n.dart';
66
import 'package:flutter_news_app_web_dashboard_full_source_code/shared/extensions/app_user_role_l10n.dart';
7+
import 'package:flutter_news_app_web_dashboard_full_source_code/shared/extensions/in_article_ad_slot_type_l10n.dart';
78
import 'package:ui_kit/ui_kit.dart';
89

910
/// {@template article_ad_settings_form}
@@ -275,7 +276,7 @@ class _ArticleAdSettingsFormState extends State<ArticleAdSettingsForm>
275276
const SizedBox(height: AppSpacing.lg),
276277
...articleAdConfig.inArticleAdSlotConfigurations.map(
277278
(slotConfig) => SwitchListTile(
278-
title: Text(slotConfig.slotType.name),
279+
title: Text(slotConfig.slotType.l10n(context)),
279280
value: slotConfig.enabled,
280281
onChanged: (value) {
281282
final updatedSlots = articleAdConfig

0 commit comments

Comments
 (0)