Explorar o código

l10n: extract strings

Neeraj Gupta %!s(int64=2) %!d(string=hai) anos
pai
achega
f19443607a

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

@@ -203,6 +203,7 @@ class MessageLookup extends MessageLookupByLibrary {
         "appstoreSubscription":
             MessageLookupByLibrary.simpleMessage("AppStore subscription"),
         "archive": MessageLookupByLibrary.simpleMessage("Archive"),
+        "archiveAlbum": MessageLookupByLibrary.simpleMessage("Archive album"),
         "areYouSureThatYouWantToLeaveTheFamily":
             MessageLookupByLibrary.simpleMessage(
                 "Are you sure that you want to leave the family plan?"),
@@ -255,6 +256,7 @@ class MessageLookup extends MessageLookupByLibrary {
         "blog": MessageLookupByLibrary.simpleMessage("Blog"),
         "byClickingLogInIAgreeToThe": MessageLookupByLibrary.simpleMessage(
             "By clicking log in, I agree to the"),
+        "calculating": MessageLookupByLibrary.simpleMessage("Calculating..."),
         "canNotUploadToAlbumsOwnedByOthers":
             MessageLookupByLibrary.simpleMessage(
                 "Can not upload to albums owned by others"),
@@ -285,6 +287,9 @@ class MessageLookup extends MessageLookupByLibrary {
         "claimMore": MessageLookupByLibrary.simpleMessage("Claim more!"),
         "claimed": MessageLookupByLibrary.simpleMessage("Claimed"),
         "claimedStorageSoFar": m4,
+        "click": MessageLookupByLibrary.simpleMessage("• Click"),
+        "clickOnTheOverflowMenu": MessageLookupByLibrary.simpleMessage(
+            "• Click on the overflow menu"),
         "codeAppliedPageTitle":
             MessageLookupByLibrary.simpleMessage("Code applied"),
         "codeCopiedToClipboard":
@@ -601,6 +606,8 @@ class MessageLookup extends MessageLookupByLibrary {
         "noDeviceThatCanBeDeleted": MessageLookupByLibrary.simpleMessage(
             "You\'ve no files on this device that can be deleted"),
         "noDuplicates": MessageLookupByLibrary.simpleMessage("✨ No duplicates"),
+        "noHiddenPhotosOrVideos":
+            MessageLookupByLibrary.simpleMessage("No hidden photos or videos"),
         "noPasswordWarningPart1": MessageLookupByLibrary.simpleMessage(
             "We don\'t store this password, so if you forget,"),
         "noPasswordWarningPart2":
@@ -612,10 +619,15 @@ class MessageLookup extends MessageLookupByLibrary {
             MessageLookupByLibrary.simpleMessage("No recovery key?"),
         "noRecoveryKeyNoDecryption": MessageLookupByLibrary.simpleMessage(
             "Due to the nature of our end-to-end encryption protocol, your data cannot be decrypted without your password or recovery key"),
+        "noResultsFound":
+            MessageLookupByLibrary.simpleMessage("No results found"),
+        "nothingToSeeHere":
+            MessageLookupByLibrary.simpleMessage("Nothing to see here! 👀"),
         "ok": MessageLookupByLibrary.simpleMessage("Ok"),
         "oops": MessageLookupByLibrary.simpleMessage("Oops"),
         "oopsSomethingWentWrong":
             MessageLookupByLibrary.simpleMessage("Oops, something went wrong"),
+        "openTheItem": MessageLookupByLibrary.simpleMessage("• Open the item"),
         "optionalAsShortAsYouLike": MessageLookupByLibrary.simpleMessage(
             "Optional, as short as you like..."),
         "orPickAnExistingOne":
@@ -654,6 +666,8 @@ class MessageLookup extends MessageLookupByLibrary {
         "pleaseTryAgain":
             MessageLookupByLibrary.simpleMessage("Please try again"),
         "pleaseWait": MessageLookupByLibrary.simpleMessage("Please wait..."),
+        "pleaseWaitDeletingAlbum":
+            MessageLookupByLibrary.simpleMessage("Please wait, deleting album"),
         "pleaseWaitForSometimeBeforeRetrying":
             MessageLookupByLibrary.simpleMessage(
                 "Please wait for sometime before retrying"),
@@ -762,6 +776,10 @@ class MessageLookup extends MessageLookupByLibrary {
                 "Scan this barcode with\nyour authenticator app"),
         "searchByAlbumNameHint":
             MessageLookupByLibrary.simpleMessage("Album name"),
+        "searchByExamples": MessageLookupByLibrary.simpleMessage(
+            "• Album names (e.g. \"Camera\")\n• Types of files (e.g. \"Videos\", \".gif\")\n• Years and months (e.g. \"2022\", \"January\")\n• Holidays (e.g. \"Christmas\")\n• Photo descriptions (e.g. “#fun”)"),
+        "searchHintText": MessageLookupByLibrary.simpleMessage(
+            "Albums, months, days, years, ..."),
         "security": MessageLookupByLibrary.simpleMessage("Security"),
         "selectAlbum": MessageLookupByLibrary.simpleMessage("Select album"),
         "selectAll": MessageLookupByLibrary.simpleMessage("Select all"),
@@ -885,6 +903,8 @@ class MessageLookup extends MessageLookupByLibrary {
                 "This will log you out of the following device:"),
         "thisWillLogYouOutOfThisDevice": MessageLookupByLibrary.simpleMessage(
             "This will log you out of this device!"),
+        "toHideAPhotoOrVideo":
+            MessageLookupByLibrary.simpleMessage("To hide a photo or video"),
         "total": MessageLookupByLibrary.simpleMessage("total"),
         "trash": MessageLookupByLibrary.simpleMessage("Trash"),
         "tryAgain": MessageLookupByLibrary.simpleMessage("Try again"),
@@ -899,6 +919,8 @@ class MessageLookup extends MessageLookupByLibrary {
         "twofactorSetup":
             MessageLookupByLibrary.simpleMessage("Two-factor setup"),
         "unarchive": MessageLookupByLibrary.simpleMessage("Unarchive"),
+        "unarchiveAlbum":
+            MessageLookupByLibrary.simpleMessage("Unarchive album"),
         "uncategorized": MessageLookupByLibrary.simpleMessage("Uncategorized"),
         "unhide": MessageLookupByLibrary.simpleMessage("Unhide"),
         "unhideToAlbum":
@@ -964,6 +986,9 @@ class MessageLookup extends MessageLookupByLibrary {
         "youCanManageYourLinksInTheShareTab":
             MessageLookupByLibrary.simpleMessage(
                 "You can manage your links in the share tab."),
+        "youCanTrySearchingForADifferentQuery":
+            MessageLookupByLibrary.simpleMessage(
+                "You can try searching for a different query."),
         "youCannotDowngradeToThisPlan": MessageLookupByLibrary.simpleMessage(
             "You cannot downgrade to this plan"),
         "youCannotShareWithYourself": MessageLookupByLibrary.simpleMessage(

+ 140 - 0
lib/generated/l10n.dart

@@ -5386,6 +5386,146 @@ class S {
       args: [],
     );
   }
+
+  /// `No hidden photos or videos`
+  String get noHiddenPhotosOrVideos {
+    return Intl.message(
+      'No hidden photos or videos',
+      name: 'noHiddenPhotosOrVideos',
+      desc: '',
+      args: [],
+    );
+  }
+
+  /// `To hide a photo or video`
+  String get toHideAPhotoOrVideo {
+    return Intl.message(
+      'To hide a photo or video',
+      name: 'toHideAPhotoOrVideo',
+      desc: '',
+      args: [],
+    );
+  }
+
+  /// `• Open the item`
+  String get openTheItem {
+    return Intl.message(
+      '• Open the item',
+      name: 'openTheItem',
+      desc: '',
+      args: [],
+    );
+  }
+
+  /// `• Click on the overflow menu`
+  String get clickOnTheOverflowMenu {
+    return Intl.message(
+      '• Click on the overflow menu',
+      name: 'clickOnTheOverflowMenu',
+      desc: '',
+      args: [],
+    );
+  }
+
+  /// `• Click`
+  String get click {
+    return Intl.message(
+      '• Click',
+      name: 'click',
+      desc: '',
+      args: [],
+    );
+  }
+
+  /// `Nothing to see here! 👀`
+  String get nothingToSeeHere {
+    return Intl.message(
+      'Nothing to see here! 👀',
+      name: 'nothingToSeeHere',
+      desc: '',
+      args: [],
+    );
+  }
+
+  /// `Unarchive album`
+  String get unarchiveAlbum {
+    return Intl.message(
+      'Unarchive album',
+      name: 'unarchiveAlbum',
+      desc: '',
+      args: [],
+    );
+  }
+
+  /// `Archive album`
+  String get archiveAlbum {
+    return Intl.message(
+      'Archive album',
+      name: 'archiveAlbum',
+      desc: '',
+      args: [],
+    );
+  }
+
+  /// `Calculating...`
+  String get calculating {
+    return Intl.message(
+      'Calculating...',
+      name: 'calculating',
+      desc: '',
+      args: [],
+    );
+  }
+
+  /// `Please wait, deleting album`
+  String get pleaseWaitDeletingAlbum {
+    return Intl.message(
+      'Please wait, deleting album',
+      name: 'pleaseWaitDeletingAlbum',
+      desc: '',
+      args: [],
+    );
+  }
+
+  /// `Albums, months, days, years, ...`
+  String get searchHintText {
+    return Intl.message(
+      'Albums, months, days, years, ...',
+      name: 'searchHintText',
+      desc: '',
+      args: [],
+    );
+  }
+
+  /// `• Album names (e.g. "Camera")\n• Types of files (e.g. "Videos", ".gif")\n• Years and months (e.g. "2022", "January")\n• Holidays (e.g. "Christmas")\n• Photo descriptions (e.g. “#fun”)`
+  String get searchByExamples {
+    return Intl.message(
+      '• Album names (e.g. "Camera")\n• Types of files (e.g. "Videos", ".gif")\n• Years and months (e.g. "2022", "January")\n• Holidays (e.g. "Christmas")\n• Photo descriptions (e.g. “#fun”)',
+      name: 'searchByExamples',
+      desc: '',
+      args: [],
+    );
+  }
+
+  /// `You can try searching for a different query.`
+  String get youCanTrySearchingForADifferentQuery {
+    return Intl.message(
+      'You can try searching for a different query.',
+      name: 'youCanTrySearchingForADifferentQuery',
+      desc: '',
+      args: [],
+    );
+  }
+
+  /// `No results found`
+  String get noResultsFound {
+    return Intl.message(
+      'No results found',
+      name: 'noResultsFound',
+      desc: '',
+      args: [],
+    );
+  }
 }
 
 class AppLocalizationDelegate extends LocalizationsDelegate<S> {

+ 15 - 1
lib/l10n/intl_en.arb

@@ -754,5 +754,19 @@
   "ignoredFolderUploadReason": "Some files in this album are ignored from upload because they had previously been deleted from ente.",
   "resetIgnoredFiles": "Reset ignored files",
   "deviceFilesAutoUploading": "Files added to this device album will automatically get uploaded to ente.",
-  "turnOnBackupForAutoUpload": "Turn on backup to automatically upload files added to this device folder to ente."
+  "turnOnBackupForAutoUpload": "Turn on backup to automatically upload files added to this device folder to ente.",
+  "noHiddenPhotosOrVideos": "No hidden photos or videos",
+  "toHideAPhotoOrVideo": "To hide a photo or video",
+  "openTheItem": "• Open the item",
+  "clickOnTheOverflowMenu": "• Click on the overflow menu",
+  "click": "• Click",
+  "nothingToSeeHere": "Nothing to see here! 👀",
+  "unarchiveAlbum": "Unarchive album",
+  "archiveAlbum": "Archive album",
+  "calculating": "Calculating...",
+  "pleaseWaitDeletingAlbum": "Please wait, deleting album",
+  "searchHintText": "Albums, months, days, years, ...",
+  "searchByExamples" : "\u2022 Album names (e.g. \"Camera\")\n\u2022 Types of files (e.g. \"Videos\", \".gif\")\n\u2022 Years and months (e.g. \"2022\", \"January\")\n\u2022 Holidays (e.g. \"Christmas\")\n\u2022 Photo descriptions (e.g. “#fun”)",
+  "youCanTrySearchingForADifferentQuery": "You can try searching for a different query.",
+  "noResultsFound": "No results found"
 }

+ 8 - 7
lib/ui/viewer/gallery/empty_hidden_widget.dart

@@ -1,4 +1,5 @@
 import 'package:flutter/material.dart';
+import "package:photos/generated/l10n.dart";
 import 'package:photos/theme/colors.dart';
 import 'package:photos/theme/ente_theme.dart';
 import 'package:photos/theme/text_style.dart';
@@ -24,7 +25,7 @@ class EmptyHiddenWidget extends StatelessWidget {
             ),
             const SizedBox(height: 10),
             Text(
-              "No hidden photos or videos",
+              S.of(context).noHiddenPhotosOrVideos,
               textAlign: TextAlign.center,
               style: enteTextTheme.body.copyWith(
                 color: enteColorScheme.textMuted,
@@ -34,24 +35,24 @@ class EmptyHiddenWidget extends StatelessWidget {
             Column(
               crossAxisAlignment: CrossAxisAlignment.start,
               children: [
-                const EmptyHiddenTextWidget("To hide a photo or video"),
+                EmptyHiddenTextWidget(S.of(context).toHideAPhotoOrVideo),
                 const SizedBox(height: 4),
                 Padding(
                   padding: const EdgeInsets.only(left: 6),
                   child: Column(
                     crossAxisAlignment: CrossAxisAlignment.start,
                     children: [
-                      const EmptyHiddenTextWidget("• Open the item"),
+                      EmptyHiddenTextWidget(S.of(context).openTheItem),
                       const SizedBox(height: 2),
-                      const EmptyHiddenTextWidget(
-                        "• Click on the overflow menu",
+                      EmptyHiddenTextWidget(
+                        S.of(context).clickOnTheOverflowMenu,
                       ),
                       const SizedBox(height: 2),
                       SizedBox(
                         width: 120,
                         child: Row(
                           children: [
-                            const EmptyHiddenTextWidget("• Click "),
+                            EmptyHiddenTextWidget(S.of(context).click),
                             const SizedBox(width: 4),
                             Icon(
                               Icons.visibility_off,
@@ -62,7 +63,7 @@ class EmptyHiddenWidget extends StatelessWidget {
                               padding: EdgeInsets.all(4),
                             ),
                             Text(
-                              "Hide",
+                              S.of(context).hide,
                               style: TextStyle(
                                 color: enteColorScheme.textBase,
                               ),

+ 4 - 4
lib/ui/viewer/gallery/empty_state.dart

@@ -1,11 +1,11 @@
 import 'package:flutter/material.dart';
 import 'package:photos/ente_theme_data.dart';
+import "package:photos/generated/l10n.dart";
 
 class EmptyState extends StatelessWidget {
-  final String text;
+  final String? text;
 
-  const EmptyState({Key? key, this.text = "Nothing to see here! 👀"})
-      : super(key: key);
+  const EmptyState({Key? key, this.text}) : super(key: key);
 
   @override
   Widget build(BuildContext context) {
@@ -13,7 +13,7 @@ class EmptyState extends StatelessWidget {
       child: Padding(
         padding: const EdgeInsets.all(8.0),
         child: Text(
-          text,
+          text ?? S.of(context).nothingToSeeHere,
           textAlign: TextAlign.center,
           style: TextStyle(
             color: Theme.of(context)

+ 27 - 25
lib/ui/viewer/gallery/gallery_app_bar_widget.dart

@@ -181,7 +181,7 @@ class _GalleryAppBarWidgetState extends State<GalleryAppBarWidget> {
   // the space which can be claimed up. This code duplication should be removed
   // whenever we move to the new design for free up space.
   Future<dynamic> _deleteBackedUpFiles(BuildContext context) async {
-    final dialog = createProgressDialog(context, "Calculating...");
+    final dialog = createProgressDialog(context, S.of(context).calculating);
     await dialog.show();
     BackupStatus status;
     try {
@@ -213,19 +213,19 @@ class _GalleryAppBarWidgetState extends State<GalleryAppBarWidget> {
 
   void _showSpaceFreedDialog(BackupStatus status) {
     final DialogWidget dialog = choiceDialog(
-      title: "Success",
-      body: "You have successfully freed up " + formatBytes(status.size) + "!",
-      firstButtonLabel: "Rate us",
+      title: S.of(context).success,
+      body: S.of(context).youHaveSuccessfullyFreedUp(formatBytes(status.size)),
+      firstButtonLabel: S.of(context).rateUs,
       firstButtonOnTap: () async {
         UpdateService.instance.launchReviewUrl();
       },
       firstButtonType: ButtonType.primary,
-      secondButtonLabel: "OK",
+      secondButtonLabel: S.of(context).ok,
       secondButtonOnTap: () async {
         if (Platform.isIOS) {
           showToast(
             context,
-            "Also empty \"Recently Deleted\" from \"Settings\" -> \"Storage\" to claim the freed space",
+            S.of(context).remindToEmptyDeviceTrash,
           );
         }
       },
@@ -268,12 +268,12 @@ class _GalleryAppBarWidgetState extends State<GalleryAppBarWidget> {
           PopupMenuItem(
             value: 1,
             child: Row(
-              children: const [
-                Icon(Icons.edit),
-                Padding(
+              children: [
+                const Icon(Icons.edit),
+                const Padding(
                   padding: EdgeInsets.all(8),
                 ),
-                Text("Rename album"),
+                Text(S.of(context).renameAlbum),
               ],
             ),
           ),
@@ -292,7 +292,9 @@ class _GalleryAppBarWidgetState extends State<GalleryAppBarWidget> {
                 const Padding(
                   padding: EdgeInsets.all(8),
                 ),
-                Text(isArchived ? "Unarchive album" : "Archive album"),
+                Text(isArchived
+                    ? S.of(context).unarchiveAlbum
+                    : S.of(context).archiveAlbum),
               ],
             ),
           ),
@@ -303,12 +305,12 @@ class _GalleryAppBarWidgetState extends State<GalleryAppBarWidget> {
           PopupMenuItem(
             value: 3,
             child: Row(
-              children: const [
-                Icon(Icons.delete_outline),
-                Padding(
+              children: [
+                const Icon(Icons.delete_outline),
+                const Padding(
                   padding: EdgeInsets.all(8),
                 ),
-                Text("Delete album"),
+                Text(S.of(context).deleteAlbum),
               ],
             ),
           ),
@@ -321,12 +323,12 @@ class _GalleryAppBarWidgetState extends State<GalleryAppBarWidget> {
         PopupMenuItem(
           value: 4,
           child: Row(
-            children: const [
-              Icon(Icons.logout),
-              Padding(
+            children: [
+              const Icon(Icons.logout),
+              const Padding(
                 padding: EdgeInsets.all(8),
               ),
-              Text("Leave album"),
+              Text(S.of(context).leaveAlbum),
             ],
           ),
         ),
@@ -337,12 +339,12 @@ class _GalleryAppBarWidgetState extends State<GalleryAppBarWidget> {
         PopupMenuItem(
           value: 5,
           child: Row(
-            children: const [
-              Icon(Icons.delete_sweep_outlined),
-              Padding(
+            children: [
+              const Icon(Icons.delete_sweep_outlined),
+              const Padding(
                 padding: EdgeInsets.all(8),
               ),
-              Text("Free up device space"),
+              Text(S.of(context).freeUpDeviceSpace),
             ],
           ),
         ),
@@ -372,7 +374,7 @@ class _GalleryAppBarWidgetState extends State<GalleryAppBarWidget> {
             } else if (value == 5) {
               await _deleteBackedUpFiles(context);
             } else {
-              showToast(context, "Something went wrong");
+              showToast(context, S.of(context).somethingWentWrong);
             }
           },
         ),
@@ -394,7 +396,7 @@ class _GalleryAppBarWidgetState extends State<GalleryAppBarWidget> {
     if (isEmptyCollection) {
       final dialog = createProgressDialog(
         context,
-        "Please wait, deleting album",
+        S.of(context).pleaseWaitDeletingAlbum,
       );
       await dialog.show();
       try {

+ 6 - 10
lib/ui/viewer/search/result/no_result_widget.dart

@@ -1,5 +1,6 @@
 import 'package:flutter/material.dart';
 import 'package:photos/ente_theme_data.dart';
+import "package:photos/generated/l10n.dart";
 
 class NoResultWidget extends StatelessWidget {
   const NoResultWidget({Key? key}) : super(key: key);
@@ -29,10 +30,10 @@ class NoResultWidget extends StatelessWidget {
           children: [
             Container(
               margin: const EdgeInsets.only(top: 8),
-              child: const Text(
-                "No results found",
+              child: Text(
+                S.of(context).noResultsFound,
                 textAlign: TextAlign.left,
-                style: TextStyle(
+                style: const TextStyle(
                   fontSize: 16,
                 ),
               ),
@@ -40,7 +41,7 @@ class NoResultWidget extends StatelessWidget {
             Container(
               margin: const EdgeInsets.only(top: 16),
               child: Text(
-                "You can try searching for a different query.",
+                S.of(context).youCanTrySearchingForADifferentQuery,
                 style: TextStyle(
                   fontSize: 14,
                   color: Theme.of(context)
@@ -54,12 +55,7 @@ class NoResultWidget extends StatelessWidget {
             Container(
               margin: const EdgeInsets.only(bottom: 20, top: 12),
               child: Text(
-                '''\u2022 Album names (e.g. "Camera")
-\u2022 Types of files (e.g. "Videos", ".gif")
-\u2022 Years and months (e.g. "2022", "January")
-\u2022 Holidays (e.g. "Christmas")
-\u2022 Photo descriptions (e.g. “#fun”)
-''',
+                S.of(context).searchByExamples,
                 style: TextStyle(
                   fontSize: 14,
                   color: Theme.of(context)

+ 2 - 1
lib/ui/viewer/search/search_widget.dart

@@ -3,6 +3,7 @@ import 'dart:async';
 import 'package:flutter/material.dart';
 import 'package:logging/logging.dart';
 import 'package:photos/ente_theme_data.dart';
+import "package:photos/generated/l10n.dart";
 import 'package:photos/models/search/search_result.dart';
 import 'package:photos/services/feature_flag_service.dart';
 import 'package:photos/services/search_service.dart';
@@ -87,7 +88,7 @@ class _SearchWidgetState extends State<SearchWidget> {
                       keyboardType: TextInputType.visiblePassword,
                       // Above parameters are to disable auto-suggestion
                       decoration: InputDecoration(
-                        hintText: "Albums, months, days, years, ...",
+                        hintText: S.of(context).searchHintText,
                         filled: true,
                         contentPadding: const EdgeInsets.symmetric(
                           vertical: 10,