浏览代码

l10n: extract strings

Neeraj Gupta 2 年之前
父节点
当前提交
79641c4850

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

@@ -294,6 +294,8 @@ class MessageLookup extends MessageLookupByLibrary {
         "clickOnTheOverflowMenu": MessageLookupByLibrary.simpleMessage(
             "• Click on the overflow menu"),
         "close": MessageLookupByLibrary.simpleMessage("Close"),
+        "clubByCaptureTime":
+            MessageLookupByLibrary.simpleMessage("Club by capture time"),
         "codeAppliedPageTitle":
             MessageLookupByLibrary.simpleMessage("Code applied"),
         "codeCopiedToClipboard":
@@ -345,6 +347,7 @@ class MessageLookup extends MessageLookupByLibrary {
             "We could not backup your data.\nWe will retry later."),
         "couldNotUpdateSubscription": MessageLookupByLibrary.simpleMessage(
             "Could not update subscription"),
+        "count": MessageLookupByLibrary.simpleMessage("Count"),
         "createAccount": MessageLookupByLibrary.simpleMessage("Create account"),
         "createAlbumActionHint": MessageLookupByLibrary.simpleMessage(
             "Long press to select photos and click + to create an album"),
@@ -363,6 +366,10 @@ class MessageLookup extends MessageLookupByLibrary {
         "custom": MessageLookupByLibrary.simpleMessage("Custom"),
         "darkTheme": MessageLookupByLibrary.simpleMessage("Dark"),
         "decrypting": MessageLookupByLibrary.simpleMessage("Decrypting..."),
+        "decryptingVideo":
+            MessageLookupByLibrary.simpleMessage("Decrypting video..."),
+        "deduplicateFiles":
+            MessageLookupByLibrary.simpleMessage("Deduplicate Files"),
         "delete": MessageLookupByLibrary.simpleMessage("Delete"),
         "deleteAccount": MessageLookupByLibrary.simpleMessage("Delete account"),
         "deleteAccountFeedbackPrompt": MessageLookupByLibrary.simpleMessage(
@@ -407,6 +414,7 @@ class MessageLookup extends MessageLookupByLibrary {
             MessageLookupByLibrary.simpleMessage("Delete shared album?"),
         "deleteSharedAlbumDialogBody": MessageLookupByLibrary.simpleMessage(
             "The album will be deleted for everyone\n\nYou will lose access to shared photos in this album that are owned by others"),
+        "deselectAll": MessageLookupByLibrary.simpleMessage("Deselect all"),
         "designedToOutlive":
             MessageLookupByLibrary.simpleMessage("Designed to outlive"),
         "details": MessageLookupByLibrary.simpleMessage("Details"),
@@ -587,6 +595,9 @@ class MessageLookup extends MessageLookupByLibrary {
         "logInLabel": MessageLookupByLibrary.simpleMessage("Log in"),
         "loggingOut": MessageLookupByLibrary.simpleMessage("Logging out..."),
         "logout": MessageLookupByLibrary.simpleMessage("Logout"),
+        "longpressOnAnItemToViewInFullscreen":
+            MessageLookupByLibrary.simpleMessage(
+                "Long-press on an item to view in full-screen"),
         "lostDevice": MessageLookupByLibrary.simpleMessage("Lost device?"),
         "manage": MessageLookupByLibrary.simpleMessage("Manage"),
         "manageDeviceStorage":
@@ -783,6 +794,8 @@ class MessageLookup extends MessageLookupByLibrary {
         "restoringFiles":
             MessageLookupByLibrary.simpleMessage("Restoring files..."),
         "retry": MessageLookupByLibrary.simpleMessage("Retry"),
+        "reviewDeduplicateItems": MessageLookupByLibrary.simpleMessage(
+            "Please review and delete the items you believe are duplicates."),
         "safelyStored": MessageLookupByLibrary.simpleMessage("Safely stored"),
         "saveKey": MessageLookupByLibrary.simpleMessage("Save key"),
         "saveYourRecoveryKeyIfYouHaventAlready":
@@ -924,9 +937,11 @@ class MessageLookup extends MessageLookupByLibrary {
                 "This will log you out of the following device:"),
         "thisWillLogYouOutOfThisDevice": MessageLookupByLibrary.simpleMessage(
             "This will log you out of this device!"),
+        "time": MessageLookupByLibrary.simpleMessage("Time"),
         "toHideAPhotoOrVideo":
             MessageLookupByLibrary.simpleMessage("To hide a photo or video"),
         "total": MessageLookupByLibrary.simpleMessage("total"),
+        "totalSize": MessageLookupByLibrary.simpleMessage("Total size"),
         "trash": MessageLookupByLibrary.simpleMessage("Trash"),
         "tryAgain": MessageLookupByLibrary.simpleMessage("Try again"),
         "turnOnBackupForAutoUpload": MessageLookupByLibrary.simpleMessage(

+ 90 - 0
lib/generated/l10n.dart

@@ -5677,6 +5677,96 @@ class S {
       args: [],
     );
   }
+
+  /// `Deduplicate Files`
+  String get deduplicateFiles {
+    return Intl.message(
+      'Deduplicate Files',
+      name: 'deduplicateFiles',
+      desc: '',
+      args: [],
+    );
+  }
+
+  /// `Deselect all`
+  String get deselectAll {
+    return Intl.message(
+      'Deselect all',
+      name: 'deselectAll',
+      desc: '',
+      args: [],
+    );
+  }
+
+  /// `Please review and delete the items you believe are duplicates.`
+  String get reviewDeduplicateItems {
+    return Intl.message(
+      'Please review and delete the items you believe are duplicates.',
+      name: 'reviewDeduplicateItems',
+      desc: '',
+      args: [],
+    );
+  }
+
+  /// `Club by capture time`
+  String get clubByCaptureTime {
+    return Intl.message(
+      'Club by capture time',
+      name: 'clubByCaptureTime',
+      desc: '',
+      args: [],
+    );
+  }
+
+  /// `Count`
+  String get count {
+    return Intl.message(
+      'Count',
+      name: 'count',
+      desc: '',
+      args: [],
+    );
+  }
+
+  /// `Total size`
+  String get totalSize {
+    return Intl.message(
+      'Total size',
+      name: 'totalSize',
+      desc: '',
+      args: [],
+    );
+  }
+
+  /// `Time`
+  String get time {
+    return Intl.message(
+      'Time',
+      name: 'time',
+      desc: '',
+      args: [],
+    );
+  }
+
+  /// `Long-press on an item to view in full-screen`
+  String get longpressOnAnItemToViewInFullscreen {
+    return Intl.message(
+      'Long-press on an item to view in full-screen',
+      name: 'longpressOnAnItemToViewInFullscreen',
+      desc: '',
+      args: [],
+    );
+  }
+
+  /// `Decrypting video...`
+  String get decryptingVideo {
+    return Intl.message(
+      'Decrypting video...',
+      name: 'decryptingVideo',
+      desc: '',
+      args: [],
+    );
+  }
 }
 
 class AppLocalizationDelegate extends LocalizationsDelegate<S> {

+ 10 - 1
lib/l10n/intl_en.arb

@@ -787,5 +787,14 @@
   "fileSavedToGallery": "File saved to gallery",
   "download": "Download",
   "pressAndHoldToPlayVideo": "Press and hold to play video",
-  "downloadFailed": "Download failed"
+  "downloadFailed": "Download failed",
+  "deduplicateFiles": "Deduplicate Files",
+  "deselectAll": "Deselect all",
+  "reviewDeduplicateItems": "Please review and delete the items you believe are duplicates.",
+  "clubByCaptureTime": "Club by capture time",
+  "count": "Count",
+  "totalSize": "Total size",
+  "time": "Time",
+  "longpressOnAnItemToViewInFullscreen": "Long-press on an item to view in full-screen",
+  "decryptingVideo": "Decrypting video..."
 }

+ 11 - 10
lib/ui/tools/deduplicate_page.dart

@@ -4,6 +4,7 @@ import 'package:photos/core/constants.dart';
 import 'package:photos/core/event_bus.dart';
 import 'package:photos/ente_theme_data.dart';
 import 'package:photos/events/user_details_changed_event.dart';
+import "package:photos/generated/l10n.dart";
 import 'package:photos/models/duplicate_files.dart';
 import 'package:photos/models/file.dart';
 import 'package:photos/services/collections_service.dart';
@@ -57,7 +58,7 @@ class _DeduplicatePageState extends State<DeduplicatePage> {
     _duplicates =
         DeduplicationService.instance.clubDuplicatesByTime(widget.duplicates);
     _selectAllFilesButFirst();
-    showToast(context, "Long-press on an item to view in full-screen");
+    showShortToast(context, S.of(context).longpressOnAnItemToViewInFullscreen);
   }
 
   void _selectAllFilesButFirst() {
@@ -80,7 +81,7 @@ class _DeduplicatePageState extends State<DeduplicatePage> {
     return Scaffold(
       appBar: AppBar(
         elevation: 0,
-        title: const Text("Deduplicate Files"),
+        title: Text(S.of(context).deduplicateFiles),
         actions: <Widget>[
           PopupMenuButton(
             constraints: const BoxConstraints(minWidth: 180),
@@ -109,7 +110,7 @@ class _DeduplicatePageState extends State<DeduplicatePage> {
                     Padding(
                       padding: const EdgeInsets.only(bottom: 1),
                       child: Text(
-                        "Deselect all",
+                        S.of(context).deselectAll,
                         style: Theme.of(context)
                             .textTheme
                             .subtitle1!
@@ -156,7 +157,7 @@ class _DeduplicatePageState extends State<DeduplicatePage> {
                 return _getClubbingConfig();
               } else if (index == 2) {
                 if (_duplicates.isNotEmpty) {
-                  return _getSortMenu();
+                  return _getSortMenu(context);
                 } else {
                   return const Padding(
                     padding: EdgeInsets.only(top: 32),
@@ -203,7 +204,7 @@ class _DeduplicatePageState extends State<DeduplicatePage> {
             padding: EdgeInsets.all(2),
           ),
           Text(
-            "Please review and delete the items you believe are duplicates.",
+            S.of(context).reviewDeduplicateItems,
             style: Theme.of(context).textTheme.subtitle2,
           ),
           const Padding(
@@ -227,7 +228,7 @@ class _DeduplicatePageState extends State<DeduplicatePage> {
           _resetEntriesAndSelection();
           setState(() {});
         },
-        title: const Text("Club by capture time"),
+        title: Text(S.of(context).clubByCaptureTime),
       ),
     );
   }
@@ -242,18 +243,18 @@ class _DeduplicatePageState extends State<DeduplicatePage> {
     _selectAllFilesButFirst();
   }
 
-  Widget _getSortMenu() {
+  Widget _getSortMenu(BuildContext context) {
     Text sortOptionText(SortKey key) {
       String text = key.toString();
       switch (key) {
         case SortKey.count:
-          text = "Count";
+          text = S.of(context).count;
           break;
         case SortKey.size:
-          text = "Total size";
+          text = S.of(context).totalSize;
           break;
         case SortKey.time:
-          text = "Time";
+          text = S.of(context).time;
           break;
       }
       return Text(

+ 2 - 1
lib/ui/viewer/file/video_widget.dart

@@ -7,6 +7,7 @@ import 'package:flutter/material.dart';
 import 'package:logging/logging.dart';
 import 'package:photos/core/configuration.dart';
 import 'package:photos/core/constants.dart';
+import "package:photos/generated/l10n.dart";
 import 'package:photos/models/file.dart';
 import 'package:photos/services/files_service.dart';
 import 'package:photos/ui/viewer/file/thumbnail_widget.dart';
@@ -94,7 +95,7 @@ class _VideoWidgetState extends State<VideoWidget> {
           setState(() {
             _progress = count / (widget.file.fileSize ?? total);
             if (_progress == 1) {
-              showShortToast(context, "Decrypting video...");
+              showShortToast(context, S.of(context).decryptingVideo);
             }
           });
         }