浏览代码

[mob][photos] Extract strings

Neeraj Gupta 1 年之前
父节点
当前提交
864f5c1fd4

+ 8 - 0
mobile/lib/generated/intl/messages_en.dart

@@ -357,6 +357,10 @@ class MessageLookup extends MessageLookupByLibrary {
                 "Authentication failed, please try again"),
         "authenticationSuccessful":
             MessageLookupByLibrary.simpleMessage("Authentication successful!"),
+        "autoCastDialogBody": MessageLookupByLibrary.simpleMessage(
+            "You\'ll see available Cast devices here."),
+        "autoCastiOSPermission": MessageLookupByLibrary.simpleMessage(
+            "Make sure Local Network permissions are turned on for the Ente Photos app, in Settings."),
         "autoPair": MessageLookupByLibrary.simpleMessage("Auto pair"),
         "autoPairGoogle": MessageLookupByLibrary.simpleMessage(
             "Auto Pair requires connecting to Google servers and only works with Chromecast supported devices. Google will not receive sensitive data, such as your photos."),
@@ -463,6 +467,8 @@ class MessageLookup extends MessageLookupByLibrary {
             MessageLookupByLibrary.simpleMessage("Confirm recovery key"),
         "confirmYourRecoveryKey":
             MessageLookupByLibrary.simpleMessage("Confirm your recovery key"),
+        "connectToDevice":
+            MessageLookupByLibrary.simpleMessage("Connect to device"),
         "contactFamilyAdmin": m12,
         "contactSupport":
             MessageLookupByLibrary.simpleMessage("Contact support"),
@@ -941,6 +947,8 @@ class MessageLookup extends MessageLookupByLibrary {
         "no": MessageLookupByLibrary.simpleMessage("No"),
         "noAlbumsSharedByYouYet":
             MessageLookupByLibrary.simpleMessage("No albums shared by you yet"),
+        "noDeviceFound":
+            MessageLookupByLibrary.simpleMessage("No device found"),
         "noDeviceLimit": MessageLookupByLibrary.simpleMessage("None"),
         "noDeviceThatCanBeDeleted": MessageLookupByLibrary.simpleMessage(
             "You\'ve no files on this device that can be deleted"),

+ 40 - 0
mobile/lib/generated/l10n.dart

@@ -8603,6 +8603,46 @@ class S {
       args: [],
     );
   }
+
+  /// `Connect to device`
+  String get connectToDevice {
+    return Intl.message(
+      'Connect to device',
+      name: 'connectToDevice',
+      desc: '',
+      args: [],
+    );
+  }
+
+  /// `You'll see available Cast devices here.`
+  String get autoCastDialogBody {
+    return Intl.message(
+      'You\'ll see available Cast devices here.',
+      name: 'autoCastDialogBody',
+      desc: '',
+      args: [],
+    );
+  }
+
+  /// `Make sure Local Network permissions are turned on for the Ente Photos app, in Settings.`
+  String get autoCastiOSPermission {
+    return Intl.message(
+      'Make sure Local Network permissions are turned on for the Ente Photos app, in Settings.',
+      name: 'autoCastiOSPermission',
+      desc: '',
+      args: [],
+    );
+  }
+
+  /// `No device found`
+  String get noDeviceFound {
+    return Intl.message(
+      'No device found',
+      name: 'noDeviceFound',
+      desc: '',
+      args: [],
+    );
+  }
 }
 
 class AppLocalizationDelegate extends LocalizationsDelegate<S> {

+ 5 - 1
mobile/lib/l10n/intl_en.arb

@@ -1216,5 +1216,9 @@
   "createCollaborativeLink": "Create collaborative link",
   "search": "Search",
   "autoPairGoogle": "Auto Pair requires connecting to Google servers and only works with Chromecast supported devices. Google will not receive sensitive data, such as your photos.",
-  "manualPairDesc": "Pair with PIN works for any large screen device you want to play your album on."
+  "manualPairDesc": "Pair with PIN works for any large screen device you want to play your album on.",
+  "connectToDevice": "Connect to device",
+  "autoCastDialogBody": "You'll see available Cast devices here.",
+  "autoCastiOSPermission": "Make sure Local Network permissions are turned on for the Ente Photos app, in Settings.",
+  "noDeviceFound": "No device found"
 }

+ 5 - 4
mobile/lib/ui/cast/auto.dart

@@ -1,6 +1,7 @@
 import "dart:io";
 
 import "package:flutter/material.dart";
+import "package:photos/generated/l10n.dart";
 import "package:photos/service_locator.dart";
 import "package:photos/theme/ente_theme.dart";
 import "package:photos/ui/common/loading_widget.dart";
@@ -24,7 +25,7 @@ class _AutoCastDialogState extends State<AutoCastDialog> {
 
     final AlertDialog alert = AlertDialog(
       title: Text(
-        "Connect to device",
+        S.of(context).connectToDevice,
         style: textStyle.largeBold,
       ),
       content: Column(
@@ -32,12 +33,12 @@ class _AutoCastDialogState extends State<AutoCastDialog> {
         mainAxisSize: MainAxisSize.min,
         children: [
           Text(
-            "You'll see available Cast devices here.",
+            S.of(context).autoCastDialogBody,
             style: textStyle.bodyMuted,
           ),
           if (Platform.isIOS)
             Text(
-              "Make sure Local Network permissions are turned on for the Ente Photos app, in Settings.",
+              S.of(context).autoCastiOSPermission,
               style: textStyle.bodyMuted,
             ),
           const SizedBox(height: 16),
@@ -55,7 +56,7 @@ class _AutoCastDialogState extends State<AutoCastDialog> {
               }
 
               if (snapshot.data!.isEmpty) {
-                return const Center(child: Text('No device'));
+                return const Center(child: Text(S.of(context).noDeviceFound));
               }
 
               return Column(