Browse Source

Extract strings

Neeraj Gupta 1 year ago
parent
commit
1b1993603b

+ 5 - 0
lib/generated/intl/messages_en.dart

@@ -380,6 +380,8 @@ class MessageLookup extends MessageLookupByLibrary {
         "cannotAddMorePhotosAfterBecomingViewer": m7,
         "cannotAddMorePhotosAfterBecomingViewer": m7,
         "cannotDeleteSharedFiles":
         "cannotDeleteSharedFiles":
             MessageLookupByLibrary.simpleMessage("Cannot delete shared files"),
             MessageLookupByLibrary.simpleMessage("Cannot delete shared files"),
+        "castInstruction": MessageLookupByLibrary.simpleMessage(
+            "Visit cast.ente.io on the device you want to pair.\n\nEnter the code below to play the album on your TV."),
         "centerPoint": MessageLookupByLibrary.simpleMessage("Center point"),
         "centerPoint": MessageLookupByLibrary.simpleMessage("Center point"),
         "changeEmail": MessageLookupByLibrary.simpleMessage("Change email"),
         "changeEmail": MessageLookupByLibrary.simpleMessage("Change email"),
         "changeLocationOfSelectedItems": MessageLookupByLibrary.simpleMessage(
         "changeLocationOfSelectedItems": MessageLookupByLibrary.simpleMessage(
@@ -556,6 +558,8 @@ class MessageLookup extends MessageLookupByLibrary {
             "Files added to this device album will automatically get uploaded to ente."),
             "Files added to this device album will automatically get uploaded to ente."),
         "deviceLockExplanation": MessageLookupByLibrary.simpleMessage(
         "deviceLockExplanation": MessageLookupByLibrary.simpleMessage(
             "Disable the device screen lock when ente is in the foreground and there is a backup in progress. This is normally not needed, but may help big uploads and initial imports of large libraries complete faster."),
             "Disable the device screen lock when ente is in the foreground and there is a backup in progress. This is normally not needed, but may help big uploads and initial imports of large libraries complete faster."),
+        "deviceNotFound":
+            MessageLookupByLibrary.simpleMessage("Device not found"),
         "didYouKnow": MessageLookupByLibrary.simpleMessage("Did you know?"),
         "didYouKnow": MessageLookupByLibrary.simpleMessage("Did you know?"),
         "disableAutoLock":
         "disableAutoLock":
             MessageLookupByLibrary.simpleMessage("Disable auto lock"),
             MessageLookupByLibrary.simpleMessage("Disable auto lock"),
@@ -946,6 +950,7 @@ class MessageLookup extends MessageLookupByLibrary {
             "Optional, as short as you like..."),
             "Optional, as short as you like..."),
         "orPickAnExistingOne":
         "orPickAnExistingOne":
             MessageLookupByLibrary.simpleMessage("Or pick an existing one"),
             MessageLookupByLibrary.simpleMessage("Or pick an existing one"),
+        "pair": MessageLookupByLibrary.simpleMessage("Pair"),
         "password": MessageLookupByLibrary.simpleMessage("Password"),
         "password": MessageLookupByLibrary.simpleMessage("Password"),
         "passwordChangedSuccessfully": MessageLookupByLibrary.simpleMessage(
         "passwordChangedSuccessfully": MessageLookupByLibrary.simpleMessage(
             "Password changed successfully"),
             "Password changed successfully"),

+ 40 - 10
lib/generated/l10n.dart

@@ -5765,16 +5765,6 @@ class S {
     );
     );
   }
   }
 
 
