π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
Localize OCR strings
laurenspriem13bebf49e0a0
diff --git a/mobile/apps/photos/lib/l10n/intl_en.arb b/mobile/apps/photos/lib/l10n/intl_en.arbindex df136d1278..98824429da 100644--- a/mobile/apps/photos/lib/l10n/intl_en.arb+++ b/mobile/apps/photos/lib/l10n/intl_en.arb@@ -34,6 +34,17 @@"password": "Password","confirmPassword": "Confirm password","activeSessions": "Active sessions",+ "ocrProcessingOverlayMessage": "Detecting text...",+ "ocrLoadingIndicatorLabel": "Detecting Text",+ "ocrSelectionHint": "Swipe or double tap to select just what you need",+ "ocrNoTextDetected": "No text detected",+ "ocrRetryButtonLabel": "Retry",+ "ocrModelsNetworkRequiredError": "Network connection required to download OCR models on first use",+ "ocrModelsPrepareFailed": "Could not prepare OCR models",+ "ocrImageNotFoundError": "Image file not found",+ "ocrImageDecodeFailedError": "Could not read image file",+ "ocrGenericDetectError": "Could not detect text in image",+ "textCopiedToClipboard": "Text copied to clipboard","oops": "Oops","somethingWentWrongPleaseTryAgain": "Something went wrong, please try again","thisWillLogYouOutOfThisDevice": "This will log you out of this device!",diff --git a/mobile/apps/photos/lib/ui/viewer/file/text_detection_page.dart b/mobile/apps/photos/lib/ui/viewer/file/text_detection_page.dartindex fdcb1ba639..b07172eaf1 100644--- a/mobile/apps/photos/lib/ui/viewer/file/text_detection_page.dart+++ b/mobile/apps/photos/lib/ui/viewer/file/text_detection_page.dart@@ -2,6 +2,7 @@ import 'package:flutter/material.dart';import 'package:flutter/services.dart';import 'package:logging/logging.dart';import 'package:mobile_ocr/mobile_ocr.dart';+import 'package:photos/l10n/l10n.dart';import 'package:photos/ui/common/loading_widget.dart';import 'package:photos/ui/notification/toast.dart';@@ -18,6 +19,7 @@ class _TextDetectionPageState extends State<TextDetectionPage> {@overrideWidget build(BuildContext context) {Logger("TextDetectorWidget").info("started");+ final l10n = context.l10n;return Scaffold(backgroundColor: Colors.black,body: SafeArea(@@ -28,12 +30,24 @@ class _TextDetectionPageState extends State<TextDetectionPage> {autoDetect: true,backgroundColor: Colors.black,showUnselectedBoundaries: true,+ strings: TextDetectorStrings(+ processingOverlayMessage: l10n.ocrProcessingOverlayMessage,+ loadingIndicatorLabel: l10n.ocrLoadingIndicatorLabel,+ selectionHint: l10n.ocrSelectionHint,+ noTextDetected: l10n.ocrNoTextDetected,+ retryButtonLabel: l10n.ocrRetryButtonLabel,+ modelsNetworkRequiredError: l10n.ocrModelsNetworkRequiredError,+ modelsPrepareFailed: l10n.ocrModelsPrepareFailed,+ imageNotFoundError: l10n.ocrImageNotFoundError,+ imageDecodeFailedError: l10n.ocrImageDecodeFailedError,+ genericDetectError: l10n.ocrGenericDetectError,+ ),loadingWidget: const Center(child: EnteLoadingWidget(color: Colors.white, size: 24),),onTextCopied: (text) {HapticFeedback.lightImpact();- showShortToast(context, "Text copied to clipboard");+ showShortToast(context, l10n.textCopiedToClipboard);},),// Back button on top left