diff --git a/lib/l10n/arb/app_en.arb b/lib/l10n/arb/app_en.arb index 0e883b1c0..ddbc441cd 100644 --- a/lib/l10n/arb/app_en.arb +++ b/lib/l10n/arb/app_en.arb @@ -336,5 +336,12 @@ "deleteCodeAuthMessage": "Authenticate to delete code", "showQRAuthMessage": "Authenticate to show QR code", "confirmAccountDeleteTitle": "Confirm account deletion", - "confirmAccountDeleteMessage": "This account is linked to other ente apps, if you use any.\n\nYour uploaded data, across all ente apps, will be scheduled for deletion, and your account will be permanently deleted." + "confirmAccountDeleteMessage": "This account is linked to other ente apps, if you use any.\n\nYour uploaded data, across all ente apps, will be scheduled for deletion, and your account will be permanently deleted.", + "reminderText": "Reminder", + "reminderPopupBody": "Please delete the screenshot before resuming any photo cloud sync", + "invalidQrCodeText": "Invalid QR code", + "googleAuthImagePopupBody": "Please turn off all photo cloud sync from all apps, including iCloud, Google Photo, OneDrive, etc. \nAlso if you have a second smartphone, it is safer to import by scanning QR code.", + "importGoogleAuthImageButtonText": "Import from image", + "unableToRecognizeQrCodeText": "Unable to recognize a valid code from the uploaded image", + "qrCodeImageNotSelectedText": "Qr code image not selected" } diff --git a/lib/ui/settings/data/import/analyze_qr_code.dart b/lib/ui/settings/data/import/analyze_qr_code.dart index 98796ca22..19893d1cb 100644 --- a/lib/ui/settings/data/import/analyze_qr_code.dart +++ b/lib/ui/settings/data/import/analyze_qr_code.dart @@ -51,15 +51,12 @@ class _QrScannerState extends State { if (isScannedByImage) { final result = await showDialogWidget( context: context, - title: l10n.importFromApp( - "Reminder", - ), - body: - 'Please delete the screenshot before resuming any photo cloud sync', + title: l10n.reminderText, + body: l10n.reminderPopupBody, buttons: [ - const ButtonWidget( + ButtonWidget( buttonType: ButtonType.primary, - labelText: 'OK', + labelText: l10n.ok, isInAlert: true, buttonSize: ButtonSize.large, buttonAction: ButtonAction.first, @@ -77,7 +74,7 @@ class _QrScannerState extends State { scannerController.dispose(); Navigator.of(context).pop(codes); } else { - showToast(context, "Invalid QR code"); + showToast(context, l10n.invalidQrCodeText); isNavigationPerformed = false; } } @@ -127,12 +124,11 @@ class _QrScannerState extends State { title: l10n.importFromApp( "Google Authenticator (saved image)", ), - body: - 'Please turn off all photo cloud sync from all apps, including iCloud, Google Photo, OneDrive, etc. \nAlso if you have a second smartphone, it is safer to import by scanning QR code.', + body: l10n.googleAuthImagePopupBody, buttons: [ - const ButtonWidget( + ButtonWidget( buttonType: ButtonType.primary, - labelText: 'Import from image', + labelText: l10n.importGoogleAuthImageButtonText, isInAlert: true, buttonSize: ButtonSize.large, buttonAction: ButtonAction.first, @@ -172,14 +168,14 @@ class _QrScannerState extends State { isScannedByImage = false; showToast( context, - "Unable to recognize a valid code from the uploaded image", + l10n.unableToRecognizeQrCodeText, ); } } else { if (!mounted) return; showToast( context, - "Qr code image not selected", + l10n.qrCodeImageNotSelectedText, ); } }