Extract strings

This commit is contained in:
Neeraj Gupta 2023-07-13 20:59:28 +05:30
parent f05fb0374f
commit 70ccb5856a
2 changed files with 9 additions and 5 deletions

View file

@ -12,6 +12,10 @@
"importScanQrCode": "Scan a QR Code",
"importEnterSetupKey": "Enter a setup key",
"importAccountPageTitle": "Enter account details",
"secretCanNotBeEmpty": "Secret can not be empty",
"bothIssuerAndAccountCanNotBeEmpty": "Both issuer and account can not be empty",
"incorrectDetails" :"Incorrect details",
"pleaseVerifyDetails": "Please verify the details and try again",
"codeIssuerHint": "Issuer",
"codeSecretKeyHint" : "Secret Key",
"codeAccountHint": "Account (you@domain.com)",

View file

@ -108,9 +108,9 @@ class _SetupEnterSecretKeyPageState extends State<SetupEnterSecretKeyPage> {
_secretController.text.trim().isEmpty) {
String message;
if (_secretController.text.trim().isEmpty) {
message = "Secret can not be empty";
message = context.l10n.secretCanNotBeEmpty;
} else {
message = "Both account and issuer can not be empty";
message = context.l10n.bothIssuerAndAccountCanNotBeEmpty;
}
_showIncorrectDetailsDialog(context, message: message);
return;
@ -157,12 +157,12 @@ class _SetupEnterSecretKeyPageState extends State<SetupEnterSecretKeyPage> {
void _showIncorrectDetailsDialog(
BuildContext context, {
String message = "Please verify the entered details",
String? message,
}) {
showErrorDialog(
context,
"Incorrect details",
message,
context.l10n.incorrectDetails,
message ?? context.l10n.pleaseVerifyDetails,
);
}
}