Skip to content

Commit

Permalink
feat: Upload SeedPhrase - translations
Browse files Browse the repository at this point in the history
  • Loading branch information
digitalheartxs committed Oct 16, 2024
1 parent 8ddb9b0 commit 1b8e507
Show file tree
Hide file tree
Showing 5 changed files with 116 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Future<void> showUploadConfirmationDialog(
context: rootContext,
builder: (context) {
return VoicesAlertDialog(
title: const Text('ALERT'),
title: Text(context.l10n.alert.toUpperCase()),
icon: VoicesAvatar(
radius: 40,
backgroundColor: Colors.transparent,
Expand All @@ -34,20 +34,18 @@ Future<void> showUploadConfirmationDialog(
width: 3,
),
),
subtitle: const Text('SWITCH TO FILE UPLOAD'),
content: const Text(
'Do you want to cancel manual input, and switch to Catalyst key upload?',
),
subtitle: Text(context.l10n.uploadConfirmDialogSubtitle),
content: Text(context.l10n.uploadConfirmDialogContent),
buttons: [
VoicesFilledButton(
child: const Text('Yes, switch to Catalyst key upload'),
child: Text(context.l10n.uploadConfirmDialogYesButton),
onTap: () async {
Navigator.of(context).pop();
await _showUploadDialog(rootContext, onUploadSuccessful);
},
),
VoicesTextButton(
child: const Text('Resume manual input'),
child: Text(context.l10n.uploadConfirmDialogResumeButton),
onTap: () => Navigator.of(context).pop(),
),
],
Expand Down Expand Up @@ -87,9 +85,6 @@ Future<void> _showUploadDialog(
);
}
},
onCancel: () => debugPrint(
'onCancel, we can cancel upload here',
),
);
}

