CAKE-133 | added localization to change current wallet alert, to create new wallet popup, to seed alert

This commit is contained in:
Oleksandr Sobol
2020-10-30 18:40:42 +02:00
parent ed72cee3f4
commit 0473d342f3
15 changed files with 336 additions and 24 deletions
+4 -6
View File
@@ -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()));
}
}