Przeglądaj źródła

l10n: extract HeaderErrorWidget strings

Neeraj Gupta 2 lat temu
rodzic
commit
3a766d3e68

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

@@ -218,6 +218,7 @@ class MessageLookup extends MessageLookupByLibrary {
         "backedUpFolders":
             MessageLookupByLibrary.simpleMessage("Backed up folders"),
         "backup": MessageLookupByLibrary.simpleMessage("Backup"),
+        "backupFailed": MessageLookupByLibrary.simpleMessage("Backup failed"),
         "backupOverMobileData":
             MessageLookupByLibrary.simpleMessage("Backup over mobile data"),
         "backupSettings":
@@ -294,6 +295,8 @@ class MessageLookup extends MessageLookupByLibrary {
         "copypasteThisCodentoYourAuthenticatorApp":
             MessageLookupByLibrary.simpleMessage(
                 "Copy-paste this code\nto your authenticator app"),
+        "couldNotBackUpTryLater": MessageLookupByLibrary.simpleMessage(
+            "We could not backup your data.\nWe will retry later."),
         "couldNotUpdateSubscription": MessageLookupByLibrary.simpleMessage(
             "Could not update subscription"),
         "createAccount": MessageLookupByLibrary.simpleMessage("Create account"),
@@ -576,6 +579,7 @@ class MessageLookup extends MessageLookupByLibrary {
             MessageLookupByLibrary.simpleMessage("Private backups"),
         "publicLinkEnabled":
             MessageLookupByLibrary.simpleMessage("Public link enabled"),
+        "raiseTicket": MessageLookupByLibrary.simpleMessage("Raise ticket"),
         "rateTheApp": MessageLookupByLibrary.simpleMessage("Rate the app"),
         "rateUs": MessageLookupByLibrary.simpleMessage("Rate us"),
         "rateUsOnStore": m17,
@@ -709,6 +713,8 @@ class MessageLookup extends MessageLookupByLibrary {
         "sparkleSuccess": MessageLookupByLibrary.simpleMessage("✨ Success"),
         "startBackup": MessageLookupByLibrary.simpleMessage("Start backup"),
         "storageInGB": m30,
+        "storageLimitExceeded":
+            MessageLookupByLibrary.simpleMessage("Storage limit exceeded"),
         "strongStrength": MessageLookupByLibrary.simpleMessage("Strong"),
         "subAlreadyLinkedErrMessage": m31,
         "subWillBeCancelledOn": m32,
@@ -770,6 +776,7 @@ class MessageLookup extends MessageLookupByLibrary {
             MessageLookupByLibrary.simpleMessage("Update available"),
         "updatingFolderSelection": MessageLookupByLibrary.simpleMessage(
             "Updating folder selection..."),
+        "upgrade": MessageLookupByLibrary.simpleMessage("Upgrade"),
         "usableReferralStorageInfo": MessageLookupByLibrary.simpleMessage(
             "Usable storage is limited by your current plan. Excess claimed storage will automatically become usable when you upgrade your plan."),
         "useRecoveryKey":
@@ -831,6 +838,8 @@ class MessageLookup extends MessageLookupByLibrary {
         "yourStorageDetailsCouldNotBeFetched":
             MessageLookupByLibrary.simpleMessage(
                 "Your storage details could not be fetched"),
+        "yourSubscriptionHasExpired": MessageLookupByLibrary.simpleMessage(
+            "Your subscription has expired"),
         "yourSubscriptionWasUpdatedSuccessfully":
             MessageLookupByLibrary.simpleMessage(
                 "Your subscription was updated successfully"),

+ 60 - 0
lib/generated/l10n.dart

@@ -4562,6 +4562,66 @@ class S {
       args: [],
     );
   }
+
+  /// `Your subscription has expired`
+  String get yourSubscriptionHasExpired {
+    return Intl.message(
+      'Your subscription has expired',
+      name: 'yourSubscriptionHasExpired',
+      desc: '',
+      args: [],
+    );
+  }
+
+  /// `Storage limit exceeded`
+  String get storageLimitExceeded {
+    return Intl.message(
+      'Storage limit exceeded',
+      name: 'storageLimitExceeded',
+      desc: '',
+      args: [],
+    );
+  }
+
+  /// `Upgrade`
+  String get upgrade {
+    return Intl.message(
+      'Upgrade',
+      name: 'upgrade',
+      desc: '',
+      args: [],
+    );
+  }
+
+  /// `Raise ticket`
+  String get raiseTicket {
+    return Intl.message(
+      'Raise ticket',
+      name: 'raiseTicket',
+      desc: '',
+      args: [],
+    );
+  }
+
+  /// `Backup failed`
+  String get backupFailed {
+    return Intl.message(
+      'Backup failed',
+      name: 'backupFailed',
+      desc: '',
+      args: [],
+    );
+  }
+
+  /// `We could not backup your data.\nWe will retry later.`
+  String get couldNotBackUpTryLater {
+    return Intl.message(
+      'We could not backup your data.\nWe will retry later.',
+      name: 'couldNotBackUpTryLater',
+      desc: '',
+      args: [],
+    );
+  }
 }
 
 class AppLocalizationDelegate extends LocalizationsDelegate<S> {

+ 7 - 1
lib/l10n/intl_en.arb

@@ -657,5 +657,11 @@
   "mobileWebDesktop": "Mobile, Web, Desktop",
   "newToEnte": "New to ente",
   "pleaseLoginAgain": "Please login again",
-  "devAccountChanged": "The developer account we use to publish ente on App Store has changed. Because of this, you will need to login again.\n\nOur apologies for the inconvenience, but this was unavoidable."
+  "devAccountChanged": "The developer account we use to publish ente on App Store has changed. Because of this, you will need to login again.\n\nOur apologies for the inconvenience, but this was unavoidable.",
+  "yourSubscriptionHasExpired": "Your subscription has expired",
+  "storageLimitExceeded": "Storage limit exceeded",
+  "upgrade": "Upgrade",
+  "raiseTicket": "Raise ticket",
+  "backupFailed": "Backup failed",
+  "couldNotBackUpTryLater": "We could not backup your data.\nWe will retry later."
 }

+ 18 - 17
lib/ui/home/header_error_widget.dart

@@ -1,6 +1,7 @@
 import 'package:flutter/material.dart';
 import 'package:photos/core/errors.dart';
 import 'package:photos/ente_theme_data.dart';
+import "package:photos/generated/l10n.dart";
 import 'package:photos/ui/payment/subscription.dart';
 import 'package:photos/utils/email_util.dart';
 
@@ -21,13 +22,13 @@ class HeaderErrorWidget extends StatelessWidget {
             Row(
               mainAxisAlignment: MainAxisAlignment.center,
               crossAxisAlignment: CrossAxisAlignment.center,
-              children: const [
-                Icon(
+              children: [
+                const Icon(
                   Icons.error_outline,
                   color: Colors.orange,
                 ),
-                Padding(padding: EdgeInsets.all(4)),
-                Text("Your subscription has expired"),
+                const Padding(padding: EdgeInsets.all(4)),
+                Text(S.of(context).yourSubscriptionHasExpired),
               ],
             ),
             const Padding(padding: EdgeInsets.all(8)),
@@ -36,7 +37,7 @@ class HeaderErrorWidget extends StatelessWidget {
               height: 52,
               padding: const EdgeInsets.fromLTRB(80, 0, 80, 0),
               child: OutlinedButton(
-                child: const Text("Subscribe"),
+                child: Text(S.of(context).subscribe),
                 onPressed: () {
                   Navigator.of(context).push(
                     MaterialPageRoute(
@@ -60,13 +61,13 @@ class HeaderErrorWidget extends StatelessWidget {
             Row(
               mainAxisAlignment: MainAxisAlignment.center,
               crossAxisAlignment: CrossAxisAlignment.center,
-              children: const [
-                Icon(
+              children: [
+                const Icon(
                   Icons.error_outline,
                   color: Colors.orange,
                 ),
-                Padding(padding: EdgeInsets.all(4)),
-                Text("Storage limit exceeded"),
+                const Padding(padding: EdgeInsets.all(4)),
+                Text(S.of(context).storageLimitExceeded),
               ],
             ),
             const Padding(padding: EdgeInsets.all(8)),
@@ -75,9 +76,9 @@ class HeaderErrorWidget extends StatelessWidget {
               height: 52,
               padding: const EdgeInsets.fromLTRB(80, 0, 80, 0),
               child: OutlinedButton(
-                child: const Text(
-                  "Upgrade",
-                  style: TextStyle(height: 1.1),
+                child: Text(
+                  S.of(context).upgrade,
+                  style: const TextStyle(height: 1.1),
                 ),
                 onPressed: () {
                   Navigator.of(context).push(
@@ -104,8 +105,8 @@ class HeaderErrorWidget extends StatelessWidget {
               color: Colors.red[400],
             ),
             const Padding(padding: EdgeInsets.all(4)),
-            const Text(
-              "We could not backup your data.\nWe will retry later.",
+            Text(
+              S.of(context).couldNotBackUpTryLater,
               style: TextStyle(height: 1.4),
               textAlign: TextAlign.center,
             ),
@@ -125,7 +126,7 @@ class HeaderErrorWidget extends StatelessWidget {
                   ),
                 ),
                 child: Text(
-                  "Raise ticket",
+                  S.of(context).raiseTicket,
                   style: TextStyle(
                     fontWeight: FontWeight.bold,
                     fontSize: 14,
@@ -136,9 +137,9 @@ class HeaderErrorWidget extends StatelessWidget {
                 onPressed: () {
                   sendLogs(
                     context,
-                    "Raise ticket",
+                    S.of(context).raiseTicket,
                     "support@ente.io",
-                    subject: "Backup failed",
+                    subject: S.of(context).backupFailed,
                   );
                 },
               ),