l10n: extract usableReferralStorageInfo strings
This commit is contained in:
parent
ab09e70928
commit
2b5e8cefd6
|
@ -123,6 +123,8 @@ class MessageLookup extends MessageLookupByLibrary {
|
||||||
MessageLookupByLibrary.simpleMessage("Code applied"),
|
MessageLookupByLibrary.simpleMessage("Code applied"),
|
||||||
"codeCopiedToClipboard":
|
"codeCopiedToClipboard":
|
||||||
MessageLookupByLibrary.simpleMessage("Code copied to clipboard"),
|
MessageLookupByLibrary.simpleMessage("Code copied to clipboard"),
|
||||||
|
"codeUsedByYou":
|
||||||
|
MessageLookupByLibrary.simpleMessage("Code used by you"),
|
||||||
"collabLinkSectionDescription": MessageLookupByLibrary.simpleMessage(
|
"collabLinkSectionDescription": MessageLookupByLibrary.simpleMessage(
|
||||||
"Create a link to allow people to add and view photos in your shared album without needing an ente app or account. Great for collecting event photos."),
|
"Create a link to allow people to add and view photos in your shared album without needing an ente app or account. Great for collecting event photos."),
|
||||||
"collaborativeLink":
|
"collaborativeLink":
|
||||||
|
@ -182,6 +184,7 @@ class MessageLookup extends MessageLookupByLibrary {
|
||||||
"doThisLater": MessageLookupByLibrary.simpleMessage("Do this later"),
|
"doThisLater": MessageLookupByLibrary.simpleMessage("Do this later"),
|
||||||
"done": MessageLookupByLibrary.simpleMessage("Done"),
|
"done": MessageLookupByLibrary.simpleMessage("Done"),
|
||||||
"dropSupportEmail": m2,
|
"dropSupportEmail": m2,
|
||||||
|
"eligible": MessageLookupByLibrary.simpleMessage("eligible"),
|
||||||
"email": MessageLookupByLibrary.simpleMessage("Email"),
|
"email": MessageLookupByLibrary.simpleMessage("Email"),
|
||||||
"emailNoEnteAccount": m3,
|
"emailNoEnteAccount": m3,
|
||||||
"encryption": MessageLookupByLibrary.simpleMessage("Encryption"),
|
"encryption": MessageLookupByLibrary.simpleMessage("Encryption"),
|
||||||
|
@ -221,7 +224,11 @@ class MessageLookup extends MessageLookupByLibrary {
|
||||||
"feedback": MessageLookupByLibrary.simpleMessage("Feedback"),
|
"feedback": MessageLookupByLibrary.simpleMessage("Feedback"),
|
||||||
"forgotPassword":
|
"forgotPassword":
|
||||||
MessageLookupByLibrary.simpleMessage("Forgot password"),
|
MessageLookupByLibrary.simpleMessage("Forgot password"),
|
||||||
|
"freeStorageClaimed":
|
||||||
|
MessageLookupByLibrary.simpleMessage("Free storage claimed"),
|
||||||
"freeStorageOnReferralSuccess": m4,
|
"freeStorageOnReferralSuccess": m4,
|
||||||
|
"freeStorageUsable":
|
||||||
|
MessageLookupByLibrary.simpleMessage("Free storage usable"),
|
||||||
"fromYourRegisteredEmailAddress": MessageLookupByLibrary.simpleMessage(
|
"fromYourRegisteredEmailAddress": MessageLookupByLibrary.simpleMessage(
|
||||||
"from your registered email address."),
|
"from your registered email address."),
|
||||||
"generatingEncryptionKeys": MessageLookupByLibrary.simpleMessage(
|
"generatingEncryptionKeys": MessageLookupByLibrary.simpleMessage(
|
||||||
|
@ -273,6 +280,8 @@ class MessageLookup extends MessageLookupByLibrary {
|
||||||
"Due to the nature of our end-to-end encryption protocol, your data cannot be decrypted without your password or recovery key"),
|
"Due to the nature of our end-to-end encryption protocol, your data cannot be decrypted without your password or recovery key"),
|
||||||
"ok": MessageLookupByLibrary.simpleMessage("Ok"),
|
"ok": MessageLookupByLibrary.simpleMessage("Ok"),
|
||||||
"oops": MessageLookupByLibrary.simpleMessage("Oops"),
|
"oops": MessageLookupByLibrary.simpleMessage("Oops"),
|
||||||
|
"oopsSomethingWentWrong":
|
||||||
|
MessageLookupByLibrary.simpleMessage("Oops, something went wrong"),
|
||||||
"orPickAnExistingOne":
|
"orPickAnExistingOne":
|
||||||
MessageLookupByLibrary.simpleMessage("Or pick an existing one"),
|
MessageLookupByLibrary.simpleMessage("Or pick an existing one"),
|
||||||
"password": MessageLookupByLibrary.simpleMessage("Password"),
|
"password": MessageLookupByLibrary.simpleMessage("Password"),
|
||||||
|
@ -280,6 +289,8 @@ class MessageLookup extends MessageLookupByLibrary {
|
||||||
"Password changed successfully"),
|
"Password changed successfully"),
|
||||||
"passwordLock": MessageLookupByLibrary.simpleMessage("Password lock"),
|
"passwordLock": MessageLookupByLibrary.simpleMessage("Password lock"),
|
||||||
"passwordStrength": m7,
|
"passwordStrength": m7,
|
||||||
|
"peopleUsingYourCode":
|
||||||
|
MessageLookupByLibrary.simpleMessage("People using your code"),
|
||||||
"pleaseSendAnEmailTo":
|
"pleaseSendAnEmailTo":
|
||||||
MessageLookupByLibrary.simpleMessage("Please send an email to"),
|
MessageLookupByLibrary.simpleMessage("Please send an email to"),
|
||||||
"pleaseTryAgain":
|
"pleaseTryAgain":
|
||||||
|
@ -392,11 +403,14 @@ class MessageLookup extends MessageLookupByLibrary {
|
||||||
"This will log you out of the following device:"),
|
"This will log you out of the following device:"),
|
||||||
"thisWillLogYouOutOfThisDevice": MessageLookupByLibrary.simpleMessage(
|
"thisWillLogYouOutOfThisDevice": MessageLookupByLibrary.simpleMessage(
|
||||||
"This will log you out of this device!"),
|
"This will log you out of this device!"),
|
||||||
|
"total": MessageLookupByLibrary.simpleMessage("total"),
|
||||||
"tryAgain": MessageLookupByLibrary.simpleMessage("Try again"),
|
"tryAgain": MessageLookupByLibrary.simpleMessage("Try again"),
|
||||||
"twofactorAuthenticationPageTitle":
|
"twofactorAuthenticationPageTitle":
|
||||||
MessageLookupByLibrary.simpleMessage("Two-factor authentication"),
|
MessageLookupByLibrary.simpleMessage("Two-factor authentication"),
|
||||||
"twofactorSetup":
|
"twofactorSetup":
|
||||||
MessageLookupByLibrary.simpleMessage("Two-factor setup"),
|
MessageLookupByLibrary.simpleMessage("Two-factor setup"),
|
||||||
|
"usableReferralStorageInfo": MessageLookupByLibrary.simpleMessage(
|
||||||
|
"Usable storage is limited by your current plan. Excess claimed storage will automatically become usable when you upgrade your plan."),
|
||||||
"useRecoveryKey":
|
"useRecoveryKey":
|
||||||
MessageLookupByLibrary.simpleMessage("Use recovery key"),
|
MessageLookupByLibrary.simpleMessage("Use recovery key"),
|
||||||
"verificationId":
|
"verificationId":
|
||||||
|
|
|
@ -2285,6 +2285,86 @@ class S {
|
||||||
args: [],
|
args: [],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// `Oops, something went wrong`
|
||||||
|
String get oopsSomethingWentWrong {
|
||||||
|
return Intl.message(
|
||||||
|
'Oops, something went wrong',
|
||||||
|
name: 'oopsSomethingWentWrong',
|
||||||
|
desc: '',
|
||||||
|
args: [],
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// `People using your code`
|
||||||
|
String get peopleUsingYourCode {
|
||||||
|
return Intl.message(
|
||||||
|
'People using your code',
|
||||||
|
name: 'peopleUsingYourCode',
|
||||||
|
desc: '',
|
||||||
|
args: [],
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// `eligible`
|
||||||
|
String get eligible {
|
||||||
|
return Intl.message(
|
||||||
|
'eligible',
|
||||||
|
name: 'eligible',
|
||||||
|
desc: '',
|
||||||
|
args: [],
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// `total`
|
||||||
|
String get total {
|
||||||
|
return Intl.message(
|
||||||
|
'total',
|
||||||
|
name: 'total',
|
||||||
|
desc: '',
|
||||||
|
args: [],
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// `Code used by you`
|
||||||
|
String get codeUsedByYou {
|
||||||
|
return Intl.message(
|
||||||
|
'Code used by you',
|
||||||
|
name: 'codeUsedByYou',
|
||||||
|
desc: '',
|
||||||
|
args: [],
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// `Free storage claimed`
|
||||||
|
String get freeStorageClaimed {
|
||||||
|
return Intl.message(
|
||||||
|
'Free storage claimed',
|
||||||
|
name: 'freeStorageClaimed',
|
||||||
|
desc: '',
|
||||||
|
args: [],
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// `Free storage usable`
|
||||||
|
String get freeStorageUsable {
|
||||||
|
return Intl.message(
|
||||||
|
'Free storage usable',
|
||||||
|
name: 'freeStorageUsable',
|
||||||
|
desc: '',
|
||||||
|
args: [],
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// `Usable storage is limited by your current plan. Excess claimed storage will automatically become usable when you upgrade your plan.`
|
||||||
|
String get usableReferralStorageInfo {
|
||||||
|
return Intl.message(
|
||||||
|
'Usable storage is limited by your current plan. Excess claimed storage will automatically become usable when you upgrade your plan.',
|
||||||
|
name: 'usableReferralStorageInfo',
|
||||||
|
desc: '',
|
||||||
|
args: [],
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class AppLocalizationDelegate extends LocalizationsDelegate<S> {
|
class AppLocalizationDelegate extends LocalizationsDelegate<S> {
|
||||||
|
|
|
@ -319,5 +319,13 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"faq": "FAQ"
|
"faq": "FAQ",
|
||||||
|
"oopsSomethingWentWrong": "Oops, something went wrong",
|
||||||
|
"peopleUsingYourCode": "People using your code",
|
||||||
|
"eligible": "eligible",
|
||||||
|
"total": "total",
|
||||||
|
"codeUsedByYou": "Code used by you",
|
||||||
|
"freeStorageClaimed": "Free storage claimed",
|
||||||
|
"freeStorageUsable": "Free storage usable",
|
||||||
|
"usableReferralStorageInfo": "Usable storage is limited by your current plan. Excess claimed storage will automatically become usable when you upgrade your plan."
|
||||||
}
|
}
|
|
@ -1,6 +1,7 @@
|
||||||
import "dart:math";
|
import "dart:math";
|
||||||
|
|
||||||
import "package:flutter/material.dart";
|
import "package:flutter/material.dart";
|
||||||
|
import "package:photos/generated/l10n.dart";
|
||||||
import "package:photos/models/api/storage_bonus/storage_bonus.dart";
|
import "package:photos/models/api/storage_bonus/storage_bonus.dart";
|
||||||
import "package:photos/models/user_details.dart";
|
import "package:photos/models/user_details.dart";
|
||||||
import "package:photos/services/storage_bonus_service.dart";
|
import "package:photos/services/storage_bonus_service.dart";
|
||||||
|
@ -14,6 +15,7 @@ import "package:photos/utils/data_util.dart";
|
||||||
class StorageDetailsScreen extends StatefulWidget {
|
class StorageDetailsScreen extends StatefulWidget {
|
||||||
final ReferralView referralView;
|
final ReferralView referralView;
|
||||||
final UserDetails userDetails;
|
final UserDetails userDetails;
|
||||||
|
|
||||||
const StorageDetailsScreen(this.referralView, this.userDetails, {super.key});
|
const StorageDetailsScreen(this.referralView, this.userDetails, {super.key});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
@ -37,10 +39,10 @@ class _StorageDetailsScreenState extends State<StorageDetailsScreen> {
|
||||||
primary: false,
|
primary: false,
|
||||||
slivers: <Widget>[
|
slivers: <Widget>[
|
||||||
TitleBarWidget(
|
TitleBarWidget(
|
||||||
flexibleSpaceTitle: const TitleBarTitleWidget(
|
flexibleSpaceTitle: TitleBarTitleWidget(
|
||||||
title: "Claim free storage",
|
title: S.of(context).claimFreeStorage,
|
||||||
),
|
),
|
||||||
flexibleSpaceCaption: "Details",
|
flexibleSpaceCaption: S.of(context).details,
|
||||||
actionIcons: [
|
actionIcons: [
|
||||||
IconButtonWidget(
|
IconButtonWidget(
|
||||||
icon: Icons.close_outlined,
|
icon: Icons.close_outlined,
|
||||||
|
@ -79,7 +81,7 @@ class _StorageDetailsScreenState extends State<StorageDetailsScreen> {
|
||||||
}
|
}
|
||||||
if (snapshot.hasError) {
|
if (snapshot.hasError) {
|
||||||
debugPrint(snapshot.error.toString());
|
debugPrint(snapshot.error.toString());
|
||||||
return const Text("Oops, something went wrong");
|
return Text(S.of(context).oopsSomethingWentWrong);
|
||||||
} else {
|
} else {
|
||||||
final BonusDetails data = snapshot.data!;
|
final BonusDetails data = snapshot.data!;
|
||||||
return Padding(
|
return Padding(
|
||||||
|
@ -89,24 +91,26 @@ class _StorageDetailsScreenState extends State<StorageDetailsScreen> {
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
BonusInfoSection(
|
BonusInfoSection(
|
||||||
sectionName: "People using your code",
|
sectionName:
|
||||||
|
S.of(context).peopleUsingYourCode,
|
||||||
leftValue: data.refUpgradeCount,
|
leftValue: data.refUpgradeCount,
|
||||||
leftUnitName: "eligible",
|
leftUnitName: S.of(context).eligible,
|
||||||
rightValue: data.refUpgradeCount >= 0
|
rightValue: data.refUpgradeCount >= 0
|
||||||
? data.refCount
|
? data.refCount
|
||||||
: null,
|
: null,
|
||||||
rightUnitName: "total",
|
rightUnitName: S.of(context).total,
|
||||||
showUnit: data.refCount > 0,
|
showUnit: data.refCount > 0,
|
||||||
),
|
),
|
||||||
data.hasAppliedCode
|
data.hasAppliedCode
|
||||||
? const BonusInfoSection(
|
? BonusInfoSection(
|
||||||
sectionName: "Code used by you",
|
sectionName:
|
||||||
|
S.of(context).codeUsedByYou,
|
||||||
leftValue: 1,
|
leftValue: 1,
|
||||||
showUnit: false,
|
showUnit: false,
|
||||||
)
|
)
|
||||||
: const SizedBox.shrink(),
|
: const SizedBox.shrink(),
|
||||||
BonusInfoSection(
|
BonusInfoSection(
|
||||||
sectionName: "Free storage claimed",
|
sectionName: S.of(context).freeStorageClaimed,
|
||||||
leftValue: convertBytesToAbsoluteGBs(
|
leftValue: convertBytesToAbsoluteGBs(
|
||||||
widget.referralView.claimedStorage,
|
widget.referralView.claimedStorage,
|
||||||
),
|
),
|
||||||
|
@ -114,7 +118,7 @@ class _StorageDetailsScreenState extends State<StorageDetailsScreen> {
|
||||||
rightValue: null,
|
rightValue: null,
|
||||||
),
|
),
|
||||||
BonusInfoSection(
|
BonusInfoSection(
|
||||||
sectionName: "Free storage usable",
|
sectionName: S.of(context).freeStorageUsable,
|
||||||
leftValue: convertBytesToAbsoluteGBs(
|
leftValue: convertBytesToAbsoluteGBs(
|
||||||
min(
|
min(
|
||||||
widget.referralView.claimedStorage,
|
widget.referralView.claimedStorage,
|
||||||
|
@ -131,10 +135,7 @@ class _StorageDetailsScreenState extends State<StorageDetailsScreen> {
|
||||||
height: 24,
|
height: 24,
|
||||||
),
|
),
|
||||||
Text(
|
Text(
|
||||||
"Usable storage is limited by your current"
|
S.of(context).usableReferralStorageInfo,
|
||||||
" plan. Excess"
|
|
||||||
" claimed storage will automatically become"
|
|
||||||
" usable when you upgrade your plan.",
|
|
||||||
style: textStyle.small
|
style: textStyle.small
|
||||||
.copyWith(color: colorScheme.textMuted),
|
.copyWith(color: colorScheme.textMuted),
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in a new issue