فهرست منبع

l10n: extract login_page strings

Neeraj Gupta 2 سال پیش
والد
کامیت
fda7516efd
4فایلهای تغییر یافته به همراه42 افزوده شده و 12 حذف شده
  1. 3 0
      lib/generated/intl/messages_en.dart
  2. 21 0
      lib/generated/l10n.dart
  3. 6 2
      lib/l10n/intl_en.arb
  4. 12 10
      lib/ui/account/login_page.dart

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

@@ -36,6 +36,8 @@ class MessageLookup extends MessageLookupByLibrary {
         "and": MessageLookupByLibrary.simpleMessage("and"),
         "and": MessageLookupByLibrary.simpleMessage("and"),
         "askDeleteReason": MessageLookupByLibrary.simpleMessage(
         "askDeleteReason": MessageLookupByLibrary.simpleMessage(
             "What is the main reason you are deleting your account?"),
             "What is the main reason you are deleting your account?"),
+        "byClickingLogInIAgreeToThe": MessageLookupByLibrary.simpleMessage(
+            "By clicking log in, I agree to the"),
         "cancel": MessageLookupByLibrary.simpleMessage("Cancel"),
         "cancel": MessageLookupByLibrary.simpleMessage("Cancel"),
         "changePasswordTitle":
         "changePasswordTitle":
             MessageLookupByLibrary.simpleMessage("Change password"),
             MessageLookupByLibrary.simpleMessage("Change password"),
@@ -103,6 +105,7 @@ class MessageLookup extends MessageLookupByLibrary {
             MessageLookupByLibrary.simpleMessage("Invalid email address"),
             MessageLookupByLibrary.simpleMessage("Invalid email address"),
         "kindlyHelpUsWithThisInformation": MessageLookupByLibrary.simpleMessage(
         "kindlyHelpUsWithThisInformation": MessageLookupByLibrary.simpleMessage(
             "Kindly help us with this information"),
             "Kindly help us with this information"),
+        "logInLabel": MessageLookupByLibrary.simpleMessage("Log in"),
         "moderateStrength": MessageLookupByLibrary.simpleMessage("Moderate"),
         "moderateStrength": MessageLookupByLibrary.simpleMessage("Moderate"),
         "noPasswordWarningPart1": MessageLookupByLibrary.simpleMessage(
         "noPasswordWarningPart1": MessageLookupByLibrary.simpleMessage(
             "We don\'t store this password, so if you forget,"),
             "We don\'t store this password, so if you forget,"),

+ 21 - 0
lib/generated/l10n.dart

@@ -886,6 +886,27 @@ class S {
       args: [],
       args: [],
     );
     );
   }
   }
+
+  /// `Log in`
+  String get logInLabel {
+    return Intl.message(
+      'Log in',
+      name: 'logInLabel',
+      desc: '',
+      args: [],
+    );
+  }
+
+  /// `By clicking log in, I agree to the`
+  String get byClickingLogInIAgreeToThe {
+    return Intl.message(
+      'By clicking log in, I agree to the',
+      name: 'byClickingLogInIAgreeToThe',
+      desc:
+          'This text is part the sentence \'By clicking log in, I agree to the terms of service and privacy policy\'',
+      args: [],
+    );
+  }
 }
 }
 
 
 class AppLocalizationDelegate extends LocalizationsDelegate<S> {
 class AppLocalizationDelegate extends LocalizationsDelegate<S> {

+ 6 - 2
lib/l10n/intl_en.arb

@@ -104,7 +104,6 @@
   },
   },
   "privacyPolicyTitle": "Privacy Policy",
   "privacyPolicyTitle": "Privacy Policy",
   "termsOfServicesTitle": "Terms",
   "termsOfServicesTitle": "Terms",
-
   "termsAgreePart1": "I agree to the ",
   "termsAgreePart1": "I agree to the ",
   "@termsAgreePart1": {
   "@termsAgreePart1": {
     "description": "Note: there's a trailing space. This text is part the sentence 'I agree to the terms of service and privacy policy.'"
     "description": "Note: there's a trailing space. This text is part the sentence 'I agree to the terms of service and privacy policy.'"
@@ -114,5 +113,10 @@
   "@and": {
   "@and": {
     "description": "Separator used in sentences like 'I agree to the terms of service and privacy policy.'"
     "description": "Separator used in sentences like 'I agree to the terms of service and privacy policy.'"
   },
   },
-  "termsOfService": "terms of service"
+  "termsOfService": "terms of service",
+  "logInLabel": "Log in",
+  "byClickingLogInIAgreeToThe": "By clicking log in, I agree to the",
+  "@byClickingLogInIAgreeToThe": {
+    "description": "This text is part the sentence 'By clicking log in, I agree to the terms of service and privacy policy'"
+  }
 }
 }

