mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-10-19 05:58:50 +02:00
CAKE-133 | added localization to change current wallet alert, to create new wallet popup, to seed alert
This commit is contained in:
@@ -32,13 +32,11 @@ class WalletSeedPage extends BasePage {
|
||||
final confirmed = await showPopUp<bool>(
|
||||
context: context,
|
||||
builder: (BuildContext context) {
|
||||
// FIXME: add translations
|
||||
return AlertWithTwoActions(
|
||||
alertTitle: 'Attention',
|
||||
alertContent:
|
||||
'The seed is the only way to recover your wallet. Have you written it down?',
|
||||
leftButtonText: 'Go back',
|
||||
rightButtonText: 'Yes, I have',
|
||||
alertTitle: S.of(context).seed_alert_title,
|
||||
alertContent: S.of(context).seed_alert_content,
|
||||
leftButtonText: S.of(context).seed_alert_back,
|
||||
rightButtonText: S.of(context).seed_alert_yes,
|
||||
actionLeftButton: () => Navigator.of(context).pop(false),
|
||||
actionRightButton: () => Navigator.of(context).pop(true));
|
||||
}) ??
|
||||
|
||||
@@ -87,11 +87,9 @@ class WalletListBodyState extends State<WalletListBody> {
|
||||
final confirmed = await showPopUp<bool>(
|
||||
context: context,
|
||||
builder: (dialogContext) {
|
||||
// FIXME:
|
||||
return AlertWithTwoActions(
|
||||
alertTitle: 'Change current wallet',
|
||||
alertContent:
|
||||
'Do you want to change current wallet to ${wallet.name} ?',
|
||||
alertTitle: S.of(context).change_wallet_alert_title,
|
||||
alertContent: S.of(context).change_wallet_alert_content(wallet.name),
|
||||
leftButtonText: S.of(context).cancel,
|
||||
rightButtonText: S.of(context).change,
|
||||
actionLeftButton: () =>
|
||||
@@ -242,12 +240,12 @@ class WalletListBodyState extends State<WalletListBody> {
|
||||
|
||||
Future<void> _generateNewWallet() async {
|
||||
try {
|
||||
changeProcessText('Creating new wallet'); // FIXME: Unnamed constant
|
||||
changeProcessText(S.of(context).creating_new_wallet);
|
||||
await widget.walletListViewModel.walletNewVM.create(options: 'English'); // FIXME: Unnamed constant
|
||||
hideProgressText();
|
||||
await Navigator.of(context).pushNamed(Routes.seed, arguments: true);
|
||||
} catch(e) {
|
||||
changeProcessText('Error: ${e.toString()}');
|
||||
changeProcessText(S.of(context).creating_new_wallet_error(e.toString()));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user