Ver código fonte

l10n: extract strings for family plan

Neeraj Gupta 2 anos atrás
pai
commit
4ceaa4dd2e

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

@@ -586,6 +586,9 @@ class MessageLookup extends MessageLookupByLibrary {
             MessageLookupByLibrary.simpleMessage("Failed to renew"),
         "failedToVerifyPaymentStatus": MessageLookupByLibrary.simpleMessage(
             "Failed to verify payment status"),
+        "familyPlanOverview": MessageLookupByLibrary.simpleMessage(
+            "Add 5 family members to your existing plan without paying extra.\n\nEach member gets their own private space, and cannot see each other\'s files unless they\'re shared.\n\nFamily plans are available to customers who have a paid ente subscription.\n\nSubscribe now to get started!"),
+        "familyPlanPortalTitle": MessageLookupByLibrary.simpleMessage("Family"),
         "familyPlans": MessageLookupByLibrary.simpleMessage("Family plans"),
         "faq": MessageLookupByLibrary.simpleMessage("FAQ"),
         "faqs": MessageLookupByLibrary.simpleMessage("FAQs"),

+ 20 - 0
lib/generated/l10n.dart

@@ -6945,6 +6945,26 @@ class S {
       args: [],
     );
   }
+
+  /// `Family`
+  String get familyPlanPortalTitle {
+    return Intl.message(
+      'Family',
+      name: 'familyPlanPortalTitle',
+      desc: '',
+      args: [],
+    );
+  }
+
+  /// `Add 5 family members to your existing plan without paying extra.\n\nEach member gets their own private space, and cannot see each other's files unless they're shared.\n\nFamily plans are available to customers who have a paid ente subscription.\n\nSubscribe now to get started!`
+  String get familyPlanOverview {
+    return Intl.message(
+      'Add 5 family members to your existing plan without paying extra.\n\nEach member gets their own private space, and cannot see each other\'s files unless they\'re shared.\n\nFamily plans are available to customers who have a paid ente subscription.\n\nSubscribe now to get started!',
+      name: 'familyPlanOverview',
+      desc: '',
+      args: [],
+    );
+  }
 }
 
 class AppLocalizationDelegate extends LocalizationsDelegate<S> {

+ 3 - 1
lib/l10n/intl_en.arb

@@ -971,5 +971,7 @@
   "@setLabel": {
     "description": "Label of confirm button to add a new custom radius to the radius selector of a location tag"
   },
-  "setRadius": "Set radius"
+  "setRadius": "Set radius",
+  "familyPlanPortalTitle": "Family",
+  "familyPlanOverview": "Add 5 family members to your existing plan without paying extra.\n\nEach member gets their own private space, and cannot see each other's files unless they're shared.\n\nFamily plans are available to customers who have a paid ente subscription.\n\nSubscribe now to get started!"
 }

+ 6 - 9
lib/services/billing_service.dart

@@ -8,6 +8,7 @@ import 'package:in_app_purchase/in_app_purchase.dart';
 import 'package:logging/logging.dart';
 import 'package:photos/core/errors.dart';
 import 'package:photos/core/network/network.dart';
+import "package:photos/generated/l10n.dart";
 import 'package:photos/models/billing_plan.dart';
 import 'package:photos/models/subscription.dart';
 import 'package:photos/models/user_details.dart';
@@ -168,17 +169,13 @@ class BillingService {
     if (userDetails.subscription.productID == freeProductID) {
       await showErrorDialog(
         context,
-        "Family plans",
-        "Add 5 family members to your existing plan without paying extra.\n"
-            "\nEach member gets their own private space, and cannot see each "
-            "other's files unless they're shared.\n\nFamily plans are "
-            "available to customers who have a paid ente subscription.\n\n"
-            "Subscribe now to get started!",
+        S.of(context).familyPlans,
+        S.of(context).familyPlanOverview,
       );
       return;
     }
-    final dialog =
-        createProgressDialog(context, "Please wait...", isDismissible: true);
+    final dialog = createProgressDialog(context, S.of(context).pleaseWait,
+        isDismissible: true);
     await dialog.show();
     try {
       final String jwtToken = await UserService.instance.getFamiliesToken();
@@ -187,7 +184,7 @@ class BillingService {
         MaterialPageRoute(
           builder: (BuildContext context) {
             return WebPage(
-              "Family",
+              S.of(context).familyPlanPortalTitle,
               '$kFamilyPlanManagementUrl?token=$jwtToken&isFamilyCreated=$familyExist',
             );
           },