From 1b8e5070b3a4b6fd2969d73971856da1f5020a2c Mon Sep 17 00:00:00 2001 From: digitalheartxs Date: Wed, 16 Oct 2024 16:33:36 +0200 Subject: [PATCH] feat: Upload SeedPhrase - translations --- .../show_upload_confirmation_dialog.dart | 27 +++++------ .../catalyst_voices_localizations.dart | 48 +++++++++++++++++++ .../catalyst_voices_localizations_en.dart | 24 ++++++++++ .../catalyst_voices_localizations_es.dart | 24 ++++++++++ .../lib/l10n/intl_en.arb | 10 +++- 5 files changed, 116 insertions(+), 17 deletions(-) diff --git a/catalyst_voices/lib/pages/registration/show_upload_confirmation_dialog.dart b/catalyst_voices/lib/pages/registration/show_upload_confirmation_dialog.dart index 5aadab33913..144dab64582 100644 --- a/catalyst_voices/lib/pages/registration/show_upload_confirmation_dialog.dart +++ b/catalyst_voices/lib/pages/registration/show_upload_confirmation_dialog.dart @@ -21,7 +21,7 @@ Future showUploadConfirmationDialog( context: rootContext, builder: (context) { return VoicesAlertDialog( - title: const Text('ALERT'), + title: Text(context.l10n.alert.toUpperCase()), icon: VoicesAvatar( radius: 40, backgroundColor: Colors.transparent, @@ -34,20 +34,18 @@ Future 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(), ), ], @@ -87,9 +85,6 @@ Future _showUploadDialog( ); } }, - onCancel: () => debugPrint( - 'onCancel, we can cancel upload here', - ), ); } @@ -101,19 +96,19 @@ Future _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( @@ -123,7 +118,7 @@ Future _showIncorrectUploadDialog( }, ), VoicesTextButton( - child: const Text('Cancel'), + child: Text(context.l10n.cancelButtonText), onTap: () => Navigator.of(context).pop(), ), ], diff --git a/catalyst_voices/packages/catalyst_voices_localization/lib/generated/catalyst_voices_localizations.dart b/catalyst_voices/packages/catalyst_voices_localization/lib/generated/catalyst_voices_localizations.dart index c3c0f2037aa..b4ecc6d7c4e 100644 --- a/catalyst_voices/packages/catalyst_voices_localization/lib/generated/catalyst_voices_localizations.dart +++ b/catalyst_voices/packages/catalyst_voices_localization/lib/generated/catalyst_voices_localizations.dart @@ -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: @@ -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 { diff --git a/catalyst_voices/packages/catalyst_voices_localization/lib/generated/catalyst_voices_localizations_en.dart b/catalyst_voices/packages/catalyst_voices_localization/lib/generated/catalyst_voices_localizations_en.dart index b3457c1ea51..9ad764343e5 100644 --- a/catalyst_voices/packages/catalyst_voices_localization/lib/generated/catalyst_voices_localizations_en.dart +++ b/catalyst_voices/packages/catalyst_voices_localization/lib/generated/catalyst_voices_localizations_en.dart @@ -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!'; @@ -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'; } diff --git a/catalyst_voices/packages/catalyst_voices_localization/lib/generated/catalyst_voices_localizations_es.dart b/catalyst_voices/packages/catalyst_voices_localization/lib/generated/catalyst_voices_localizations_es.dart index 9c23eb5e9e6..d549c024ad6 100644 --- a/catalyst_voices/packages/catalyst_voices_localization/lib/generated/catalyst_voices_localizations_es.dart +++ b/catalyst_voices/packages/catalyst_voices_localization/lib/generated/catalyst_voices_localizations_es.dart @@ -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!'; @@ -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'; } diff --git a/catalyst_voices/packages/catalyst_voices_localization/lib/l10n/intl_en.arb b/catalyst_voices/packages/catalyst_voices_localization/lib/l10n/intl_en.arb index 9d49d04bbc9..3459b24df39 100644 --- a/catalyst_voices/packages/catalyst_voices_localization/lib/l10n/intl_en.arb +++ b/catalyst_voices/packages/catalyst_voices_localization/lib/l10n/intl_en.arb @@ -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", @@ -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" } \ No newline at end of file