+ 12 - 10
lib/ui/account/login_page.dart

@@ -2,6 +2,7 @@ import 'package:email_validator/email_validator.dart';
 import 'package:flutter/gestures.dart';
 import 'package:flutter/gestures.dart';
 import 'package:flutter/material.dart';
 import 'package:flutter/material.dart';
 import 'package:photos/core/configuration.dart';
 import 'package:photos/core/configuration.dart';
+import "package:photos/generated/l10n.dart";
 import "package:photos/l10n/l10n.dart";
 import "package:photos/l10n/l10n.dart";
 import 'package:photos/services/user_service.dart';
 import 'package:photos/services/user_service.dart';
 import 'package:photos/ui/common/dynamic_fab.dart';
 import 'package:photos/ui/common/dynamic_fab.dart';
@@ -54,7 +55,7 @@ class _LoginPageState extends State<LoginPage> {
       floatingActionButton: DynamicFAB(
       floatingActionButton: DynamicFAB(
         isKeypadOpen: isKeypadOpen,
         isKeypadOpen: isKeypadOpen,
         isFormValid: _emailIsValid,
         isFormValid: _emailIsValid,
-        buttonText: 'Log in',
+        buttonText: S.of(context).logInLabel,
         onPressedFunction: () {
         onPressedFunction: () {
           UserService.instance.setEmail(_email!);
           UserService.instance.setEmail(_email!);
           UserService.instance
           UserService.instance
@@ -148,11 +149,12 @@ class _LoginPageState extends State<LoginPage> {
                                 .subtitle1!
                                 .subtitle1!
                                 .copyWith(fontSize: 12),
                                 .copyWith(fontSize: 12),
                             children: [
                             children: [
-                              const TextSpan(
-                                text: "By clicking log in, I agree to the ",
+                              TextSpan(
+                                text: S.of(context).byClickingLogInIAgreeToThe +
+                                    " ",
                               ),
                               ),
                               TextSpan(
                               TextSpan(
-                                text: "terms of service",
+                                text: S.of(context).termsOfService,
                                 style: const TextStyle(
                                 style: const TextStyle(
                                   decoration: TextDecoration.underline,
                                   decoration: TextDecoration.underline,
                                 ),
                                 ),
@@ -161,8 +163,8 @@ class _LoginPageState extends State<LoginPage> {
                                     Navigator.of(context).push(
                                     Navigator.of(context).push(
                                       MaterialPageRoute(
                                       MaterialPageRoute(
                                         builder: (BuildContext context) {
                                         builder: (BuildContext context) {
-                                          return const WebPage(
-                                            "terms",
+                                          return WebPage(
+                                            S.of(context).termsOfServicesTitle,
                                             "https://ente.io/terms",
                                             "https://ente.io/terms",
                                           );
                                           );
                                         },
                                         },
@@ -170,9 +172,9 @@ class _LoginPageState extends State<LoginPage> {
                                     );
                                     );
                                   },
                                   },
                               ),
                               ),
-                              const TextSpan(text: " and "),
+                              TextSpan(text: " ${S.of(context).and} "),
                               TextSpan(
                               TextSpan(
-                                text: "privacy policy",
+                                text: S.of(context).privacyPolicy,
                                 style: const TextStyle(
                                 style: const TextStyle(
                                   decoration: TextDecoration.underline,
                                   decoration: TextDecoration.underline,
                                 ),
                                 ),
@@ -181,8 +183,8 @@ class _LoginPageState extends State<LoginPage> {
                                     Navigator.of(context).push(
                                     Navigator.of(context).push(
                                       MaterialPageRoute(
                                       MaterialPageRoute(
                                         builder: (BuildContext context) {
                                         builder: (BuildContext context) {
-                                          return const WebPage(
-                                            "privacy",
+                                          return WebPage(
+                                            S.of(context).privacyPolicyTitle,
                                             "https://ente.io/privacy",
                                             "https://ente.io/privacy",
                                           );
                                           );
                                         },
                                         },