mirror of
https://github.com/immich-app/immich
synced 2025-11-14 17:36:12 +00: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:
parent
526206b2a5
commit
a932cbae38
4 changed files with 2639 additions and 11 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue