mirror of
				https://github.com/KevinMidboe/immich.git
				synced 2025-10-29 17:40:28 +00:00 
			
		
		
		
	Internationalization (German) of the mobile app. (#246)
* Add i18n framework to mobile app and write simple translation generator * Replace all texts in login_form with i18n keys * Localization of sharing section * Localization of asset viewer section * Use JSON as base translation format * Add check for missing/unused translation keys * Add localizely * Remove i18n directory in favour of localizely * Backup Translation * More translations * Translate home page * Translation of search page * Translate new server version announcement * Reformat code * Fix typo in german translation * Update englisch translations * Change translation keys to match dart filenames * Add /api to translated endpoint_urls * Update localizely.yml * Add languages to ios plist * Remove unused keys * Added script to check outdated key in other translations * Add download key to localizely.yml Co-authored-by: Alex <alex.tran1502@gmail.com>
This commit is contained in:
		| @@ -1,4 +1,5 @@ | ||||
| import 'package:auto_route/auto_route.dart'; | ||||
| import 'package:easy_localization/easy_localization.dart'; | ||||
| import 'package:flutter/material.dart'; | ||||
| import 'package:flutter_hooks/flutter_hooks.dart'; | ||||
| import 'package:fluttertoast/fluttertoast.dart'; | ||||
| @@ -55,7 +56,7 @@ class BackupAlbumSelectionPage extends HookConsumerWidget { | ||||
|           if (ref.watch(backupProvider).selectedBackupAlbums.length == 1) { | ||||
|             ImmichToast.show( | ||||
|               context: context, | ||||
|               msg: "Cannot remove the only album", | ||||
|               msg: "backup_err_only_album".tr(), | ||||
|               toastType: ToastType.error, | ||||
|               gravity: ToastGravity.BOTTOM, | ||||
|             ); | ||||
| @@ -136,20 +137,21 @@ class BackupAlbumSelectionPage extends HookConsumerWidget { | ||||
|           icon: const Icon(Icons.arrow_back_ios_rounded), | ||||
|         ), | ||||
|         title: const Text( | ||||
|           "Select Albums", | ||||
|           "backup_album_selection_page_select_albums", | ||||
|           style: TextStyle(fontSize: 16, fontWeight: FontWeight.bold), | ||||
|         ), | ||||
|         ).tr(), | ||||
|         elevation: 0, | ||||
|       ), | ||||
|       body: ListView( | ||||
|         physics: const ClampingScrollPhysics(), | ||||
|         children: [ | ||||
|           const Padding( | ||||
|             padding: EdgeInsets.symmetric(vertical: 8.0, horizontal: 16.0), | ||||
|             child: Text( | ||||
|               "Selection Info", | ||||
|           Padding( | ||||
|             padding: | ||||
|                 const EdgeInsets.symmetric(vertical: 8.0, horizontal: 16.0), | ||||
|             child: const Text( | ||||
|               "backup_album_selection_page_selection_info", | ||||
|               style: TextStyle(fontWeight: FontWeight.bold, fontSize: 14), | ||||
|             ), | ||||
|             ).tr(), | ||||
|           ), | ||||
|           // Selected Album Chips | ||||
|  | ||||
| @@ -181,14 +183,18 @@ class BackupAlbumSelectionPage extends HookConsumerWidget { | ||||
|                   ListTile( | ||||
|                     visualDensity: VisualDensity.compact, | ||||
|                     title: Text( | ||||
|                       "Total unique assets", | ||||
|                       "backup_album_selection_page_total_assets", | ||||
|                       style: TextStyle( | ||||
|                           fontWeight: FontWeight.bold, | ||||
|                           fontSize: 14, | ||||
|                           color: Colors.grey[700]), | ||||
|                     ), | ||||
|                     ).tr(), | ||||
|                     trailing: Text( | ||||
|                       '${ref.watch(backupProvider).allUniqueAssets.length}', | ||||
|                       ref | ||||
|                           .watch(backupProvider) | ||||
|                           .allUniqueAssets | ||||
|                           .length | ||||
|                           .toString(), | ||||
|                       style: const TextStyle(fontWeight: FontWeight.bold), | ||||
|                     ), | ||||
|                   ), | ||||
| @@ -199,19 +205,20 @@ class BackupAlbumSelectionPage extends HookConsumerWidget { | ||||
|  | ||||
|           ListTile( | ||||
|             title: Text( | ||||
|               "Albums on device (${availableAlbums.length})", | ||||
|               "backup_album_selection_page_albums_device" | ||||
|                   .tr(args: [availableAlbums.length.toString()]), | ||||
|               style: const TextStyle(fontWeight: FontWeight.bold, fontSize: 14), | ||||
|             ), | ||||
|             subtitle: Padding( | ||||
|               padding: const EdgeInsets.symmetric(vertical: 8.0), | ||||
|               child: Text( | ||||
|                 "Tap to include, double tap to exclude", | ||||
|                 "backup_album_selection_page_albums_tap", | ||||
|                 style: TextStyle( | ||||
|                   fontSize: 12, | ||||
|                   color: Theme.of(context).primaryColor, | ||||
|                   fontWeight: FontWeight.bold, | ||||
|                 ), | ||||
|               ), | ||||
|               ).tr(), | ||||
|             ), | ||||
|             trailing: IconButton( | ||||
|               splashRadius: 16, | ||||
| @@ -230,21 +237,21 @@ class BackupAlbumSelectionPage extends HookConsumerWidget { | ||||
|                           borderRadius: BorderRadius.circular(12)), | ||||
|                       elevation: 5, | ||||
|                       title: Text( | ||||
|                         'Selection Info', | ||||
|                         'backup_album_selection_page_selection_info', | ||||
|                         style: TextStyle( | ||||
|                           fontSize: 16, | ||||
|                           fontWeight: FontWeight.bold, | ||||
|                           color: Theme.of(context).primaryColor, | ||||
|                         ), | ||||
|                       ), | ||||
|                       ).tr(), | ||||
|                       content: SingleChildScrollView( | ||||
|                         child: ListBody( | ||||
|                           children: [ | ||||
|                             Text( | ||||
|                               'Assets can scatter across multiple albums. Thus, albums can be included or excluded during the backup process.', | ||||
|                               'backup_album_selection_page_assets_scatter', | ||||
|                               style: TextStyle( | ||||
|                                   fontSize: 14, color: Colors.grey[700]), | ||||
|                             ), | ||||
|                             ).tr(), | ||||
|                           ], | ||||
|                         ), | ||||
|                       ), | ||||
|   | ||||
		Reference in New Issue
	
	Block a user