浏览代码

Extract strings

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

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

@@ -380,6 +380,8 @@ class MessageLookup extends MessageLookupByLibrary {
         "cannotAddMorePhotosAfterBecomingViewer": m7,
         "cannotDeleteSharedFiles":
             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"),
         "changeEmail": MessageLookupByLibrary.simpleMessage("Change email"),
         "changeLocationOfSelectedItems": MessageLookupByLibrary.simpleMessage(
@@ -556,6 +558,8 @@ class MessageLookup extends MessageLookupByLibrary {
             "Files added to this device album will automatically get uploaded to ente."),
         "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."),
+        "deviceNotFound":
+            MessageLookupByLibrary.simpleMessage("Device not found"),
         "didYouKnow": MessageLookupByLibrary.simpleMessage("Did you know?"),
         "disableAutoLock":
             MessageLookupByLibrary.simpleMessage("Disable auto lock"),
@@ -946,6 +950,7 @@ class MessageLookup extends MessageLookupByLibrary {
             "Optional, as short as you like..."),
         "orPickAnExistingOne":
             MessageLookupByLibrary.simpleMessage("Or pick an existing one"),
+        "pair": MessageLookupByLibrary.simpleMessage("Pair"),
         "password": MessageLookupByLibrary.simpleMessage("Password"),
         "passwordChangedSuccessfully": MessageLookupByLibrary.simpleMessage(
             "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...`
   String get calculating {
     return Intl.message(
@@ -8317,6 +8307,46 @@ class S {
       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> {

+ 5 - 2
lib/l10n/intl_en.arb

@@ -817,7 +817,6 @@
   "nothingToSeeHere": "Nothing to see here! 👀",
   "unarchiveAlbum": "Unarchive album",
   "archiveAlbum": "Archive album",
-  "playOnTv": "Play album on TV",
   "calculating": "Calculating...",
   "pleaseWaitDeletingAlbum": "Please wait, deleting album",
   "searchHintText": "Albums, months, days, years, ...",
@@ -1188,5 +1187,9 @@
   "selectALocationFirst": "Select a location first",
   "changeLocationOfSelectedItems": "Change location of selected items?",
   "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();
     await showTextInputDialog(
       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,
       hintText: "Enter the code",
       onSubmit: (String text) async {
@@ -838,7 +837,7 @@ class _GalleryAppBarWidgetState extends State<GalleryAppBarWidget> {
           String code = text.trim();
           final String? publicKey = await gw.getPublicKey(code);
           if (publicKey == null) {
-            showToast(context, "Device not found");
+            showToast(context, S.of(context).deviceNotFound);
             return;
           }
           final String castToken = Uuid().v4().toString();