Selaa lähdekoodia

l10n: extractadd_partipant_page strings

Neeraj Gupta 2 vuotta sitten
vanhempi
commit
bc5f7673dd

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

@@ -36,6 +36,10 @@ class MessageLookup extends MessageLookupByLibrary {
             MessageLookupByLibrary.simpleMessage(" with ente"),
         "activeSessions":
             MessageLookupByLibrary.simpleMessage("Active sessions"),
+        "addANewEmail": MessageLookupByLibrary.simpleMessage("Add a new email"),
+        "addCollaborator":
+            MessageLookupByLibrary.simpleMessage("Add collaborator"),
+        "addViewer": MessageLookupByLibrary.simpleMessage("Add viewer"),
         "and": MessageLookupByLibrary.simpleMessage("and"),
         "askDeleteReason": MessageLookupByLibrary.simpleMessage(
             "What is the main reason you are deleting your account?"),
@@ -49,6 +53,9 @@ class MessageLookup extends MessageLookupByLibrary {
             "Please check your inbox (and spam) to complete verification"),
         "codeCopiedToClipboard":
             MessageLookupByLibrary.simpleMessage("Code copied to clipboard"),
+        "collaboratorsCanAddPhotosAndVideosToTheSharedAlbum":
+            MessageLookupByLibrary.simpleMessage(
+                "Collaborators can add photos and videos to the shared album."),
         "confirm": MessageLookupByLibrary.simpleMessage("Confirm"),
         "confirmAccountDeletion":
             MessageLookupByLibrary.simpleMessage("Confirm Account Deletion"),
@@ -96,6 +103,7 @@ class MessageLookup extends MessageLookupByLibrary {
         "endToEndEncrypted":
             MessageLookupByLibrary.simpleMessage("end-to-end encrypted"),
         "enterCode": MessageLookupByLibrary.simpleMessage("Enter code"),
+        "enterEmail": MessageLookupByLibrary.simpleMessage("Enter email"),
         "enterNewPasswordToEncrypt": MessageLookupByLibrary.simpleMessage(
             "Enter a new password we can use to encrypt your data"),
         "enterPasswordToEncrypt": MessageLookupByLibrary.simpleMessage(
@@ -147,6 +155,8 @@ class MessageLookup extends MessageLookupByLibrary {
             "Due to the nature of our end-to-end encryption protocol, your data cannot be decrypted without your password or recovery key"),
         "ok": MessageLookupByLibrary.simpleMessage("Ok"),
         "oops": MessageLookupByLibrary.simpleMessage("Oops"),
+        "orPickAnExistingOne":
+            MessageLookupByLibrary.simpleMessage("Or pick an existing one"),
         "password": MessageLookupByLibrary.simpleMessage("Password"),
         "passwordChangedSuccessfully": MessageLookupByLibrary.simpleMessage(
             "Password changed successfully"),

+ 60 - 0
lib/generated/l10n.dart

@@ -1337,6 +1337,66 @@ class S {
       args: [],
     );
   }
+
+  /// `Add viewer`
+  String get addViewer {
+    return Intl.message(
+      'Add viewer',
+      name: 'addViewer',
+      desc: '',
+      args: [],
+    );
+  }
+
+  /// `Add collaborator`
+  String get addCollaborator {
+    return Intl.message(
+      'Add collaborator',
+      name: 'addCollaborator',
+      desc: '',
+      args: [],
+    );
+  }
+
+  /// `Add a new email`
+  String get addANewEmail {
+    return Intl.message(
+      'Add a new email',
+      name: 'addANewEmail',
+      desc: '',
+      args: [],
+    );
+  }
+
+  /// `Or pick an existing one`
+  String get orPickAnExistingOne {
+    return Intl.message(
+      'Or pick an existing one',
+      name: 'orPickAnExistingOne',
+      desc: '',
+      args: [],
+    );
+  }
+
+  /// `Collaborators can add photos and videos to the shared album.`
+  String get collaboratorsCanAddPhotosAndVideosToTheSharedAlbum {
+    return Intl.message(
+      'Collaborators can add photos and videos to the shared album.',
+      name: 'collaboratorsCanAddPhotosAndVideosToTheSharedAlbum',
+      desc: '',
+      args: [],
+    );
+  }
+
+  /// `Enter email`
+  String get enterEmail {
+    return Intl.message(
+      'Enter email',
+      name: 'enterEmail',
+      desc: '',
+      args: [],
+    );
+  }
 }
 
 class AppLocalizationDelegate extends LocalizationsDelegate<S> {

+ 7 - 1
lib/l10n/intl_en.arb

@@ -170,5 +170,11 @@
   "viewRecoveryKey": "View recovery key",
   "confirmRecoveryKey": "Confirm recovery key",
   "recoveryKeyVerifyReason": "Your recovery key is the only way to recover your photos if you forget your password. You can find your recovery key in Settings > Account.\n\nPlease enter your recovery key here to verify that you have saved it correctly.",
-  "confirmYourRecoveryKey": "Confirm your recovery key"
+  "confirmYourRecoveryKey": "Confirm your recovery key",
+  "addViewer": "Add viewer",
+  "addCollaborator": "Add collaborator",
+  "addANewEmail": "Add a new email",
+  "orPickAnExistingOne": "Or pick an existing one",
+  "collaboratorsCanAddPhotosAndVideosToTheSharedAlbum": "Collaborators can add photos and videos to the shared album.",
+  "enterEmail": "Enter email"
 }

+ 17 - 13
lib/ui/sharing/add_partipant_page.dart

@@ -1,6 +1,7 @@
 import 'package:email_validator/email_validator.dart';
 import 'package:flutter/material.dart';
 import 'package:photos/core/configuration.dart';
+import "package:photos/generated/l10n.dart";
 import 'package:photos/models/collection.dart';
 import 'package:photos/services/collections_service.dart';
 import 'package:photos/theme/ente_theme.dart';
@@ -60,7 +61,9 @@ class _AddParticipantPage extends State<AddParticipantPage> {
     return Scaffold(
       resizeToAvoidBottomInset: isKeypadOpen,
       appBar: AppBar(
-        title: Text(widget.isAddingViewer ? "Add viewer" : "Add collaborator"),
+        title: Text(widget.isAddingViewer
+            ? S.of(context).addViewer
+            : S.of(context).addCollaborator),
       ),
       body: Column(
         mainAxisAlignment: MainAxisAlignment.start,
@@ -70,7 +73,7 @@ class _AddParticipantPage extends State<AddParticipantPage> {
           Padding(
             padding: const EdgeInsets.symmetric(horizontal: 16.0),
             child: Text(
-              "Add a new email",
+              S.of(context).addANewEmail,
               style: enteTextTheme.small
                   .copyWith(color: enteColorScheme.textMuted),
             ),
@@ -88,21 +91,22 @@ class _AddParticipantPage extends State<AddParticipantPage> {
                     child: Column(
                       children: [
                         !isEmailListEmpty
-                            ? const MenuSectionTitle(
-                                title: "Or pick an existing one",
+                            ? MenuSectionTitle(
+                                title: S.of(context).orPickAnExistingOne,
                               )
                             : const SizedBox.shrink(),
                         Expanded(
                           child: ListView.builder(
                             itemBuilder: (context, index) {
                               if (index >= suggestedUsers.length) {
-                                return const Padding(
-                                  padding: EdgeInsets.symmetric(
+                                return Padding(
+                                  padding: const EdgeInsets.symmetric(
                                     vertical: 8.0,
                                   ),
                                   child: MenuSectionDescriptionWidget(
-                                    content:
-                                        "Collaborators can add photos and videos to the shared album.",
+                                    content: S
+                                        .of(context)
+                                        .collaboratorsCanAddPhotosAndVideosToTheSharedAlbum,
                                   ),
                                 );
                               }
@@ -176,8 +180,8 @@ class _AddParticipantPage extends State<AddParticipantPage> {
                     buttonType: ButtonType.primary,
                     buttonSize: ButtonSize.large,
                     labelText: widget.isAddingViewer
-                        ? "Add viewer"
-                        : "Add collaborator",
+                        ? S.of(context).addViewer
+                        : S.of(context).addCollaborator,
                     isDisabled: (selectedEmail == '' && !_emailIsValid),
                     onTap: (selectedEmail == '' && !_emailIsValid)
                         ? null
@@ -204,8 +208,8 @@ class _AddParticipantPage extends State<AddParticipantPage> {
                       if ((selectedEmail == '' && !_emailIsValid)) {
                         await showErrorDialog(
                           context,
-                          "Invalid email address",
-                          "Please enter a valid email address.",
+                          S.of(context).invalidEmailAddress,
+                          S.of(context).enterValidEmail,
                         );
                         return;
                       }
@@ -261,7 +265,7 @@ class _AddParticipantPage extends State<AddParticipantPage> {
         ),
         fillColor: getEnteColorScheme(context).fillFaint,
         filled: true,
-        hintText: 'Enter email',
+        hintText: S.of(context).enterEmail,
         contentPadding: const EdgeInsets.symmetric(
           horizontal: 16,
           vertical: 14,