diff --git a/mobile/assets/i18n/en-US.json b/mobile/assets/i18n/en-US.json index 502384e6a6..3226e418bb 100644 --- a/mobile/assets/i18n/en-US.json +++ b/mobile/assets/i18n/en-US.json @@ -1,4 +1,6 @@ { + "add_to_album_bottom_sheet_added": "Added to {album}", + "add_to_album_bottom_sheet_already_exists": "Already in {album}", "album_info_card_backup_album_excluded": "EXCLUDED", "album_info_card_backup_album_included": "INCLUDED", "album_thumbnail_card_item": "1 item", @@ -87,11 +89,19 @@ "cache_settings_subtitle": "Control the caching behaviour of the Immich mobile application", "cache_settings_thumbnail_size": "Thumbnail cache size ({} assets)", "cache_settings_title": "Caching Settings", - "control_bottom_app_bar_add_to_album": "Add to album", + "change_password_form_description": "Hi {firstName} {lastName},\n\nThis is either the first time you are signing into the system or a request has been made to change your password. Please enter the new password below.", + "change_password_form_new_password": "New Password", + "change_password_form_password_mismatch": "Passwords do not match", + "change_password_form_confirm_password": "Confirm Password", + "change_password_form_reenter_new_password": "Re-enter New Password", + "common_add_to_album": "Add to album", + "common_change_password": "Change Password", + "common_create_new_album": "Create new album", + "common_shared": "Shared", "control_bottom_app_bar_album_info": "{} items", "control_bottom_app_bar_album_info_shared": "{} items ยท Shared", - "control_bottom_app_bar_create_new_album": "Create new album", "control_bottom_app_bar_delete": "Delete", + "control_bottom_app_bar_favorite": "Favorite", "control_bottom_app_bar_share": "Share", "create_album_page_untitled": "Untitled", "create_shared_album_page_create": "Create", @@ -114,9 +124,13 @@ "experimental_settings_title": "Experimental", "favorites_page_title": "Favorites", "home_page_add_to_album_conflicts": "Added {added} assets to album {album}. {failed} assets are already in the album.", + "home_page_add_to_album_err_local": "Can not add local assets to albums yet, skipping", "home_page_add_to_album_success": "Added {added} assets to album {album}.", "home_page_building_timeline": "Building the timeline", + "home_page_favorite_err_local": "Can not favorite local assets yet, skipping", "home_page_first_time_notice": "If this is your first time using the app, please make sure to choose a backup album(s) so that the timeline can populate photos and videos in the album(s).", + "image_viewer_page_state_provider_download_error": "Download Error", + "image_viewer_page_state_provider_download_success": "Download Success", "library_page_albums": "Albums", "library_page_favorites": "Favorites", "library_page_new_album": "New album", @@ -153,6 +167,8 @@ "select_additional_user_for_sharing_page_suggestions": "Suggestions", "select_user_for_sharing_page_err_album": "Failed to create album", "select_user_for_sharing_page_share_suggestions": "Suggestions", + "server_info_box_app_version": "App Version", + "server_info_box_server_version": "Server Version", "setting_image_viewer_help": "The detail viewer loads the small thumbnail first, then loads the medium-size preview (if enabled), finally loads the original (if enabled).", "setting_image_viewer_original_subtitle": "Enable to load the original full-resolution image (large!). Disable to reduce data usage (both network and on device cache).", "setting_image_viewer_original_title": "Load original image", diff --git a/mobile/lib/modules/album/ui/add_to_album_bottom_sheet.dart b/mobile/lib/modules/album/ui/add_to_album_bottom_sheet.dart index 21397b335c..617010ae77 100644 --- a/mobile/lib/modules/album/ui/add_to_album_bottom_sheet.dart +++ b/mobile/lib/modules/album/ui/add_to_album_bottom_sheet.dart @@ -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) diff --git a/mobile/lib/modules/album/ui/add_to_album_sliverlist.dart b/mobile/lib/modules/album/ui/add_to_album_sliverlist.dart index 82bd21809f..4fcd3beadb 100644 --- a/mobile/lib/modules/album/ui/add_to_album_sliverlist.dart +++ b/mobile/lib/modules/album/ui/add_to_album_sliverlist.dart @@ -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 diff --git a/mobile/lib/modules/asset_viewer/providers/image_viewer_page_state.provider.dart b/mobile/lib/modules/asset_viewer/providers/image_viewer_page_state.provider.dart index 4cbe51b28a..ffb2e980eb 100644 --- a/mobile/lib/modules/asset_viewer/providers/image_viewer_page_state.provider.dart +++ b/mobile/lib/modules/asset_viewer/providers/image_viewer_page_state.provider.dart @@ -1,3 +1,4 @@ +import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; import 'package:fluttertoast/fluttertoast.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; @@ -29,7 +30,7 @@ class ImageViewerStateNotifier extends StateNotifier { ImmichToast.show( context: context, - msg: "Download Success", + msg: 'image_viewer_page_state_provider_download_success'.tr(), toastType: ToastType.success, gravity: ToastGravity.BOTTOM, ); @@ -37,7 +38,7 @@ class ImageViewerStateNotifier extends StateNotifier { state = state.copyWith(downloadAssetStatus: DownloadAssetStatus.error); ImmichToast.show( context: context, - msg: "Download Error", + msg: 'image_viewer_page_state_provider_download_error'.tr(), toastType: ToastType.error, gravity: ToastGravity.BOTTOM, ); diff --git a/mobile/lib/modules/home/ui/control_bottom_app_bar.dart b/mobile/lib/modules/home/ui/control_bottom_app_bar.dart index 8f53e062f6..6341081b27 100644 --- a/mobile/lib/modules/home/ui/control_bottom_app_bar.dart +++ b/mobile/lib/modules/home/ui/control_bottom_app_bar.dart @@ -43,7 +43,7 @@ class ControlBottomAppBar extends ConsumerWidget { ), ControlBoxButton( iconData: Icons.star_rounded, - label: "Favorite", + label: "control_bottom_app_bar_favorite".tr(), onPressed: () { onFavorite(); }, @@ -140,7 +140,7 @@ class AddToAlbumTitleRow extends StatelessWidget { mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ const Text( - "control_bottom_app_bar_add_to_album", + "common_add_to_album", style: TextStyle( fontSize: 14, fontWeight: FontWeight.bold, @@ -150,7 +150,7 @@ class AddToAlbumTitleRow extends StatelessWidget { onPressed: onCreateNewAlbum, icon: const Icon(Icons.add), label: Text( - "control_bottom_app_bar_create_new_album", + "common_create_new_album", style: TextStyle( color: Theme.of(context).primaryColor, fontWeight: FontWeight.bold, diff --git a/mobile/lib/modules/home/ui/profile_drawer/server_info_box.dart b/mobile/lib/modules/home/ui/profile_drawer/server_info_box.dart index 04edfc5f79..2fb959ee69 100644 --- a/mobile/lib/modules/home/ui/profile_drawer/server_info_box.dart +++ b/mobile/lib/modules/home/ui/profile_drawer/server_info_box.dart @@ -73,7 +73,7 @@ class ServerInfoBox extends HookConsumerWidget { mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ Text( - "App Version", + "server_info_box_app_version".tr(), style: TextStyle( fontSize: 11, color: Colors.grey[500], @@ -98,7 +98,7 @@ class ServerInfoBox extends HookConsumerWidget { mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ Text( - "Server Version", + "server_info_box_server_version".tr(), style: TextStyle( fontSize: 11, color: Colors.grey[500], diff --git a/mobile/lib/modules/home/views/home_page.dart b/mobile/lib/modules/home/views/home_page.dart index f0cb411aa2..d1bdf1406a 100644 --- a/mobile/lib/modules/home/views/home_page.dart +++ b/mobile/lib/modules/home/views/home_page.dart @@ -102,7 +102,7 @@ class HomePage extends HookConsumerWidget { void onFavoriteAssets() { final remoteAssets = remoteOnlySelection( - localErrorMessage: 'Can not favorite local assets yet, skipping', + localErrorMessage: 'home_page_favorite_err_local'.tr(), ); if (remoteAssets.isNotEmpty) { ref.watch(favoriteProvider.notifier).addToFavorites(remoteAssets); @@ -125,7 +125,7 @@ class HomePage extends HookConsumerWidget { void onAddToAlbum(Album album) async { final Iterable assets = remoteOnlySelection( - localErrorMessage: "Can not add local assets to albums yet, skipping", + localErrorMessage: "home_page_add_to_album_err_local".tr(), ); if (assets.isEmpty) { return; @@ -166,7 +166,7 @@ class HomePage extends HookConsumerWidget { void onCreateNewAlbum() async { final Iterable assets = remoteOnlySelection( - localErrorMessage: "Can not add local assets to albums yet, skipping", + localErrorMessage: "home_page_add_to_album_err_local".tr(), ); if (assets.isEmpty) { return; diff --git a/mobile/lib/modules/login/ui/change_password_form.dart b/mobile/lib/modules/login/ui/change_password_form.dart index 3773237567..b153f9e24b 100644 --- a/mobile/lib/modules/login/ui/change_password_form.dart +++ b/mobile/lib/modules/login/ui/change_password_form.dart @@ -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'; @@ -30,7 +31,7 @@ class ChangePasswordForm extends HookConsumerWidget { alignment: WrapAlignment.start, children: [ Text( - 'Change Password', + 'common_change_password'.tr(), style: TextStyle( fontSize: 24, fontWeight: FontWeight.bold, @@ -40,7 +41,12 @@ class ChangePasswordForm extends HookConsumerWidget { Padding( padding: const EdgeInsets.symmetric(vertical: 24.0), child: Text( - 'Hi ${authState.firstName} ${authState.lastName},\n\nThis is either the first time you are signing into the system or a request has been made to change your password. Please enter the new password below.', + 'change_password_form_description'.tr( + namedArgs: { + 'firstName': authState.firstName, + 'lastName': authState.lastName, + }, + ), style: TextStyle( fontSize: 14, color: Colors.grey[700], @@ -85,10 +91,10 @@ class PasswordInput extends StatelessWidget { return TextFormField( obscureText: true, controller: controller, - decoration: const InputDecoration( - labelText: 'New Password', - border: OutlineInputBorder(), - hintText: 'New Password', + decoration: InputDecoration( + labelText: 'change_password_form_new_password'.tr(), + border: const OutlineInputBorder(), + hintText: 'change_password_form_new_password'.tr(), ), ); } @@ -106,7 +112,7 @@ class ConfirmPasswordInput extends StatelessWidget { String? _validateInput(String? email) { if (confirmController.value != originalController.value) { - return 'Passwords do not match'; + return 'change_password_form_password_mismatch'.tr(); } return null; } @@ -116,10 +122,10 @@ class ConfirmPasswordInput extends StatelessWidget { return TextFormField( obscureText: true, controller: confirmController, - decoration: const InputDecoration( - labelText: 'Confirm Password', - hintText: 'Re-enter New Password', - border: OutlineInputBorder(), + decoration: InputDecoration( + labelText: 'change_password_form_confirm_password'.tr(), + hintText: 'change_password_form_reenter_new_password'.tr(), + border: const OutlineInputBorder(), ), validator: _validateInput, autovalidateMode: AutovalidateMode.always, @@ -166,9 +172,9 @@ class ChangePasswordButton extends ConsumerWidget { } } }, - child: const Text( - "Change Password", - style: TextStyle(fontSize: 14, fontWeight: FontWeight.bold), + child: Text( + 'common_change_password'.tr(), + style: const TextStyle(fontSize: 14, fontWeight: FontWeight.bold), ), ); }