浏览代码

l10n: extract strings for family plan

Neeraj Gupta 2 年之前
父节点
当前提交
4ceaa4dd2e
共有 4 个文件被更改,包括 32 次插入10 次删除
  1. 3 0
      lib/generated/intl/messages_en.dart
  2. 20 0
      lib/generated/l10n.dart
  3. 3 1
      lib/l10n/intl_en.arb
  4. 6 9
      lib/services/billing_service.dart

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

@@ -586,6 +586,9 @@ class MessageLookup extends MessageLookupByLibrary {
             MessageLookupByLibrary.simpleMessage("Failed to renew"),
             MessageLookupByLibrary.simpleMessage("Failed to renew"),
         "failedToVerifyPaymentStatus": MessageLookupByLibrary.simpleMessage(
         "failedToVerifyPaymentStatus": MessageLookupByLibrary.simpleMessage(
             "Failed to verify payment status"),
             "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"),
         "familyPlans": MessageLookupByLibrary.simpleMessage("Family plans"),
         "faq": MessageLookupByLibrary.simpleMessage("FAQ"),
         "faq": MessageLookupByLibrary.simpleMessage("FAQ"),
         "faqs": MessageLookupByLibrary.simpleMessage("FAQs"),
         "faqs": MessageLookupByLibrary.simpleMessage("FAQs"),

+ 20 - 0
lib/generated/l10n.dart

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

+ 3 - 1
lib/l10n/intl_en.arb

@@ -971,5 +971,7 @@
   "@setLabel": {
   "@setLabel": {
     "description": "Label of confirm button to add a new custom radius to the radius selector of a location tag"
     "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:logging/logging.dart';
 import 'package:photos/core/errors.dart';
 import 'package:photos/core/errors.dart';
 import 'package:photos/core/network/network.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/billing_plan.dart';
 import 'package:photos/models/subscription.dart';
 import 'package:photos/models/subscription.dart';
 import 'package:photos/models/user_details.dart';
 import 'package:photos/models/user_details.dart';
@@ -168,17 +169,13 @@ class BillingService {
     if (userDetails.subscription.productID == freeProductID) {
     if (userDetails.subscription.productID == freeProductID) {
       await showErrorDialog(
       await showErrorDialog(
         context,
         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;
       return;
     }
     }
-    final dialog =
-        createProgressDialog(context, "Please wait...", isDismissible: true);
+    final dialog = createProgressDialog(context, S.of(context).pleaseWait,
+        isDismissible: true);
     await dialog.show();
     await dialog.show();
     try {
     try {
       final String jwtToken = await UserService.instance.getFamiliesToken();
       final String jwtToken = await UserService.instance.getFamiliesToken();
@@ -187,7 +184,7 @@ class BillingService {
         MaterialPageRoute(
         MaterialPageRoute(
           builder: (BuildContext context) {
           builder: (BuildContext context) {
             return WebPage(
             return WebPage(
-              "Family",
+              S.of(context).familyPlanPortalTitle,
               '$kFamilyPlanManagementUrl?token=$jwtToken&isFamilyCreated=$familyExist',
               '$kFamilyPlanManagementUrl?token=$jwtToken&isFamilyCreated=$familyExist',
             );
             );
           },
           },