PurchaseScreen: Make all strings translatable

This commit is contained in:
Vishesh Handa
2020-09-01 10:48:05 +02:00
parent 588f1db263
commit 4596e11ab4
3 changed files with 15 additions and 10 deletions

View File

@ -252,8 +252,14 @@ feature_timeline:
purchase_screen:
title: Pro Version
desc: 'GitJournal is completely free software/open source and is the result of significant development work. It has no venture capital or corporation backing and it never will. Your support directly sustains development and make GitJournal possible.
desc: 'GitJournal is completely free software/open source and is the result of significant development work. It has no venture capital or corporation backing and it never will. Your support directly sustains development.
GitJournal operates on a "pay what you want model (with a minimum)".'
restore: Restore Purchase
oneTime:
title: One Time Purchase
desc: Permanently enables all Pro features currently in GitJournal and new features added in the following 12 months.
monthly:
title: Monthly Subscription
desc: Enables all Pro Features. After 12 months or after paying {minYearlyPurchase}, you will get all the benefits of the 'One Time Purchase'

View File

@ -110,8 +110,7 @@ class MonthlyRentalWidget extends StatelessWidget {
return PurchaseCard(
child: Column(
children: [
// TODO: Translate this
Text("Monthly Subscription", style: textTheme.headline5),
Text(tr('purchase_screen.monthly.title'), style: textTheme.headline5),
const SizedBox(height: 32.0),
PurchaseWidget(
skus: _generateSkus(),
@ -120,8 +119,10 @@ class MonthlyRentalWidget extends StatelessWidget {
isSubscription: true,
),
const SizedBox(height: 32.0),
Text(
"Enables all Pro Features. After 12 months or after paying $minYearlyPurchase, you will get all the benefits of the 'One Time Purchase'"),
Text(tr(
"purchase_screen.monthly.desc",
namedArgs: {'minYearlyPurchase': minYearlyPurchase},
)),
],
mainAxisAlignment: MainAxisAlignment.start,
),
@ -152,18 +153,16 @@ class YearlyPurchaseWidget extends StatelessWidget {
return PurchaseCard(
child: Column(
children: [
Text("One Time Purchase", style: textTheme.headline5),
Text(tr('purchase_screen.oneTime.title'), style: textTheme.headline5),
const SizedBox(height: 32.0),
PurchaseWidget(
skus: _generateSkus(),
defaultSku: "sku_yearly_1",
timePeriod: "Year",
isSubscription: false,
minPurchaseOptionCallback: minPurchaseOptionCallback,
),
const SizedBox(height: 32.0),
const Text(
"Permanently enable all Pro features currently in GitJournal and new features added in the following 12 months."),
Text(tr('purchase_screen.oneTime.desc')),
],
mainAxisAlignment: MainAxisAlignment.start,
),

View File

@ -60,7 +60,7 @@ class PurchaseWidget extends StatefulWidget {
PurchaseWidget({
@required this.skus,
@required this.defaultSku,
@required this.timePeriod,
this.timePeriod = "",
@required this.isSubscription,
this.minPurchaseOptionCallback,
});