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,6 +1,7 @@ | ||||
| import 'dart:typed_data'; | ||||
|  | ||||
| import 'package:auto_route/auto_route.dart'; | ||||
| import 'package:easy_localization/easy_localization.dart'; | ||||
| import 'package:flutter/material.dart'; | ||||
| import 'package:flutter/services.dart'; | ||||
| import 'package:fluttertoast/fluttertoast.dart'; | ||||
| @@ -37,10 +38,10 @@ class AlbumInfoCard extends HookConsumerWidget { | ||||
|           visualDensity: VisualDensity.compact, | ||||
|           shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(5)), | ||||
|           label: const Text( | ||||
|             "INCLUDED", | ||||
|             "album_info_card_backup_album_included", | ||||
|             style: TextStyle( | ||||
|                 fontSize: 10, color: Colors.white, fontWeight: FontWeight.bold), | ||||
|           ), | ||||
|           ).tr(), | ||||
|           backgroundColor: Theme.of(context).primaryColor, | ||||
|         ); | ||||
|       } else if (isExcluded) { | ||||
| @@ -48,10 +49,10 @@ class AlbumInfoCard extends HookConsumerWidget { | ||||
|           visualDensity: VisualDensity.compact, | ||||
|           shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(5)), | ||||
|           label: const Text( | ||||
|             "EXCLUDED", | ||||
|             "album_info_card_backup_album_excluded", | ||||
|             style: TextStyle( | ||||
|                 fontSize: 10, color: Colors.white, fontWeight: FontWeight.bold), | ||||
|           ), | ||||
|           ).tr(), | ||||
|           backgroundColor: Colors.red[300], | ||||
|         ); | ||||
|       } | ||||
| @@ -77,7 +78,7 @@ class AlbumInfoCard 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, | ||||
|             ); | ||||
| @@ -104,7 +105,7 @@ class AlbumInfoCard extends HookConsumerWidget { | ||||
|                   .contains(albumInfo)) { | ||||
|             ImmichToast.show( | ||||
|               context: context, | ||||
|               msg: "Cannot exclude the only album", | ||||
|               msg: "backup_err_only_album".tr(), | ||||
|               toastType: ToastType.error, | ||||
|               gravity: ToastGravity.BOTTOM, | ||||
|             ); | ||||
| @@ -180,7 +181,10 @@ class AlbumInfoCard extends HookConsumerWidget { | ||||
|                           Padding( | ||||
|                             padding: const EdgeInsets.only(top: 2.0), | ||||
|                             child: Text( | ||||
|                               '${albumInfo.assetCount} ${(albumInfo.isAll ? " (ALL)" : "")}', | ||||
|                               albumInfo.assetCount.toString() + | ||||
|                                   (albumInfo.isAll | ||||
|                                       ? " (${'backup_all'.tr()})" | ||||
|                                       : ""), | ||||
|                               style: TextStyle( | ||||
|                                   fontSize: 12, color: Colors.grey[600]), | ||||
|                             ), | ||||
|   | ||||
		Reference in New Issue
	
	Block a user