1
0
mirror of https://github.com/immich-app/immich.git synced 2025-08-10 23:22:22 +02:00

feat(mobile): typed translation keys (#18946)

* feat(mobile): typed translation keys

* ignore lint

---------

Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com>
This commit is contained in:
shenlong
2025-06-09 08:08:45 +05:30
committed by GitHub
parent 526206b2a5
commit a932cbae38
4 changed files with 2639 additions and 11 deletions

2562
mobile/lib/generated/intl_keys.g.dart generated Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -5,6 +5,7 @@ import 'package:hooks_riverpod/hooks_riverpod.dart';
import 'package:immich_mobile/domain/models/user.model.dart';
import 'package:immich_mobile/extensions/asyncvalue_extensions.dart';
import 'package:immich_mobile/extensions/build_context_extensions.dart';
import 'package:immich_mobile/generated/intl_keys.g.dart';
import 'package:immich_mobile/providers/album/album.provider.dart';
import 'package:immich_mobile/providers/partner.provider.dart';
import 'package:immich_mobile/providers/search/people.provider.dart';
@@ -41,13 +42,13 @@ class LibraryPage extends ConsumerWidget {
ActionButton(
onPressed: () => context.pushRoute(const FavoritesRoute()),
icon: Icons.favorite_outline_rounded,
label: 'favorites'.tr(),
label: IntlKeys.favorites.tr(),
),
const SizedBox(width: 8),
ActionButton(
onPressed: () => context.pushRoute(const ArchiveRoute()),
icon: Icons.archive_outlined,
label: 'archived'.tr(),
label: IntlKeys.archived.tr(),
),
],
),
@@ -58,14 +59,14 @@ class LibraryPage extends ConsumerWidget {
ActionButton(
onPressed: () => context.pushRoute(const SharedLinkRoute()),
icon: Icons.link_outlined,
label: 'shared_links'.tr(),
label: IntlKeys.shared_links.tr(),
),
SizedBox(width: trashEnabled ? 8 : 0),
trashEnabled
? ActionButton(
onPressed: () => context.pushRoute(const TrashRoute()),
icon: Icons.delete_outline_rounded,
label: 'trash'.tr(),
label: IntlKeys.trash.tr(),
)
: const SizedBox.shrink(),
],
@@ -133,7 +134,7 @@ class QuickAccessButtons extends ConsumerWidget {
size: 26,
),
title: Text(
'folders'.tr(),
IntlKeys.folders.tr(),
style: context.textTheme.titleSmall?.copyWith(
fontWeight: FontWeight.w500,
),
@@ -146,7 +147,7 @@ class QuickAccessButtons extends ConsumerWidget {
size: 26,
),
title: Text(
'locked_folder'.tr(),
IntlKeys.locked_folder.tr(),
style: context.textTheme.titleSmall?.copyWith(
fontWeight: FontWeight.w500,
),
@@ -159,7 +160,7 @@ class QuickAccessButtons extends ConsumerWidget {
size: 26,
),
title: Text(
'partners'.tr(),
IntlKeys.partners.tr(),
style: context.textTheme.titleSmall?.copyWith(
fontWeight: FontWeight.w500,
),
@@ -275,7 +276,7 @@ class PeopleCollectionCard extends ConsumerWidget {
Padding(
padding: const EdgeInsets.all(8.0),
child: Text(
'people'.tr(),
IntlKeys.people.tr(),
style: context.textTheme.titleSmall?.copyWith(
color: context.colorScheme.onSurface,
fontWeight: FontWeight.w500,
@@ -343,7 +344,7 @@ class LocalAlbumsCollectionCard extends HookConsumerWidget {
Padding(
padding: const EdgeInsets.all(8.0),
child: Text(
'on_this_device'.tr(),
IntlKeys.on_this_device.tr(),
style: context.textTheme.titleSmall?.copyWith(
color: context.colorScheme.onSurface,
fontWeight: FontWeight.w500,
@@ -404,7 +405,7 @@ class PlacesCollectionCard extends StatelessWidget {
Padding(
padding: const EdgeInsets.all(8.0),
child: Text(
'places'.tr(),
IntlKeys.places.tr(),
style: context.textTheme.titleSmall?.copyWith(
color: context.colorScheme.onSurface,
fontWeight: FontWeight.w500,