Expand All @@ -101,19 +96,19 @@ Future<void> _showIncorrectUploadDialog(
context: rootContext,
builder: (context) {
return VoicesAlertDialog(
title: const Text('WARNING'),
title: Text(context.l10n.warning.toUpperCase()),
icon: CatalystImage.asset(
VoicesAssets.images.keyIncorrect.path,
width: 80,
height: 80,
),
subtitle: const Text('CATALYST KEY INCORRECT'),
content: const Text(
'The Catalyst keychain that you entered or uploaded is incorrect, please try again.',
subtitle: Text(context.l10n.incorrectUploadDialogSubtitle),
content: Text(
context.l10n.incorrectUploadDialogContent,
),
buttons: [
VoicesFilledButton(
child: const Text('Try again'),
child: Text(context.l10n.incorrectUploadDialogTryAgainButton),
onTap: () async {
Navigator.of(context).pop();
await _showUploadDialog(
Expand All @@ -123,7 +118,7 @@ Future<void> _showIncorrectUploadDialog(
},
),
VoicesTextButton(
child: const Text('Cancel'),
child: Text(context.l10n.cancelButtonText),
onTap: () => Navigator.of(context).pop(),
),
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1606,6 +1606,12 @@ abstract class VoicesLocalizations {
/// **'Warning'**
String get warning;

/// No description provided for @alert.
///
/// In en, this message translates to:
/// **'Alert'**
String get alert;

/// No description provided for @registrationExitConfirmDialogSubtitle.
///
/// In en, this message translates to:
Expand Down Expand Up @@ -1773,6 +1779,48 @@ abstract class VoicesLocalizations {
/// In en, this message translates to:
/// **'Continue recovery process'**
String get recoveryExitConfirmDialogContinue;

/// No description provided for @uploadConfirmDialogSubtitle.
///
/// In en, this message translates to:
/// **'SWITCH TO FILE UPLOAD'**
String get uploadConfirmDialogSubtitle;

/// No description provided for @uploadConfirmDialogContent.
///
/// In en, this message translates to:
/// **'Do you want to cancel manual input, and switch to Catalyst key upload?'**
String get uploadConfirmDialogContent;

/// No description provided for @uploadConfirmDialogYesButton.
///
/// In en, this message translates to:
/// **'Yes, switch to Catalyst key upload'**
String get uploadConfirmDialogYesButton;

/// No description provided for @uploadConfirmDialogResumeButton.
///
/// In en, this message translates to:
/// **'Resume manual inputs'**
String get uploadConfirmDialogResumeButton;

/// No description provided for @incorrectUploadDialogSubtitle.
///
/// In en, this message translates to:
/// **'CATALYST KEY INCORRECT'**
String get incorrectUploadDialogSubtitle;

/// No description provided for @incorrectUploadDialogContent.
///
/// In en, this message translates to:
/// **'The Catalyst keychain that you entered or uploaded is incorrect, please try again.'**
String get incorrectUploadDialogContent;

/// No description provided for @incorrectUploadDialogTryAgainButton.
///
/// In en, this message translates to:
/// **'Try again'**
String get incorrectUploadDialogTryAgainButton;
}

class _VoicesLocalizationsDelegate extends LocalizationsDelegate<VoicesLocalizations> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -848,6 +848,9 @@ class VoicesLocalizationsEn extends VoicesLocalizations {
@override
String get warning => 'Warning';

@override
String get alert => 'Alert';

@override
String get registrationExitConfirmDialogSubtitle => 'Account creation incomplete!';

Expand Down Expand Up @@ -931,4 +934,25 @@ class VoicesLocalizationsEn extends VoicesLocalizations {

@override
String get recoveryExitConfirmDialogContinue => 'Continue recovery process';

@override
String get uploadConfirmDialogSubtitle => 'SWITCH TO FILE UPLOAD';

@override
String get uploadConfirmDialogContent => 'Do you want to cancel manual input, and switch to Catalyst key upload?';

@override
String get uploadConfirmDialogYesButton => 'Yes, switch to Catalyst key upload';

@override
String get uploadConfirmDialogResumeButton => 'Resume manual inputs';

@override
String get incorrectUploadDialogSubtitle => 'CATALYST KEY INCORRECT';

@override
String get incorrectUploadDialogContent => 'The Catalyst keychain that you entered or uploaded is incorrect, please try again.';

@override
String get incorrectUploadDialogTryAgainButton => 'Try again';
}
Original file line number Diff line number Diff line change
Expand Up @@ -848,6 +848,9 @@ class VoicesLocalizationsEs extends VoicesLocalizations {
@override
String get warning => 'Warning';

@override
String get alert => 'Alert';

@override
String get registrationExitConfirmDialogSubtitle => 'Account creation incomplete!';

Expand Down Expand Up @@ -931,4 +934,25 @@ class VoicesLocalizationsEs extends VoicesLocalizations {

@override
String get recoveryExitConfirmDialogContinue => 'Continue recovery process';

@override
String get uploadConfirmDialogSubtitle => 'SWITCH TO FILE UPLOAD';

@override
String get uploadConfirmDialogContent => 'Do you want to cancel manual input, and switch to Catalyst key upload?';

@override
String get uploadConfirmDialogYesButton => 'Yes, switch to Catalyst key upload';

@override
String get uploadConfirmDialogResumeButton => 'Resume manual inputs';

@override
String get incorrectUploadDialogSubtitle => 'CATALYST KEY INCORRECT';

@override
String get incorrectUploadDialogContent => 'The Catalyst keychain that you entered or uploaded is incorrect, please try again.';

@override
String get incorrectUploadDialogTryAgainButton => 'Try again';
}
Original file line number Diff line number Diff line change
Expand Up @@ -887,6 +887,7 @@
"description": "When user confirms password but it does not match original one."
},
"warning": "Warning",
"alert": "Alert",
"registrationExitConfirmDialogSubtitle": "Account creation incomplete!",
"registrationExitConfirmDialogContent": "If attempt to leave without creating your keychain - account creation will be incomplete. \u2028\u2028You are not able to login without \u2028completing your keychain.",
"registrationExitConfirmDialogContinue": "Continue keychain creation",
Expand Down Expand Up @@ -914,5 +915,12 @@
"recoverySuccessGoAccount": "Check my account",
"recoveryExitConfirmDialogSubtitle": "12 word keychain restoration incomplete",
"recoveryExitConfirmDialogContent": "Please continue your Catalyst Keychain restoration, if you cancel all input will be lost.",
"recoveryExitConfirmDialogContinue": "Continue recovery process"
"recoveryExitConfirmDialogContinue": "Continue recovery process",
"uploadConfirmDialogSubtitle": "SWITCH TO FILE UPLOAD",
"uploadConfirmDialogContent": "Do you want to cancel manual input, and switch to Catalyst key upload?",
"uploadConfirmDialogYesButton": "Yes, switch to Catalyst key upload",
"uploadConfirmDialogResumeButton": "Resume manual inputs",
"incorrectUploadDialogSubtitle": "CATALYST KEY INCORRECT",
"incorrectUploadDialogContent": "The Catalyst keychain that you entered or uploaded is incorrect, please try again.",
"incorrectUploadDialogTryAgainButton": "Try again"
}

0 comments on commit 1b8e507

Please sign in to comment.