Browse Source

l10n: extract HeaderErrorWidget strings

Neeraj Gupta 2 years ago
parent
commit
3a766d3e68

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

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

+ 60 - 0
lib/generated/l10n.dart

@@ -4562,6 +4562,66 @@ class S {
       args: [],
       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> {
 class AppLocalizationDelegate extends LocalizationsDelegate<S> {

+ 7 - 1
lib/l10n/intl_en.arb

@@ -657,5 +657,11 @@
   "mobileWebDesktop": "Mobile, Web, Desktop",
   "mobileWebDesktop": "Mobile, Web, Desktop",
   "newToEnte": "New to ente",
   "newToEnte": "New to ente",
   "pleaseLoginAgain": "Please login again",
   "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:flutter/material.dart';
 import 'package:photos/core/errors.dart';
 import 'package:photos/core/errors.dart';
 import 'package:photos/ente_theme_data.dart';
 import 'package:photos/ente_theme_data.dart';
+import "package:photos/generated/l10n.dart";
 import 'package:photos/ui/payment/subscription.dart';
 import 'package:photos/ui/payment/subscription.dart';
 import 'package:photos/utils/email_util.dart';
 import 'package:photos/utils/email_util.dart';
 
 
@@ -21,13 +22,13 @@ class HeaderErrorWidget extends StatelessWidget {
             Row(
             Row(
               mainAxisAlignment: MainAxisAlignment.center,
               mainAxisAlignment: MainAxisAlignment.center,
               crossAxisAlignment: CrossAxisAlignment.center,
               crossAxisAlignment: CrossAxisAlignment.center,
-              children: const [
-                Icon(
+              children: [
+                const Icon(
                   Icons.error_outline,
                   Icons.error_outline,
                   color: Colors.orange,
                   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)),
             const Padding(padding: EdgeInsets.all(8)),
@@ -36,7 +37,7 @@ class HeaderErrorWidget extends StatelessWidget {
               height: 52,
               height: 52,
               padding: const EdgeInsets.fromLTRB(80, 0, 80, 0),
               padding: const EdgeInsets.fromLTRB(80, 0, 80, 0),
               child: OutlinedButton(
               child: OutlinedButton(
-                child: const Text("Subscribe"),
+                child: Text(S.of(context).subscribe),
                 onPressed: () {
                 onPressed: () {
                   Navigator.of(context).push(
                   Navigator.of(context).push(
                     MaterialPageRoute(
                     MaterialPageRoute(
@@ -60,13 +61,13 @@ class HeaderErrorWidget extends StatelessWidget {
             Row(
             Row(
               mainAxisAlignment: MainAxisAlignment.center,
               mainAxisAlignment: MainAxisAlignment.center,
               crossAxisAlignment: CrossAxisAlignment.center,
               crossAxisAlignment: CrossAxisAlignment.center,
-              children: const [
-                Icon(
+              children: [
+                const Icon(
                   Icons.error_outline,
                   Icons.error_outline,
                   color: Colors.orange,
                   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)),
             const Padding(padding: EdgeInsets.all(8)),
@@ -75,9 +76,9 @@ class HeaderErrorWidget extends StatelessWidget {
               height: 52,
               height: 52,
               padding: const EdgeInsets.fromLTRB(80, 0, 80, 0),
               padding: const EdgeInsets.fromLTRB(80, 0, 80, 0),
               child: OutlinedButton(
               child: OutlinedButton(
-                child: const Text(
-                  "Upgrade",
-                  style: TextStyle(height: 1.1),
+                child: Text(
+                  S.of(context).upgrade,
+                  style: const TextStyle(height: 1.1),
                 ),
                 ),
                 onPressed: () {
                 onPressed: () {
                   Navigator.of(context).push(
                   Navigator.of(context).push(
@@ -104,8 +105,8 @@ class HeaderErrorWidget extends StatelessWidget {
               color: Colors.red[400],
               color: Colors.red[400],
             ),
             ),
             const Padding(padding: EdgeInsets.all(4)),
             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),
               style: TextStyle(height: 1.4),
               textAlign: TextAlign.center,
               textAlign: TextAlign.center,
             ),
             ),
@@ -125,7 +126,7 @@ class HeaderErrorWidget extends StatelessWidget {
                   ),
                   ),
                 ),
                 ),
                 child: Text(
                 child: Text(
-                  "Raise ticket",
+                  S.of(context).raiseTicket,
                   style: TextStyle(
                   style: TextStyle(
                     fontWeight: FontWeight.bold,
                     fontWeight: FontWeight.bold,
                     fontSize: 14,
                     fontSize: 14,
@@ -136,9 +137,9 @@ class HeaderErrorWidget extends StatelessWidget {
                 onPressed: () {
                 onPressed: () {
                   sendLogs(
                   sendLogs(
                     context,
                     context,
-                    "Raise ticket",
+                    S.of(context).raiseTicket,
                     "support@ente.io",
                     "support@ente.io",
-                    subject: "Backup failed",
+                    subject: S.of(context).backupFailed,
                   );
                   );
                 },
                 },
               ),
               ),