feat(mobile): added more translations (#1805)

This commit is contained in:
Michel Heusschen
2023-02-20 18:22:35 +01:00
committed by GitHub
parent 9bfb4dfd06
commit e408e8ca4a
8 changed files with 60 additions and 31 deletions

View File

@@ -1,3 +1,4 @@
import 'package:easy_localization/easy_localization.dart';
import 'package:auto_route/auto_route.dart';
import 'package:flutter/material.dart';
import 'package:flutter_hooks/flutter_hooks.dart';
@@ -49,12 +50,16 @@ class AddToAlbumBottomSheet extends HookConsumerWidget {
if (result.alreadyInAlbum.isNotEmpty) {
ImmichToast.show(
context: context,
msg: 'Already in ${album.name}',
msg: 'add_to_album_bottom_sheet_already_exists'.tr(
namedArgs: { "album": album.name },
),
);
} else {
ImmichToast.show(
context: context,
msg: 'Added to ${album.name}',
msg: 'add_to_album_bottom_sheet_added'.tr(
namedArgs: { "album": album.name },
),
);
}
}
@@ -90,12 +95,12 @@ class AddToAlbumBottomSheet extends HookConsumerWidget {
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
'Add to album',
'common_add_to_album'.tr(),
style: Theme.of(context).textTheme.displayMedium,
),
TextButton.icon(
icon: const Icon(Icons.add),
label: const Text('Create new album'),
label: Text('common_create_new_album'.tr()),
onPressed: () {
ref
.watch(assetSelectionProvider.notifier)

View File

@@ -1,3 +1,4 @@
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
import 'package:hooks_riverpod/hooks_riverpod.dart';
import 'package:immich_mobile/modules/album/ui/album_thumbnail_listtile.dart';
@@ -27,7 +28,7 @@ class AddToAlbumSliverList extends HookConsumerWidget {
return Padding(
padding: const EdgeInsets.only(bottom: 8),
child: ExpansionTile(
title: const Text('Shared'),
title: Text('common_shared'.tr()),
tilePadding: const EdgeInsets.symmetric(horizontal: 10.0),
leading: const Icon(Icons.group),
children: sharedAlbums