Преглед на файлове

[mob][photos] Extract strings

Neeraj Gupta преди 1 година
родител
ревизия
864f5c1fd4
променени са 4 файла, в които са добавени 58 реда и са изтрити 5 реда
  1. 8 0
      mobile/lib/generated/intl/messages_en.dart
  2. 40 0
      mobile/lib/generated/l10n.dart
  3. 5 1
      mobile/lib/l10n/intl_en.arb
  4. 5 4
      mobile/lib/ui/cast/auto.dart

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

@@ -357,6 +357,10 @@ class MessageLookup extends MessageLookupByLibrary {
                 "Authentication failed, please try again"),
                 "Authentication failed, please try again"),
         "authenticationSuccessful":
         "authenticationSuccessful":
             MessageLookupByLibrary.simpleMessage("Authentication successful!"),
             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"),
         "autoPair": MessageLookupByLibrary.simpleMessage("Auto pair"),
         "autoPairGoogle": MessageLookupByLibrary.simpleMessage(
         "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."),
             "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"),
             MessageLookupByLibrary.simpleMessage("Confirm recovery key"),
         "confirmYourRecoveryKey":
         "confirmYourRecoveryKey":
             MessageLookupByLibrary.simpleMessage("Confirm your recovery key"),
             MessageLookupByLibrary.simpleMessage("Confirm your recovery key"),
+        "connectToDevice":
+            MessageLookupByLibrary.simpleMessage("Connect to device"),
         "contactFamilyAdmin": m12,
         "contactFamilyAdmin": m12,
         "contactSupport":
         "contactSupport":
             MessageLookupByLibrary.simpleMessage("Contact support"),
             MessageLookupByLibrary.simpleMessage("Contact support"),
@@ -941,6 +947,8 @@ class MessageLookup extends MessageLookupByLibrary {
         "no": MessageLookupByLibrary.simpleMessage("No"),
         "no": MessageLookupByLibrary.simpleMessage("No"),
         "noAlbumsSharedByYouYet":
         "noAlbumsSharedByYouYet":
             MessageLookupByLibrary.simpleMessage("No albums shared by you yet"),
             MessageLookupByLibrary.simpleMessage("No albums shared by you yet"),
+        "noDeviceFound":
+            MessageLookupByLibrary.simpleMessage("No device found"),
         "noDeviceLimit": MessageLookupByLibrary.simpleMessage("None"),
         "noDeviceLimit": MessageLookupByLibrary.simpleMessage("None"),
         "noDeviceThatCanBeDeleted": MessageLookupByLibrary.simpleMessage(
         "noDeviceThatCanBeDeleted": MessageLookupByLibrary.simpleMessage(
             "You\'ve no files on this device that can be deleted"),
             "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: [],
       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> {
 class AppLocalizationDelegate extends LocalizationsDelegate<S> {

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

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