Skip to content

Commit d891c48

Browse files
authored
Merge pull request #76 from flutter-news-app-full-source-code/app-config-missing-localizations
App config missing localizations
2 parents 320452c + 0a07f60 commit d891c48

19 files changed

+214
-72
lines changed

lib/app_configuration/view/app_configuration_page.dart

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,9 @@ class _AppConfigurationPageState extends State<AppConfigurationPage>
7373
tabAlignment: TabAlignment.start,
7474
isScrollable: true,
7575
tabs: [
76+
Tab(text: l10n.generalTab),
7677
Tab(text: l10n.feedTab),
7778
Tab(text: l10n.advertisementsTab),
78-
Tab(text: l10n.generalTab),
7979
],
8080
),
8181
],
@@ -143,23 +143,23 @@ class _AppConfigurationPageState extends State<AppConfigurationPage>
143143
return TabBarView(
144144
controller: _tabController,
145145
children: [
146-
FeedConfigurationTab(
146+
GeneralConfigurationTab(
147147
remoteConfig: remoteConfig,
148148
onConfigChanged: (newConfig) {
149149
context.read<AppConfigurationBloc>().add(
150150
AppConfigurationFieldChanged(remoteConfig: newConfig),
151151
);
152152
},
153153
),
154-
AdvertisementsConfigurationTab(
154+
FeedConfigurationTab(
155155
remoteConfig: remoteConfig,
156156
onConfigChanged: (newConfig) {
157157
context.read<AppConfigurationBloc>().add(
158158
AppConfigurationFieldChanged(remoteConfig: newConfig),
159159
);
160160
},
161161
),
162-
GeneralConfigurationTab(
162+
AdvertisementsConfigurationTab(
163163
remoteConfig: remoteConfig,
164164
onConfigChanged: (newConfig) {
165165
context.read<AppConfigurationBloc>().add(

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(),

lib/app_configuration/widgets/feed_ad_settings_form.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import 'package:flutter/material.dart';
33
import 'package:flutter_news_app_web_dashboard_full_source_code/app_configuration/widgets/app_config_form_fields.dart';
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';
6+
import 'package:flutter_news_app_web_dashboard_full_source_code/shared/extensions/ad_type_l10n.dart';
67
import 'package:flutter_news_app_web_dashboard_full_source_code/shared/extensions/app_user_role_l10n.dart';
78
import 'package:ui_kit/ui_kit.dart';
89

@@ -174,7 +175,7 @@ class _FeedAdSettingsFormState extends State<FeedAdSettingsForm>
174175
.map(
175176
(type) => ButtonSegment<AdType>(
176177
value: type,
177-
label: Text(type.name),
178+
label: Text(type.l10n(context)),
178179
),
179180
)
180181
.toList(),

lib/l10n/app_localizations.dart

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2359,6 +2359,54 @@ abstract class AppLocalizations {
23592359
/// In en, this message translates to:
23602360
/// **'Local'**
23612361
String get adPlatformTypeLocal;
2362+
2363+
/// Tab title for Native Ads in local ads management.
2364+
///
2365+
/// In en, this message translates to:
2366+
/// **'Native Ads'**
2367+
String get nativeAdsTab;
2368+
2369+
/// Tab title for Banner Ads in local ads management.
2370+
///
2371+
/// In en, this message translates to:
2372+
/// **'Banner Ads'**
2373+
String get bannerAdsTab;
2374+
2375+
/// Tab title for Interstitial Ads in local ads management.
2376+
///
2377+
/// In en, this message translates to:
2378+
/// **'Interstitial Ads'**
2379+
String get interstitialAdsTab;
2380+
2381+
/// Tab title for Video Ads in local ads management.
2382+
///
2383+
/// In en, this message translates to:
2384+
/// **'Video Ads'**
2385+
String get videoAdsTab;
2386+
2387+
/// Label for Banner Ad Type.
2388+
///
2389+
/// In en, this message translates to:
2390+
/// **'Banner'**
2391+
String get bannerAdType;
2392+
2393+
/// Label for Native Ad Type.
2394+
///
2395+
/// In en, this message translates to:
2396+
/// **'Native'**
2397+
String get nativeAdType;
2398+
2399+
/// Label for Interstitial Ad Type.
2400+
///
2401+
/// In en, this message translates to:
2402+
/// **'Interstitial'**
2403+
String get interstitialAdType;
2404+
2405+
/// Label for Video Ad Type.
2406+
///
2407+
/// In en, this message translates to:
2408+
/// **'Video'**
2409+
String get videoAdType;
23622410
}
23632411

23642412
class _AppLocalizationsDelegate

lib/l10n/app_localizations_ar.dart

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1263,4 +1263,28 @@ class AppLocalizationsAr extends AppLocalizations {
12631263

12641264
@override
12651265
String get adPlatformTypeLocal => 'محلي';
1266+
1267+
@override
1268+
String get nativeAdsTab => 'إعلانات أصلية';
1269+
1270+
@override
1271+
String get bannerAdsTab => 'إعلانات بانر';
1272+
1273+
@override
1274+
String get interstitialAdsTab => 'إعلانات بينية';
1275+
1276+
@override
1277+
String get videoAdsTab => 'إعلانات فيديو';
1278+
1279+
@override
1280+
String get bannerAdType => 'بانر';
1281+
1282+
@override
1283+
String get nativeAdType => 'أصلي';
1284+
1285+
@override
1286+
String get interstitialAdType => 'بيني';
1287+
1288+
@override
1289+
String get videoAdType => 'فيديو';
12661290
}

lib/l10n/app_localizations_en.dart

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1265,4 +1265,28 @@ class AppLocalizationsEn extends AppLocalizations {
12651265

12661266
@override
12671267
String get adPlatformTypeLocal => 'Local';
1268+
1269+
@override
1270+
String get nativeAdsTab => 'Native Ads';
1271+
1272+
@override
1273+
String get bannerAdsTab => 'Banner Ads';
1274+
1275+
@override
1276+
String get interstitialAdsTab => 'Interstitial Ads';
1277+
1278+
@override
1279+
String get videoAdsTab => 'Video Ads';
1280+
1281+
@override
1282+
String get bannerAdType => 'Banner';
1283+
1284+
@override
1285+
String get nativeAdType => 'Native';
1286+
1287+
@override
1288+
String get interstitialAdType => 'Interstitial';
1289+
1290+
@override
1291+
String get videoAdType => 'Video';
12681292
}

lib/l10n/arb/app_ar.arb

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1581,5 +1581,37 @@
15811581
"adPlatformTypeLocal": "محلي",
15821582
"@adPlatformTypeLocal": {
15831583
"description": "اسم منصة الإعلانات المحلية للإعلانات المخصصة."
1584+
},
1585+
"nativeAdsTab": "إعلانات أصلية",
1586+
"@nativeAdsTab": {
1587+
"description": "عنوان تبويب الإعلانات الأصلية في إدارة الإعلانات المحلية."
1588+
},
1589+
"bannerAdsTab": "إعلانات بانر",
1590+
"@bannerAdsTab": {
1591+
"description": "عنوان تبويب إعلانات البانر في إدارة الإعلانات المحلية."
1592+
},
1593+
"interstitialAdsTab": "إعلانات بينية",
1594+
"@interstitialAdsTab": {
1595+
"description": "عنوان تبويب الإعلانات البينية في إدارة الإعلانات المحلية."
1596+
},
1597+
"videoAdsTab": "إعلانات فيديو",
1598+
"@videoAdsTab": {
1599+
"description": "عنوان تبويب إعلانات الفيديو في إدارة الإعلانات المحلية."
1600+
},
1601+
"bannerAdType": "بانر",
1602+
"@bannerAdType": {
1603+
"description": "تسمية نوع إعلان البانر."
1604+
},
1605+
"nativeAdType": "أصلي",
1606+
"@nativeAdType": {
1607+
"description": "تسمية نوع الإعلان الأصلي."
1608+
},
1609+
"interstitialAdType": "بيني",
1610+
"@interstitialAdType": {
1611+
"description": "تسمية نوع الإعلان البيني."
1612+
},
1613+
"videoAdType": "فيديو",
1614+
"@videoAdType": {
1615+
"description": "تسمية نوع إعلان الفيديو."
15841616
}
15851617
}

lib/l10n/arb/app_en.arb

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1577,5 +1577,37 @@
15771577
"adPlatformTypeLocal": "Local",
15781578
"@adPlatformTypeLocal": {
15791579
"description": "The name of the Local ad platform for custom ads."
1580+
},
1581+
"nativeAdsTab": "Native Ads",
1582+
"@nativeAdsTab": {
1583+
"description": "Tab title for Native Ads in local ads management."
1584+
},
1585+
"bannerAdsTab": "Banner Ads",
1586+
"@bannerAdsTab": {
1587+
"description": "Tab title for Banner Ads in local ads management."
1588+
},
1589+
"interstitialAdsTab": "Interstitial Ads",
1590+
"@interstitialAdsTab": {
1591+
"description": "Tab title for Interstitial Ads in local ads management."
1592+
},
1593+
"videoAdsTab": "Video Ads",
1594+
"@videoAdsTab": {
1595+
"description": "Tab title for Video Ads in local ads management."
1596+
},
1597+
"bannerAdType": "Banner",
1598+
"@bannerAdType": {
1599+
"description": "Label for Banner Ad Type."
1600+
},
1601+
"nativeAdType": "Native",
1602+
"@nativeAdType": {
1603+
"description": "Label for Native Ad Type."
1604+
},
1605+
"interstitialAdType": "Interstitial",
1606+
"@interstitialAdType": {
1607+
"description": "Label for Interstitial Ad Type."
1608+
},
1609+
"videoAdType": "Video",
1610+
"@videoAdType": {
1611+
"description": "Label for Video Ad Type."
15801612
}
15811613
}

lib/local_ads_management/bloc/create_local_ads/create_local_ads_bloc.dart

Lines changed: 0 additions & 14 deletions
This file was deleted.

lib/local_ads_management/bloc/create_local_ads/create_local_ads_event.dart

Lines changed: 0 additions & 8 deletions
This file was deleted.

0 commit comments

Comments
 (0)