-  /// `Play album on TV`
-  String get playOnTv {
-    return Intl.message(
-      'Play album on TV',
-      name: 'playOnTv',
-      desc: '',
-      args: [],
-    );
-  }
-
   /// `Calculating...`
   /// `Calculating...`
   String get calculating {
   String get calculating {
     return Intl.message(
     return Intl.message(
@@ -8317,6 +8307,46 @@ class S {
       args: [],
       args: [],
     );
     );
   }
   }
+
+  /// `Play album on TV`
+  String get playOnTv {
+    return Intl.message(
+      'Play album on TV',
+      name: 'playOnTv',
+      desc: '',
+      args: [],
+    );
+  }
+
+  /// `Pair`
+  String get pair {
+    return Intl.message(
+      'Pair',
+      name: 'pair',
+      desc: '',
+      args: [],
+    );
+  }
+
+  /// `Device not found`
+  String get deviceNotFound {
+    return Intl.message(
+      'Device not found',
+      name: 'deviceNotFound',
+      desc: '',
+      args: [],
+    );
+  }
+
+  /// `Visit cast.ente.io on the device you want to pair.\n\nEnter the code below to play the album on your TV.`
+  String get castInstruction {
+    return Intl.message(
+      'Visit cast.ente.io on the device you want to pair.\n\nEnter the code below to play the album on your TV.',
+      name: 'castInstruction',
+      desc: '',
+      args: [],
+    );
+  }
 }
 }
 
 
 class AppLocalizationDelegate extends LocalizationsDelegate<S> {
 class AppLocalizationDelegate extends LocalizationsDelegate<S> {

+ 5 - 2
lib/l10n/intl_en.arb

@@ -817,7 +817,6 @@
   "nothingToSeeHere": "Nothing to see here! 👀",
   "nothingToSeeHere": "Nothing to see here! 👀",
   "unarchiveAlbum": "Unarchive album",
   "unarchiveAlbum": "Unarchive album",
   "archiveAlbum": "Archive album",
   "archiveAlbum": "Archive album",
-  "playOnTv": "Play album on TV",
   "calculating": "Calculating...",
   "calculating": "Calculating...",
   "pleaseWaitDeletingAlbum": "Please wait, deleting album",
   "pleaseWaitDeletingAlbum": "Please wait, deleting album",
   "searchHintText": "Albums, months, days, years, ...",
   "searchHintText": "Albums, months, days, years, ...",
@@ -1188,5 +1187,9 @@
   "selectALocationFirst": "Select a location first",
   "selectALocationFirst": "Select a location first",
   "changeLocationOfSelectedItems": "Change location of selected items?",
   "changeLocationOfSelectedItems": "Change location of selected items?",
   "editsToLocationWillOnlyBeSeenWithinEnte": "Edits to location will only be seen within Ente",
   "editsToLocationWillOnlyBeSeenWithinEnte": "Edits to location will only be seen within Ente",
-  "cleanUncategorized": "Clean Uncategorized"
+  "cleanUncategorized": "Clean Uncategorized",
+  "playOnTv": "Play album on TV",
+  "pair": "Pair",
+  "deviceNotFound": "Device not found",
+  "castInstruction": "Visit cast.ente.io on the device you want to pair.\n\nEnter the code below to play the album on your TV."
 }
 }

+ 4 - 5
lib/ui/viewer/gallery/gallery_app_bar_widget.dart

@@ -827,10 +827,9 @@ class _GalleryAppBarWidgetState extends State<GalleryAppBarWidget> {
     gw.revokeAllTokens().ignore();
     gw.revokeAllTokens().ignore();
     await showTextInputDialog(
     await showTextInputDialog(
       context,
       context,
-      title: "Play album on TV",
-      body: "Visit cast.ente.io on the device you want to pair.\n\n"
-          "Enter the code below to play the album on your TV.\n",
-      submitButtonLabel: "Pair",
+      title: context.l10n.playOnTv,
+      body: S.of(context).castInstruction,
+      submitButtonLabel: S.of(context).pair,
       textInputType: TextInputType.streetAddress,
       textInputType: TextInputType.streetAddress,
       hintText: "Enter the code",
       hintText: "Enter the code",
       onSubmit: (String text) async {
       onSubmit: (String text) async {
@@ -838,7 +837,7 @@ class _GalleryAppBarWidgetState extends State<GalleryAppBarWidget> {
           String code = text.trim();
           String code = text.trim();
           final String? publicKey = await gw.getPublicKey(code);
           final String? publicKey = await gw.getPublicKey(code);
           if (publicKey == null) {
           if (publicKey == null) {
-            showToast(context, "Device not found");
+            showToast(context, S.of(context).deviceNotFound);
             return;
             return;
           }
           }
           final String castToken = Uuid().v4().toString();
           final String castToken = Uuid().v4().toString();