浏览代码

l10n: use Styled text

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

+ 0 - 2
lib/generated/intl/messages_de.dart

@@ -780,8 +780,6 @@ class MessageLookup extends MessageLookupByLibrary {
         "weakStrength": MessageLookupByLibrary.simpleMessage("Schwach"),
         "welcomeBack":
             MessageLookupByLibrary.simpleMessage("Willkommen zurück!"),
-        "weveSentAMailTo": MessageLookupByLibrary.simpleMessage(
-            "Wir haben eine E-Mail geschickt an"),
         "yearly": MessageLookupByLibrary.simpleMessage("Jährlich"),
         "yearsAgo": m35,
         "yes": MessageLookupByLibrary.simpleMessage("Ja"),

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

@@ -170,6 +170,8 @@ class MessageLookup extends MessageLookupByLibrary {
 
   static String m34(email) => "Verify ${email}";
 
+  static String m57(email) => "We have sent a mail to <green>${email}</green>";
+
   static String m35(count) =>
       "${Intl.plural(count, one: '${count} year ago', other: '${count} years ago')}";
 
@@ -1190,10 +1192,9 @@ class MessageLookup extends MessageLookupByLibrary {
         "weDontSupportEditingPhotosAndAlbumsThatYouDont":
             MessageLookupByLibrary.simpleMessage(
                 "We don\'t support editing photos and albums that you don\'t own yet"),
+        "weHaveSendEmailTo": m57,
         "weakStrength": MessageLookupByLibrary.simpleMessage("Weak"),
         "welcomeBack": MessageLookupByLibrary.simpleMessage("Welcome back!"),
-        "weveSentAMailTo":
-            MessageLookupByLibrary.simpleMessage("We\'ve sent a mail to"),
         "yearly": MessageLookupByLibrary.simpleMessage("Yearly"),
         "yearsAgo": m35,
         "yes": MessageLookupByLibrary.simpleMessage("Yes"),

+ 0 - 2
lib/generated/intl/messages_es.dart

@@ -532,8 +532,6 @@ class MessageLookup extends MessageLookupByLibrary {
         "weakStrength": MessageLookupByLibrary.simpleMessage("Poco segura"),
         "welcomeBack":
             MessageLookupByLibrary.simpleMessage("¡Bienvenido de nuevo!"),
-        "weveSentAMailTo": MessageLookupByLibrary.simpleMessage(
-            "Enviamos un correo electrónico a"),
         "yesConvertToViewer":
             MessageLookupByLibrary.simpleMessage("Sí, convertir a espectador"),
         "yesDelete": MessageLookupByLibrary.simpleMessage("Sí, eliminar"),

+ 0 - 2
lib/generated/intl/messages_fr.dart

@@ -1010,8 +1010,6 @@ class MessageLookup extends MessageLookupByLibrary {
                 "Nous ne prenons pas en charge l\'édition des photos et des albums que vous ne possédez pas encore"),
         "weakStrength": MessageLookupByLibrary.simpleMessage("Faible"),
         "welcomeBack": MessageLookupByLibrary.simpleMessage("Bienvenue !"),
-        "weveSentAMailTo": MessageLookupByLibrary.simpleMessage(
-            "Nous avons envoyé un email à"),
         "yearly": MessageLookupByLibrary.simpleMessage("Annuel"),
         "yearsAgo": m35,
         "yes": MessageLookupByLibrary.simpleMessage("Oui"),

+ 0 - 2
lib/generated/intl/messages_nl.dart

@@ -614,8 +614,6 @@ class MessageLookup extends MessageLookupByLibrary {
             MessageLookupByLibrary.simpleMessage("We zijn open source!"),
         "weakStrength": MessageLookupByLibrary.simpleMessage("Zwak"),
         "welcomeBack": MessageLookupByLibrary.simpleMessage("Welkom terug!"),
-        "weveSentAMailTo": MessageLookupByLibrary.simpleMessage(
-            "We hebben een e-mail gestuurd naar"),
         "yearsAgo": m35,
         "yesConvertToViewer":
             MessageLookupByLibrary.simpleMessage("Ja, converteren naar viewer"),

+ 0 - 2
lib/generated/intl/messages_pl.dart

@@ -176,8 +176,6 @@ class MessageLookup extends MessageLookupByLibrary {
             MessageLookupByLibrary.simpleMessage("Zweryfikuj hasło"),
         "weakStrength": MessageLookupByLibrary.simpleMessage("Słabe"),
         "welcomeBack": MessageLookupByLibrary.simpleMessage("Witaj ponownie!"),
-        "weveSentAMailTo": MessageLookupByLibrary.simpleMessage(
-            "E-mail został wysłany na adres"),
         "yourAccountHasBeenDeleted":
             MessageLookupByLibrary.simpleMessage("Twoje konto zostało usunięte")
       };

+ 0 - 1
lib/generated/intl/messages_zh.dart

@@ -161,7 +161,6 @@ class MessageLookup extends MessageLookupByLibrary {
         "verifyEmail": MessageLookupByLibrary.simpleMessage("验证电子邮件"),
         "weakStrength": MessageLookupByLibrary.simpleMessage("弱"),
         "welcomeBack": MessageLookupByLibrary.simpleMessage("欢迎回来!"),
-        "weveSentAMailTo": MessageLookupByLibrary.simpleMessage("我们已经发送一封邮件到"),
         "yesConvertToViewer": MessageLookupByLibrary.simpleMessage("是的,转换为查看者"),
         "yourAccountHasBeenDeleted":
             MessageLookupByLibrary.simpleMessage("您的账户已删除")

+ 6 - 6
lib/generated/l10n.dart

@@ -570,13 +570,13 @@ class S {
     );
   }
 
-  /// `We've sent a mail to`
-  String get weveSentAMailTo {
+  /// `We have sent a mail to <green>{email}</green>`
+  String weHaveSendEmailTo(String email) {
     return Intl.message(
-      'We\'ve sent a mail to',
-      name: 'weveSentAMailTo',
-      desc: '',
-      args: [],
+      'We have sent a mail to <green>$email</green>',
+      name: 'weHaveSendEmailTo',
+      desc: 'Text to indicate that we have sent a mail to the user',
+      args: [email],
     );
   }
 

+ 11 - 1
lib/l10n/intl_en.arb

@@ -51,7 +51,17 @@
   "checkInboxAndSpamFolder": "Please check your inbox (and spam) to complete verification",
   "tapToEnterCode": "Tap to enter code",
   "resendEmail": "Resend email",
-  "weveSentAMailTo": "We've sent a mail to",
+  "weHaveSendEmailTo": "We have sent a mail to <green>{email}</green>",
+  "@weHaveSendEmailTo": {
+    "description": "Text to indicate that we have sent a mail to the user",
+    "placeholders": {
+      "email": {
+        "description": "The email address of the user",
+        "type": "String",
+        "example": "example@ente.io"
+      }
+    }
+  },
   "setPasswordTitle": "Set password",
   "changePasswordTitle": "Change password",
   "resetPasswordTitle": "Reset password",

+ 16 - 18
lib/ui/account/ott_verification_page.dart

@@ -4,6 +4,7 @@ import "package:photos/generated/l10n.dart";
 import 'package:photos/services/user_service.dart';
 import 'package:photos/ui/common/dynamic_fab.dart';
 import 'package:step_progress_indicator/step_progress_indicator.dart';
+import "package:styled_text/styled_text.dart";
 
 class OTTVerificationPage extends StatefulWidget {
   final String email;
@@ -108,24 +109,21 @@ class _OTTVerificationPageState extends State<OTTVerificationPage> {
                       children: [
                         Padding(
                           padding: const EdgeInsets.fromLTRB(0, 0, 0, 12),
-                          child: RichText(
-                            text: TextSpan(
-                              style: Theme.of(context)
-                                  .textTheme
-                                  .subtitle1!
-                                  .copyWith(fontSize: 14),
-                              children: [
-                                TextSpan(text: S.of(context).weveSentAMailTo),
-                                TextSpan(
-                                  text: widget.email,
-                                  style: TextStyle(
-                                    color: Theme.of(context)
-                                        .colorScheme
-                                        .greenAlternative,
-                                  ),
-                                )
-                              ],
-                            ),
+                          child: StyledText(
+                            text: S.of(context).weHaveSendEmailTo(widget.email),
+                            style: Theme.of(context)
+                                .textTheme
+                                .subtitle1!
+                                .copyWith(fontSize: 14),
+                            tags: {
+                              'green': StyledTextTag(
+                                style: TextStyle(
+                                  color: Theme.of(context)
+                                      .colorScheme
+                                      .greenAlternative,
+                                ),
+                              ),
+                            },
                           ),
                         ),
                         Text(