Skip to content

Commit ad99478

Browse files
committed
feat(l10n): integrate ht_ui_kit localizations
Adds the HtUiKitLocalizations delegate to the MaterialApp configuration. This makes the shared, localized error strings from the UI kit package available throughout the dashboard application, preparing it for the refactoring of error handling logic.
1 parent 0cb2f77 commit ad99478

File tree

3 files changed

+19
-4
lines changed

3 files changed

+19
-4
lines changed

lib/app/view/app.dart

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import 'package:ht_dashboard/authentication/bloc/authentication_bloc.dart';
1313
import 'package:ht_dashboard/content_management/bloc/content_management_bloc.dart';
1414
import 'package:ht_dashboard/dashboard/bloc/dashboard_bloc.dart';
1515
import 'package:ht_dashboard/l10n/app_localizations.dart';
16+
import 'package:ht_ui_kit/ht_ui_kit.dart';
1617
import 'package:ht_dashboard/router/router.dart';
1718
// Import for app_theme.dart
1819
import 'package:ht_dashboard/shared/theme/app_theme.dart';
@@ -209,9 +210,11 @@ class _AppViewState extends State<_AppView> {
209210
child: MaterialApp.router(
210211
debugShowCheckedModeBanner: false,
211212
routerConfig: _router,
212-
localizationsDelegates:
213-
AppLocalizations.localizationsDelegates,
214-
supportedLocales: AppLocalizations.supportedLocales,
213+
localizationsDelegates: const [
214+
HtUiKitLocalizations.delegate,
215+
...AppLocalizations.localizationsDelegates,
216+
],
217+
supportedLocales: HtUiKitLocalizations.supportedLocales,
215218
theme: baseTheme == AppBaseTheme.dark
216219
? darkThemeData
217220
: lightThemeData,

pubspec.lock

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ packages:
277277
description:
278278
path: "."
279279
ref: HEAD
280-
resolved-ref: "0b56d92624769ca3175d5ce2c7da27ab29514f8a"
280+
resolved-ref: "6484a5641c3d633d286ea5848c5b7cf1e723ebc1"
281281
url: "https://github.com/headlines-toolkit/ht-http-client.git"
282282
source: git
283283
version: "0.0.0"
@@ -308,6 +308,15 @@ packages:
308308
url: "https://github.com/headlines-toolkit/ht-shared.git"
309309
source: git
310310
version: "0.0.0"
311+
ht_ui_kit:
312+
dependency: "direct main"
313+
description:
314+
path: "."
315+
ref: HEAD
316+
resolved-ref: c33ec118041a9de02c96b177a88d646a08abd396
317+
url: "https://github.com/headlines-toolkit/ht-ui-kit.git"
318+
source: git
319+
version: "0.0.0"
311320
http:
312321
dependency: transitive
313322
description:

pubspec.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,9 @@ dependencies:
5757
ht_shared:
5858
git:
5959
url: https://github.com/headlines-toolkit/ht-shared.git
60+
ht_ui_kit:
61+
git:
62+
url: https://github.com/headlines-toolkit/ht-ui-kit.git
6063
intl: ^0.20.2
6164
logging: ^1.3.0
6265
timeago: ^3.7.1

0 commit comments

Comments
 (0)