mirror of
https://github.com/immich-app/immich.git
synced 2025-12-16 07:23:44 +09:00
fix(mobile): add translate extension (#18942)
* re-write localization service and add translation extension * Revert "re-write localization service and add translation extension" This reverts commitfdd7386020. * fix can't use context for easy_localization * fix lint * update new translate context * handle context null * revert main file * Revert "revert main file" This reverts commit16faca46d0. * remove fix nested MaterialApp * change use t extenstion and remove translation utils * update function call similar for consistently --------- Co-authored-by: dvbthien <dvbthien@gmail.com>
This commit is contained in:
@@ -6,10 +6,10 @@ import 'package:immich_mobile/constants/enums.dart';
|
||||
import 'package:immich_mobile/entities/asset.entity.dart';
|
||||
import 'package:immich_mobile/extensions/asset_extensions.dart';
|
||||
import 'package:immich_mobile/extensions/build_context_extensions.dart';
|
||||
import 'package:immich_mobile/extensions/translate_extensions.dart';
|
||||
import 'package:immich_mobile/providers/asset.provider.dart';
|
||||
import 'package:immich_mobile/services/asset.service.dart';
|
||||
import 'package:immich_mobile/services/share.service.dart';
|
||||
import 'package:immich_mobile/utils/translation.dart';
|
||||
import 'package:immich_mobile/widgets/common/date_time_picker.dart';
|
||||
import 'package:immich_mobile/widgets/common/immich_toast.dart';
|
||||
import 'package:immich_mobile/widgets/common/location_picker.dart';
|
||||
@@ -59,10 +59,11 @@ Future<void> handleArchiveAssets(
|
||||
await ref
|
||||
.read(assetProvider.notifier)
|
||||
.toggleArchive(selection, shouldArchive);
|
||||
|
||||
final message = shouldArchive
|
||||
? t('moved_to_archive', {'count': selection.length})
|
||||
: t('moved_to_library', {'count': selection.length});
|
||||
? 'moved_to_archive'
|
||||
.t(context: context, args: {'count': selection.length})
|
||||
: 'moved_to_library'
|
||||
.t(context: context, args: {'count': selection.length});
|
||||
if (context.mounted) {
|
||||
ImmichToast.show(
|
||||
context: context,
|
||||
|
||||
Reference in New Issue
Block a user