From 02292347504b2683777da6c9cbaefa95933bdb2e Mon Sep 17 00:00:00 2001 From: digitalheartxs Date: Fri, 27 Sep 2024 11:04:01 +0200 Subject: [PATCH] feat: My account, modals, extract translations for keychain_deleted_dialog.dart --- .../account/keychain_deleted_dialog.dart | 11 ++++----- .../catalyst_voices_localizations.dart | 24 +++++++++++++++++++ .../catalyst_voices_localizations_en.dart | 12 ++++++++++ .../catalyst_voices_localizations_es.dart | 12 ++++++++++ .../lib/l10n/intl_en.arb | 15 +++++++++++- 5 files changed, 67 insertions(+), 7 deletions(-) diff --git a/catalyst_voices/lib/pages/account/keychain_deleted_dialog.dart b/catalyst_voices/lib/pages/account/keychain_deleted_dialog.dart index 8ae7a0ef23..fe26bec353 100644 --- a/catalyst_voices/lib/pages/account/keychain_deleted_dialog.dart +++ b/catalyst_voices/lib/pages/account/keychain_deleted_dialog.dart @@ -1,6 +1,7 @@ import 'package:catalyst_voices/widgets/buttons/voices_filled_button.dart'; import 'package:catalyst_voices/widgets/modals/voices_desktop_dialog.dart'; import 'package:catalyst_voices_brands/catalyst_voices_brands.dart'; +import 'package:catalyst_voices_localization/catalyst_voices_localization.dart'; import 'package:flutter/material.dart'; class KeychainDeletedDialog extends StatelessWidget { @@ -21,27 +22,25 @@ class KeychainDeletedDialog extends StatelessWidget { children: [ const SizedBox(height: 24), Text( - 'Catalyst keychain removed', + context.l10n.keychainDeletedDialogTitle, style: Theme.of(context).textTheme.titleLarge, ), const SizedBox(height: 48), Text( - ''' -Your Catalyst Keychain is removed successfully from this device.''', + context.l10n.keychainDeletedDialogSubtitle, style: Theme.of(context).textTheme.titleMedium, textAlign: TextAlign.center, ), const SizedBox(height: 32), Text( - ''' -We reverted this device to Catalyst first use.''', + context.l10n.keychainDeletedDialogInfo, style: Theme.of(context).textTheme.bodyMedium, textAlign: TextAlign.center, ), const SizedBox(height: 24), VoicesFilledButton( onTap: () => Navigator.of(context).pop(), - child: const Text('Close'), + child: Text(context.l10n.close), ), ], ), 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 e8b4705ce0..7e9e8cf100 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 @@ -855,6 +855,30 @@ abstract class VoicesLocalizations { /// In en, this message translates to: /// **'Delete'** String get delete; + + /// No description provided for @close. + /// + /// In en, this message translates to: + /// **'Close'** + String get close; + + /// A title on keychain deleted dialog + /// + /// In en, this message translates to: + /// **'Catalyst keychain removed'** + String get keychainDeletedDialogTitle; + + /// A subtitle on keychain deleted dialog + /// + /// In en, this message translates to: + /// **'Catalyst keychain removed'** + String get keychainDeletedDialogSubtitle; + + /// An info on keychain deleted dialog + /// + /// In en, this message translates to: + /// **'Catalyst keychain removed'** + String get keychainDeletedDialogInfo; } 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 20e0acf8ae..0a88f1d442 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 @@ -441,4 +441,16 @@ class VoicesLocalizationsEn extends VoicesLocalizations { @override String get delete => 'Delete'; + + @override + String get close => 'Close'; + + @override + String get keychainDeletedDialogTitle => 'Catalyst keychain removed'; + + @override + String get keychainDeletedDialogSubtitle => 'Catalyst keychain removed'; + + @override + String get keychainDeletedDialogInfo => 'Catalyst keychain removed'; } 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 1cc7b8e66d..a5b465b775 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 @@ -441,4 +441,16 @@ class VoicesLocalizationsEs extends VoicesLocalizations { @override String get delete => 'Delete'; + + @override + String get close => 'Close'; + + @override + String get keychainDeletedDialogTitle => 'Catalyst keychain removed'; + + @override + String get keychainDeletedDialogSubtitle => 'Catalyst keychain removed'; + + @override + String get keychainDeletedDialogInfo => 'Catalyst keychain removed'; } 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 050b8b5f04..768c47af49 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 @@ -535,5 +535,18 @@ "@deleteKeychainDialogRemovingPhrase": { "description": "A removing phrase on delete keychain dialog" }, - "delete": "Delete" + "delete": "Delete", + "close": "Close", + "keychainDeletedDialogTitle": "Catalyst keychain removed", + "@keychainDeletedDialogTitle": { + "description": "A title on keychain deleted dialog" + }, + "keychainDeletedDialogSubtitle": "Catalyst keychain removed", + "@keychainDeletedDialogSubtitle": { + "description": "A subtitle on keychain deleted dialog" + }, + "keychainDeletedDialogInfo": "Catalyst keychain removed", + "@keychainDeletedDialogInfo": { + "description": "An info on keychain deleted dialog" + } } \ No newline at end of file