π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
Localize local-download confirmation copy
ashilkn44d39a4a2f46
diff --git a/mobile/apps/photos/lib/l10n/intl_en.arb b/mobile/apps/photos/lib/l10n/intl_en.arbindex e5493b2c40..43845c0261 100644--- a/mobile/apps/photos/lib/l10n/intl_en.arb+++ b/mobile/apps/photos/lib/l10n/intl_en.arb@@ -985,6 +985,26 @@"filesSavedToGallery": "Files saved to gallery","fileFailedToSaveToGallery": "Failed to save file to gallery","download": "Download",+ "alreadyAvailableOnDeviceTitle": "Already available on device",+ "alreadyAvailableOnDeviceBodyAndroid": "You can find this file in the \"{folderName}\" folder. Download it again?",+ "@alreadyAvailableOnDeviceBodyAndroid": {+ "description": "Dialog body shown before re-downloading when the file is already present on device on Android",+ "placeholders": {+ "folderName": {+ "type": "String"+ }+ }+ },+ "alreadyAvailableOnDeviceBodyIOS": "You can find this file in the \"{albumName}\" album. Download it again?",+ "@alreadyAvailableOnDeviceBodyIOS": {+ "description": "Dialog body shown before re-downloading when the file is already present on device on iOS",+ "placeholders": {+ "albumName": {+ "type": "String"+ }+ }+ },+ "downloadAnyway": "Download anyway","pressAndHoldToPlayVideo": "Press and hold to play video","pressAndHoldToPlayVideoDetailed": "Press and hold on the image to play video","downloadFailed": "Download failed",diff --git a/mobile/apps/photos/lib/ui/viewer/file/file_app_bar.dart b/mobile/apps/photos/lib/ui/viewer/file/file_app_bar.dartindex e8ef7a601a..f90d9aeeb0 100644--- a/mobile/apps/photos/lib/ui/viewer/file/file_app_bar.dart+++ b/mobile/apps/photos/lib/ui/viewer/file/file_app_bar.dart@@ -619,17 +619,22 @@ class FileAppBarState extends State<FileAppBar> {}Future<void> _download(EnteFile file) async {+ final l10n = context.l10n;final String? localFileLocationName =- await _getExistingLocalFileLocation(file);+ await _getExistingLocalFileLocation(file, l10n);if (localFileLocationName != null && mounted) {final actionResult = await showChoiceActionSheet(context,- title: "Already available on device",+ title: l10n.alreadyAvailableOnDeviceTitle,body: Platform.isAndroid- ? "You can find this file in the \"$localFileLocationName\" folder. Download it again?"- : "You can find this file in the \"$localFileLocationName\" album. Download it again?",- firstButtonLabel: "Download anyway",- secondButtonLabel: "Cancel",+ ? l10n.alreadyAvailableOnDeviceBodyAndroid(+ folderName: localFileLocationName,+ )+ : l10n.alreadyAvailableOnDeviceBodyIOS(+ albumName: localFileLocationName,+ ),+ firstButtonLabel: l10n.downloadAnyway,+ secondButtonLabel: l10n.cancel,);if (actionResult?.action != ButtonAction.first) {return;@@ -658,6 +663,7 @@ class FileAppBarState extends State<FileAppBar> {Future<String?> _getExistingLocalFileLocation(EnteFile file,+ AppLocalizations l10n,) async {if (file.localID == null || file.localID!.isEmpty) {return null;@@ -679,7 +685,7 @@ class FileAppBarState extends State<FileAppBar> {} else if (deviceFolder.isNotEmpty) {folderName = _getLastPathSegment(deviceFolder);} else {- folderName = "Recent";+ folderName = l10n.recent;}return folderName;}@@ -688,7 +694,7 @@ class FileAppBarState extends State<FileAppBar> {? _getLastPathSegment(deviceFolder): relativePath.isNotEmpty? _getLastPathSegment(relativePath)- : "Recents";+ : l10n.recent;return albumSource;}