소스 검색

l10n: extract email_entry_page strings

Neeraj Gupta 2 년 전
부모
커밋
0e90efef45
4개의 변경된 파일161개의 추가작업 그리고 21개의 파일을 삭제
  1. 16 0
      lib/generated/intl/messages_en.dart
  2. 103 0
      lib/generated/l10n.dart
  3. 21 1
      lib/l10n/intl_en.arb
  4. 21 20
      lib/ui/account/email_entry_page.dart

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

@@ -27,8 +27,13 @@ class MessageLookup extends MessageLookupByLibrary {
   static Map<String, Function> _notInlinedMessages(_) => <String, Function>{
         "accountWelcomeBack":
             MessageLookupByLibrary.simpleMessage("Welcome back!"),
+        "ackPasswordLostWarningPart1": MessageLookupByLibrary.simpleMessage(
+            "I understand that if I lose my password, I may lose my data since my data is "),
+        "ackPasswordLostWarningPart2":
+            MessageLookupByLibrary.simpleMessage(" with ente"),
         "activeSessions":
             MessageLookupByLibrary.simpleMessage("Active sessions"),
+        "and": MessageLookupByLibrary.simpleMessage("and"),
         "askDeleteReason": MessageLookupByLibrary.simpleMessage(
             "What is the main reason you are deleting your account?"),
         "cancel": MessageLookupByLibrary.simpleMessage("Cancel"),
@@ -65,8 +70,11 @@ class MessageLookup extends MessageLookupByLibrary {
         "deleteRequestSLAText": MessageLookupByLibrary.simpleMessage(
             "Your request will be processed within 72 hours."),
         "email": MessageLookupByLibrary.simpleMessage("Email"),
+        "encryption": MessageLookupByLibrary.simpleMessage("Encryption"),
         "encryptionKeys":
             MessageLookupByLibrary.simpleMessage("Encryption keys"),
+        "endToEndEncrypted":
+            MessageLookupByLibrary.simpleMessage("end-to-end encrypted"),
         "enterNewPasswordToEncrypt": MessageLookupByLibrary.simpleMessage(
             "Enter a new password we can use to encrypt your data"),
         "enterPasswordToEncrypt": MessageLookupByLibrary.simpleMessage(
@@ -113,6 +121,9 @@ class MessageLookup extends MessageLookupByLibrary {
         "pleaseSendAnEmailTo":
             MessageLookupByLibrary.simpleMessage("Please send an email to"),
         "pleaseWait": MessageLookupByLibrary.simpleMessage("Please wait..."),
+        "privacyPolicy": MessageLookupByLibrary.simpleMessage("privacy policy"),
+        "privacyPolicyTitle":
+            MessageLookupByLibrary.simpleMessage("Privacy Policy"),
         "recoverButton": MessageLookupByLibrary.simpleMessage("Recover"),
         "recoverySuccessful":
             MessageLookupByLibrary.simpleMessage("Recovery successful!"),
@@ -136,6 +147,11 @@ class MessageLookup extends MessageLookupByLibrary {
         "terminate": MessageLookupByLibrary.simpleMessage("Terminate"),
         "terminateSession":
             MessageLookupByLibrary.simpleMessage("Terminate session?"),
+        "termsAgreePart1":
+            MessageLookupByLibrary.simpleMessage("I agree to the"),
+        "termsOfService":
+            MessageLookupByLibrary.simpleMessage("terms of service"),
+        "termsOfServicesTitle": MessageLookupByLibrary.simpleMessage("Terms"),
         "thisDevice": MessageLookupByLibrary.simpleMessage("This device"),
         "thisWillLogYouOutOfTheFollowingDevice":
             MessageLookupByLibrary.simpleMessage(

+ 103 - 0
lib/generated/l10n.dart

@@ -783,6 +783,109 @@ class S {
       args: [],
     );
   }
+
+  /// `Encryption`
+  String get encryption {
+    return Intl.message(
+      'Encryption',
+      name: 'encryption',
+      desc: '',
+      args: [],
+    );
+  }
+
+  /// `I understand that if I lose my password, I may lose my data since my data is `
+  String get ackPasswordLostWarningPart1 {
+    return Intl.message(
+      'I understand that if I lose my password, I may lose my data since my data is ',
+      name: 'ackPasswordLostWarningPart1',
+      desc: '',
+      args: [],
+    );
+  }
+
+  /// `end-to-end encrypted`
+  String get endToEndEncrypted {
+    return Intl.message(
+      'end-to-end encrypted',
+      name: 'endToEndEncrypted',
+      desc: '',
+      args: [],
+    );
+  }
+
+  /// ` with ente`
+  String get ackPasswordLostWarningPart2 {
+    return Intl.message(
+      ' with ente',
+      name: 'ackPasswordLostWarningPart2',
+      desc:
+          'This text is part2 the sentence \'I understand that if I lose my password, I may lose my data since my data is end-to-end encrypted with ente.\'',
+      args: [],
+    );
+  }
+
+  /// `Privacy Policy`
+  String get privacyPolicyTitle {
+    return Intl.message(
+      'Privacy Policy',
+      name: 'privacyPolicyTitle',
+      desc: '',
+      args: [],
+    );
+  }
+
+  /// `Terms`
+  String get termsOfServicesTitle {
+    return Intl.message(
+      'Terms',
+      name: 'termsOfServicesTitle',
+      desc: '',
+      args: [],
+    );
+  }
+
+  /// `I agree to the`
+  String get termsAgreePart1 {
+    return Intl.message(
+      'I agree to the',
+      name: 'termsAgreePart1',
+      desc:
+          'This text is part the sentence \'I agree to the terms of service and privacy policy.\'',
+      args: [],
+    );
+  }
+
+  /// `privacy policy`
+  String get privacyPolicy {
+    return Intl.message(
+      'privacy policy',
+      name: 'privacyPolicy',
+      desc: '',
+      args: [],
+    );
+  }
+
+  /// `and`
+  String get and {
+    return Intl.message(
+      'and',
+      name: 'and',
+      desc:
+          'Separator used in sentences like \'I agree to the terms of service and privacy policy.\'',
+      args: [],
+    );
+  }
+
+  /// `terms of service`
+  String get termsOfService {
+    return Intl.message(
+      'terms of service',
+      name: 'termsOfService',
+      desc: '',
+      args: [],
+    );
+  }
 }
 
 class AppLocalizationDelegate extends LocalizationsDelegate<S> {

+ 21 - 1
lib/l10n/intl_en.arb

@@ -94,5 +94,25 @@
   "continueLabel": "Continue",
   "insecureDevice": "Insecure device",
   "sorryWeCouldNotGenerateSecureKeysOnThisDevicennplease": "Sorry, we could not generate secure keys on this device.\n\nplease sign up from a different device.",
-  "howItWorks": "How it works"
+  "howItWorks": "How it works",
+  "encryption": "Encryption",
+  "ackPasswordLostWarningPart1": "I understand that if I lose my password, I may lose my data since my data is ",
+  "endToEndEncrypted": "end-to-end encrypted",
+  "ackPasswordLostWarningPart2": " with ente",
+  "@ackPasswordLostWarningPart2": {
+    "description": "This text is part2 the sentence 'I understand that if I lose my password, I may lose my data since my data is end-to-end encrypted with ente.'"
+  },
+  "privacyPolicyTitle": "Privacy Policy",
+  "termsOfServicesTitle": "Terms",
+
+  "termsAgreePart1": "I agree to the",
+  "@termsAgreePart1": {
+    "description": "This text is part the sentence 'I agree to the terms of service and privacy policy.'"
+  },
+  "privacyPolicy": "privacy policy",
+  "and": "and",
+  "@and": {
+    "description": "Separator used in sentences like 'I agree to the terms of service and privacy policy.'"
+  },
+  "termsOfService": "terms of service"
 }

+ 21 - 20
lib/ui/account/email_entry_page.dart

@@ -115,13 +115,13 @@ class _EmailEntryPageState extends State<EmailEntryPage> {
   }
 
   Widget _getBody() {
-    var passwordStrengthText = 'Weak';
+    var passwordStrengthText = S.of(context).weakStrength;
     var passwordStrengthColor = Colors.redAccent;
     if (_passwordStrength > kStrongPasswordStrengthThreshold) {
-      passwordStrengthText = 'Strong';
+      passwordStrengthText = S.of(context).strongStrength;
       passwordStrengthColor = Colors.greenAccent;
     } else if (_passwordStrength > kMildPasswordStrengthThreshold) {
-      passwordStrengthText = 'Moderate';
+      passwordStrengthText = S.of(context).moderateStrength;
       passwordStrengthColor = Colors.orangeAccent;
     }
     return Column(
@@ -315,7 +315,7 @@ class _EmailEntryPageState extends State<EmailEntryPage> {
                     padding:
                         const EdgeInsets.symmetric(horizontal: 24, vertical: 8),
                     child: Text(
-                      'Password strength: $passwordStrengthText',
+                      S.of(context).passwordStrength(passwordStrengthText),
                       style: TextStyle(
                         color: passwordStrengthColor,
                         fontWeight: FontWeight.w500,
@@ -372,11 +372,11 @@ class _EmailEntryPageState extends State<EmailEntryPage> {
             child: RichText(
               text: TextSpan(
                 children: [
-                  const TextSpan(
-                    text: "I agree to the ",
+                  TextSpan(
+                    text: S.of(context).termsAgreePart1,
                   ),
                   TextSpan(
-                    text: "terms of service",
+                    text: S.of(context).termsOfService,
                     style: const TextStyle(
                       decoration: TextDecoration.underline,
                     ),
@@ -385,8 +385,8 @@ class _EmailEntryPageState extends State<EmailEntryPage> {
                         Navigator.of(context).push(
                           MaterialPageRoute(
                             builder: (BuildContext context) {
-                              return const WebPage(
-                                "Terms",
+                              return WebPage(
+                                S.of(context).termsOfServicesTitle,
                                 "https://ente.io/terms",
                               );
                             },
@@ -394,9 +394,9 @@ class _EmailEntryPageState extends State<EmailEntryPage> {
                         );
                       },
                   ),
-                  const TextSpan(text: " and "),
+                  TextSpan(text: ' ${S.of(context).and} '),
                   TextSpan(
-                    text: "privacy policy",
+                    text: S.of(context).privacyPolicy,
                     style: const TextStyle(
                       decoration: TextDecoration.underline,
                     ),
@@ -405,8 +405,8 @@ class _EmailEntryPageState extends State<EmailEntryPage> {
                         Navigator.of(context).push(
                           MaterialPageRoute(
                             builder: (BuildContext context) {
-                              return const WebPage(
-                                "Privacy",
+                              return WebPage(
+                                S.of(context).privacyPolicyTitle,
                                 "https://ente.io/privacy",
                               );
                             },
@@ -451,12 +451,11 @@ class _EmailEntryPageState extends State<EmailEntryPage> {
             child: RichText(
               text: TextSpan(
                 children: [
-                  const TextSpan(
-                    text:
-                        "I understand that if I lose my password, I may lose my data since my data is ",
+                  TextSpan(
+                    text: S.of(context).ackPasswordLostWarningPart1,
                   ),
                   TextSpan(
-                    text: "end-to-end encrypted",
+                    text: S.of(context).endToEndEncrypted,
                     style: const TextStyle(
                       decoration: TextDecoration.underline,
                     ),
@@ -465,8 +464,8 @@ class _EmailEntryPageState extends State<EmailEntryPage> {
                         Navigator.of(context).push(
                           MaterialPageRoute(
                             builder: (BuildContext context) {
-                              return const WebPage(
-                                "Encryption",
+                              return WebPage(
+                                S.of(context).encryption,
                                 "https://ente.io/architecture",
                               );
                             },
@@ -474,7 +473,9 @@ class _EmailEntryPageState extends State<EmailEntryPage> {
                         );
                       },
                   ),
-                  const TextSpan(text: " with ente"),
+                  TextSpan(
+                    text: " ${S.of(context).ackPasswordLostWarningPart2}",
+                  ),
                 ],
                 style: Theme.of(context)
                     .textTheme