From 0873740fa41bf113895ccee67ea9f0e309d6ed07 Mon Sep 17 00:00:00 2001 From: parodyBit Date: Wed, 25 Oct 2023 10:03:19 -0600 Subject: [PATCH] refactor: localization maps for stepbars --- lib/constants.dart | 36 +- lib/l10n/app_en.arb | 385 +++++++++--------- lib/l10n/app_es.arb | 375 ++++++++--------- .../dashboard/view/dashboard_screen.dart | 31 +- .../preferences/export_signed_msg.dart | 7 +- .../preferences/preferences_screen.dart | 34 +- .../send_transaction/send_vtt_screen.dart | 44 +- .../vtt_builder/02_select_miner_fee.dart | 118 +++--- .../vtt_builder/03_review_step.dart | 2 +- 9 files changed, 524 insertions(+), 508 deletions(-) diff --git a/lib/constants.dart b/lib/constants.dart index b6819261..5cdd886e 100644 --- a/lib/constants.dart +++ b/lib/constants.dart @@ -3,8 +3,12 @@ import 'package:flutter_dotenv/flutter_dotenv.dart'; import 'package:flutter_gen/gen_l10n/app_localizations.dart'; import 'package:flutter_localizations/flutter_localizations.dart'; import 'package:my_wit_wallet/screens/create_wallet/bloc/create_wallet_bloc.dart'; +import 'package:my_wit_wallet/screens/dashboard/view/dashboard_screen.dart'; +import 'package:my_wit_wallet/screens/preferences/preferences_screen.dart'; +import 'package:my_wit_wallet/screens/send_transaction/send_vtt_screen.dart'; import 'package:my_wit_wallet/util/storage/database/wallet.dart'; import 'package:my_wit_wallet/globals.dart' as globals; +import 'package:witnet/data_structures.dart'; typedef String LocalizationCallback(String value); @@ -16,6 +20,36 @@ Map walletTypeToLabel(BuildContext context) => { WalletType.single: AppLocalizations.of(context)!.walletTypeNodeLabel, }; +Map localizedDashboardSteps = { + DashboardViewSteps.transactions: + localization.dashboardViewSteps('transactions'), + DashboardViewSteps.stats: localization.dashboardViewSteps('stats'), +}; + +Map localizedVTTsteps = { + VTTsteps.Transaction: localization.vttSendSteps('Transaction'), + VTTsteps.MinerFee: localization.vttSendSteps('MinerFee'), + VTTsteps.Review: localization.vttSendSteps('Review'), +}; +Map localizedFeeOptions = { + EstimatedFeeOptions.Stinky: localization.estimatedFeeOptions('stinky'), + EstimatedFeeOptions.Low: localization.estimatedFeeOptions('low'), + EstimatedFeeOptions.Medium: localization.estimatedFeeOptions('medium'), + EstimatedFeeOptions.High: localization.estimatedFeeOptions('high'), + EstimatedFeeOptions.Opulent: localization.estimatedFeeOptions('opulent'), + EstimatedFeeOptions.Custom: localization.estimatedFeeOptions('custom'), +}; + +Map localizedFeeTypeOptions = { + FeeType.Absolute: localization.feeTypeOptions('absolute'), + FeeType.Weighted: localization.feeTypeOptions('weighted'), +}; + +Map localizedConfigSteps = { + ConfigSteps.general: localization.preferenceTabs('general'), + ConfigSteps.wallet: localization.preferenceTabs('wallet'), +}; + /// Explorer Settings const bool USE_EXPLORER_DEV = false; // ignore: non_constant_identifier_names @@ -59,7 +93,7 @@ Map DEFAULT_MINER_FEE_OPTIONS = { EstimatedFeeOptions.Medium: '0', EstimatedFeeOptions.High: '0', EstimatedFeeOptions.Opulent: '0', - EstimatedFeeOptions.Custom: null, + EstimatedFeeOptions.Custom: '1', }; Map importOriginToLabel(BuildContext context) { diff --git a/lib/l10n/app_en.arb b/lib/l10n/app_en.arb index da5813b9..343984b0 100644 --- a/lib/l10n/app_en.arb +++ b/lib/l10n/app_en.arb @@ -1,252 +1,261 @@ { - "welcome": "Welcome", + "address": "Address", + "addressCopied": "Address copied!", + "amount": "Amount", + "authenticateWithBiometrics": "Authenticate with biometrics", + "backLabel": "Back", + "balance": "balance", + "blocksMined": "Blocks mined", + "buildWallet01": "The different addresses in your wallet are being scanned for existing transactions and balance. This will normally take less than 1 minute.", + "buildWalletBalance": "Balance:", + "buildWalletHeader": "Address discovery", + "cancel": "Cancel", + "cancelAuthentication": "Cancel authentication", "carouselMsg01": "myWitWallet allows you to send and receive Wit immediately. Bye bye synchronization!", "carouselMsg02": "myWitWallet uses state-of-the-art cryptography to store your Wit coins securely.", "carouselMsg03": "myWitWallet is completely non-custodial. Your keys will never leave your device.", + "chooseMinerFee": "Choose you desired miner fee", + "close": "close", + "confirmMnemonic01": "Type in your secret recovery phrase below exactly as shown before. This will ensure that you have written down your secret recovery phrase correctly.", + "confirmMnemonicHeader": "Secret Recovery Phrase Confirmation", + "confirmPassword": "Confirm Password", + "connectionIssue": "myWitWallet is experiencing connection problems", + "connectionReestablished": "Connection reestablished!", + "continueLabel": "Continue", + "copyAddressConfirmed": "Address copied!", + "copyAddressLabel": "Copy selected address", + "copyAddressToClipboard": "Copy address to clipboard", + "copyJson": "Copy JSON", + "copyXprvConfirmed": "Xprv copied!", + "copyXprvLabel": "Copy Xprv", + "createImportWallet01": "When you created your wallet, you probably wrote down the secret security phrase on a piece of paper. It looks like a list of 12 apparently random words.", + "createImportWallet02": "If you did not keep the secret security phrase, you can still export a password-protected Xprv key from the settings of your existing wallet.", + "createImportWalletHeader": "Create or import your wallet", "createNewWalletLabel": "Create new wallet", - "createWalletLabel": "Create wallet", - "importWalletLabel": "Import wallet", "createOrImportLabel": "Create or import", - "walletSecurityHeader": "Wallet security", - "walletSecurity01": "Please, read carefully before continuing.", - "walletSecurity02": "A wallet is an app that keeps your credentials safe and lets you interface with the Witnet blockchain. It allows you to easily transfer and receive Wit.", - "walletSecurity03": "You should never share your seed phrase with anyone. We at Witnet do not store your seed phrase and will never ask you to share it with us. If you lose your seed phrase, you will permanently lose access to your wallet and your funds.", - "walletSecurity04": "If someone finds or sees your seed phrase, they will have access to your wallet and all of your funds.", - "walletSecurity05": "We recommend storing your seed phrase on paper somewhere safe. Do not store it in a file on your computer or anywhere electronically.", - "walletSecurity06": "By accepting these disclaimers, you commit to comply with the explained restrictions and digitally sign your conformance using your Witnet wallet.", - "walletSecurityConfirmLabel": "I will be careful, I promise!", - "backLabel": "Back", - "continueLabel": "Continue", - "passwordLabel": "Password", - "invalidPassword": "Invalid Password", - "confirmPassword": "Confirm Password", - "unlockWallet": "Unlock wallet", - "generateMnemonicHeader": "Write down your secret recovery phrase", - "generateMnemonic01": "These {mnemonicLength} apparently random words are your secret recovery phrase. They will allow you to recover your Wit coins if you uninstall this app or forget your wallet lock password.", - "@generateMnemonic01": { + "createWalletLabel": "Create wallet", + "currentAddress": "Current address", + "darkMode": "Dark Mode", + "dashboardViewSteps": "{selectedIndex, select, transactions{Transactions} stats{Stats} other{unused}}", + "@dashboardViewSteps": { "placeholders": { - "mnemonicLength": { - "type": "int", - "example": "12" + "selectedIndex": { + "type": "String" } } }, - "generateMnemonic02": "You must write down your secret recovery phrase on a piece of paper and store it somewhere safe. Do not store it in a file in your device or anywhere else electronically. If you lose your secret recovery phrase, you may permanently lose access to your wallet and your Wit coins.", - "generateMnemonic03": "You should never share your secret recovery phrase with anyone. If someone finds or sees your secret recovery phrase, they will have full access to your wallet and your Wit coins.", - "confirmMnemonicHeader": "Secret Recovery Phrase Confirmation", - "confirmMnemonic01": "Type in your secret recovery phrase below exactly as shown before. This will ensure that you have written down your secret recovery phrase correctly.", - "nameLabel": "Name", - "walletNameHint": "My first million Wits", - "walletDetailHeader": "Identify your wallet", - "walletDetail01": "You can better keep track of your different wallets by giving each its own name and description.", - "walletDetail02": "Wallet names make it easy to quickly change from one wallet to another. Wallet descriptions can be more elaborate and rather describe the purpose of a wallet or any other metadata.", - "encryptWalletHeader": "Encrypt your wallet", + "deleteStorageWarning": "Your storage is about to be permanently deleted!", + "drSolved": "Data requests solved", + "enableLoginWithBiometrics": "Enable login with biometrics", "encryptWallet01": "This password encrypts your Witnet wallet only on this computer.", "encryptWallet02": "This is not your backup and you cannot restore your wallet with this password.", "encryptWallet03": "Your {mnemonicLength} word seed phrase is still your ultimate recovery method.", "@encryptWallet03": { "placeholders": { "mnemonicLength": { - "type": "int", - "example": "12" + "example": "12", + "type": "int" } } }, "encryptWallet04": "Your Xprv is still your ultimate recovery method.", - "importMnemonicHeader": "Import wallet from secret recovery phrase", - "importMnemonic01": "Type your secret recovery phrase below. It looks like a list of 12 apparently random words.", - "importWalletHeader": "", - "createImportWalletHeader": "Create or import your wallet", - "createImportWallet01": "When you created your wallet, you probably wrote down the secret security phrase on a piece of paper. It looks like a list of 12 apparently random words.", - "createImportWallet02": "If you did not keep the secret security phrase, you can still export a password-protected Xprv key from the settings of your existing wallet.", - "importMnemonicLabel": "Import wallet from secret recovery phrase", - "importXprvLabel": "Import from Xprv key", - "selectImportOptionHeader": "Import your wallet", - "importXprvHeader": "Import wallet from an Xprv key", - "importXprv01": "Xprv is a key exchange format that encodes and protects your wallet with a password. Xprv keys look like a long sequence of apparently random letters and numbers, preceded by \"xprv\".", - "importXprv02": "To import your wallet from an Xprv key encrypted with a password, you need to type the key itself and its password below:", - "xprvOrigin": "Xprv Origin", - "sheikah": "Sheikah", - "xprvInputHint": "Your Xprv key (starts with xprv...)", - "scanQrCodeLabel": "Scan QR code", - "buildWalletHeader": "Address discovery", - "buildWallet01": "The different addresses in your wallet are being scanned for existing transactions and balance. This will normally take less than 1 minute.", - "buildWalletBalance": "Balance:", - "connectionIssue": "myWitWallet is experiencing connection problems", - "connectionReestablished": "Connection reestablished!", - "showWalletList": "Show wallet list", - "transactionsFound": "Transactions found: ", + "encryptWalletHeader": "Encrypt your wallet", + "enterYourPassword": "Enter your Password", + "epoch": "Epoch", + "error": "Error", + "errorFieldBlank": "Field is blank", + "errorReestablish": "There was an error re-establishing myWitWallet, please try again!", + "errorSigning": "Error signing message", + "errorTransaction": "Error sending the transaction, try again!", + "errorXprvStart": "needs to start with \\\"xprv1\\\"", + "estimatedFeeOptions": "{feeOption, select, stinky{Stinky} low{Low} medium{Medium} high{High} opulent{Opulent} custom{Custom} other{}}", + "@estimatedFeeOptions": { + "placeholders": { + "feeOption": { + "type": "String" + } + } + }, "exploredAddresses": "Explored addresses: ", "exploringAddress": "Exploring address: ", - "verifyLabel": "Verify", - "darkMode": "Dark Mode", - "lightMode": "Light Mode", - "theme": "Theme", - "lockYourWallet": "Lock your wallet", - "lockWalletLabel": "Lock wallet", - "versionNumber": "Version {versionNumber}", - "@versionNumber": { + "exportJson": "Export JSON", + "exportXprv": "Export Xprv", + "fee": "Fee", + "feesCollected": "Fees collected", + "feesPayed": "Fees payed", + "feeTypeOptions": "{feeType, select, absolute{Absolute} weighted{Weighted} other{}}", + "@feeTypeOptions": { "placeholders": { - "versionNumber": { - "type": "String", - "example": "0.0.0-dev" + "feeType": { + "type": "String" } } }, - "copyXprvLabel": "Copy Xprv", - "enterYourPassword": "Enter your Password", - "copyXprvConfirmed": "Xprv copied!", + "forgetPassword": "Did you forget your password?, You can delete your wallet and configure a new one!", + "from": "from", + "generatedAddress": "Generated address", + "generatedAddresses": "Generated addresses", + "generateMnemonic01": "These {mnemonicLength} apparently random words are your secret recovery phrase. They will allow you to recover your Wit coins if you uninstall this app or forget your wallet lock password.", + "@generateMnemonic01": { + "placeholders": { + "mnemonicLength": { + "example": "12", + "type": "int" + } + } + }, + "generateMnemonic02": "You must write down your secret recovery phrase on a piece of paper and store it somewhere safe. Do not store it in a file in your device or anywhere else electronically. If you lose your secret recovery phrase, you may permanently lose access to your wallet and your Wit coins.", + "generateMnemonic03": "You should never share your secret recovery phrase with anyone. If someone finds or sees your secret recovery phrase, they will have full access to your wallet and your Wit coins.", + "generateMnemonicHeader": "Write down your secret recovery phrase", "generateXprv": "Generate Xprv", - "exportXprv": "Export Xprv", - "messageSigning": "Message Signing", - "messageToBeSigned": "Message to be signed", - "copyJson": "Copy JSON", - "signMessage": "Sign Message", - "yourMessage": "Your message...", - "errorSigning": "Error signing message", - "messageSigning01": "Prove the ownership of your address by adding your signature to a message.", - "walletConfigHeader": "Export the Xprv key of my wallet", - "walletConfig01": "Your Xprv key allows you to export and back up your wallet at any point after creating it.", - "walletConfig02": "Privacy-wise, your Xprv key is equivalent to a secret recovery phrase. Do not share it with anyone, and never store it in a file in your device or anywhere else electronically.", - "walletConfig03": "Your Xprv key will be protected with the password below. When importing the Xprv on this or another app, you will be asked to type in that same password.", "genNewAddressLabel": "Generate new Address", - "copyAddressLabel": "Copy selected address", - "copyAddressConfirmed": "Address copied!", - "generatedAddresses": "Generated addresses", - "generatedAddress": "Generated address", - "invalidXprv": "Invalid Xprv:", - "invalidXprvBlank": "Field is blank", - "invalidXprvStart": "needs to start with \"xprv1\"", + "history": "History", + "importMnemonic01": "Type your secret recovery phrase below. It looks like a list of 12 apparently random words.", + "importMnemonicHeader": "Import wallet from secret recovery phrase", + "importMnemonicLabel": "Import wallet from secret recovery phrase", + "importWalletHeader": "", + "importWalletLabel": "Import wallet", + "importXprv01": "Xprv is a key exchange format that encodes and protects your wallet with a password. Xprv keys look like a long sequence of apparently random letters and numbers, preceded by \"xprv\".", + "importXprv02": "To import your wallet from an Xprv key encrypted with a password, you need to type the key itself and its password below:", + "importXprvHeader": "Import wallet from an Xprv key", + "importXprvLabel": "Import from Xprv key", "initializingWallet": "Initializing Wallet.", - "internalBalance": "Internal balance", - "internalBalanceHint": "The internal balance corresponds to the sum of all the change accounts available balance", - "okLabel": "Ok", - "passwordDescription": "This password encrypts your xprv file. You will be asked to type this password if you want to import this xprv as a backup.", "inputAmountHint": "Input an amount", - "inputYourPassword": "Input your password", "inputPasswordPrompt": "Please, input your wallet's password.", - "showPassword": "Show password", + "inputs": "Inputs", + "inputYourPassword": "Input your password", + "internalBalance": "Internal balance", + "internalBalanceHint": "The internal balance corresponds to the sum of all the change accounts available balance", + "invalidPassword": "Invalid Password", + "invalidXprv": "Invalid Xprv:", + "invalidXprvBlank": "Field is blank", + "invalidXprvStart": "needs to start with \"xprv1\"", + "jsonCopied": "JSON copied!", "launchUrlError": "Could not launch {error}", "@launchUrlError": { "placeholders": { "error": { - "type": "String", - "example": "url error" + "example": "url error", + "type": "String" } } }, - "balance": "balance", - "currentAddress": "Current address", - "copyAddressToClipboard": "Copy address to clipboard", - "addressCopied": "Address copied!", - "settings": "Settings", - "transactionDetails": "Transaction details", - "status": "Status", - "transactionId": "Transaction ID", - "epoch": "Epoch", - "type": "Type", - "feesPayed": "Fees payed", - "feesCollected": "Fees collected", - "timestamp": "Timestamp", - "inputs": "Inputs", - "outputs": "Outputs", - "from": "from", - "to": "To", + "lightMode": "Light Mode", + "lockWalletLabel": "Lock wallet", + "lockYourWallet": "Lock your wallet", + "messageSigning": "Message Signing", + "messageSigning01": "Prove the ownership of your address by adding your signature to a message.", + "messageToBeSigned": "Message to be signed", + "minerFeeHint": "By default, `Absolute fee` is selected.\\nTo set a custom weighted fee, you need to select \\'Weighted\\'. \\nThe Weighted fee is automatically calculated by the wallet considering the network congestion and transaction weight multiplied by the value selected as custom.", + "minerFeeInputHint": "Input the miner fee", + "nameLabel": "Name", "noTransactions": "You don't have transactions yet!", - "transaction": "Transaction", - "forgetPassword": "Did you forget your password?, You can delete your wallet and configure a new one!", - "reestablishWallet": "Re-establish wallet", - "send": "Send", - "history": "History", + "okLabel": "Ok", + "outputs": "Outputs", + "passwordDescription": "This password encrypts your xprv file. You will be asked to type this password if you want to import this xprv as a backup.", + "passwordLabel": "Password", + "preferenceTabs": "{selectedTab, select, general{General} wallet{Wallet} other{unused}}", + "@preferenceTabs": { + "placeholders": { + "selectedTab": { + "type": "String" + } + } + }, + "readCarefully": "Please, read carefully before continuing. Your attention is crucial!", "receive": "Receive", - "walletTypeHDLabel": "HD Wallet", - "walletTypeNodeLabel": "Node", - "address": "Address", "recipientAddress": "Recipient address", - "amount": "Amount", - "minerFeeInputHint": "Input the miner fee", - "minerFeeHint": "By default, `Absolute fee` is selected.\\nTo set a custom weighted fee, you need to select \\'Weighted\\'. \\nThe Weighted fee is automatically calculated by the wallet considering the network congestion and transaction weight multiplied by the value selected as custom.", - "chooseMinerFee": "Choose you desired miner fee", - "signAndSend": "Sign and Send", - "cancel": "Cancel", - "tryAgain": "Try again!", - "error": "Error", - "errorFieldBlank": "Field is blank", - "errorXprvStart": "needs to start with \\\"xprv1\\\"", - "errorTransaction": "Error sending the transaction, try again!", - "errorReestablish": "There was an error re-establishing myWitWallet, please try again!", "reestablish": "Re-establish", - "readCarefully": "Please, read carefully before continuing. Your attention is crucial!", - "reestablishYourWallet": "Re-establish your wallet", "reestablishInstructions": "Clicking \\\"Continue\\\" will result in the permanent deletion of your current wallet data. If you proceed, you\\'ll need to import an existing wallet or create a new one to access your funds.", "reestablishSteps01": "Make sure you have stored your recovery seed phrase or Xprv.", "reestablishSteps02": "Click \\\"Continue\\\" to delete your storage and import your wallet again.", - "whatToDo": "What to do?", - "deleteStorageWarning": "Your storage is about to be permanently deleted!", "reestablishSucess": "myWitWallet has been successfully re-established!", - "cancelAuthentication": "Cancel authentication", - "authenticateWithBiometrics": "Authenticate with biometrics", - "enableLoginWithBiometrics": "Enable login with biometrics", - "txnSigning": "Singing transaction", - "txnSigning01": "The transaction is being signed", - "txnSending": "Sending transaction", - "txnSending01": "The transaction is being sent", - "txnSuccess": "Transaction succesfully sent!", - "txnCheckStatus": "Check the transaction status in the Witnet Block Explorer:", - "txnDetails": "Transaction details", - "drSolved": "Data requests solved", - "blocksMined": "Blocks mined", + "reestablishWallet": "Re-establish wallet", + "reestablishYourWallet": "Re-establish your wallet", + "scanAqrCode": "Scan a QR code", + "scanQrCodeLabel": "Scan QR code", + "selectImportOptionHeader": "Import your wallet", + "send": "Send", + "settings": "Settings", + "sheikah": "Sheikah", + "showPassword": "Show password", + "showWalletList": "Show wallet list", + "signAndSend": "Sign and Send", + "signMessage": "Sign Message", + "status": "Status", + "theme": "Theme", + "timestamp": "Timestamp", + "to": "To", "totalFeesPaid": "Total fees paid", "totalMiningRewards": "Total mining rewards", - "fee": "Fee", - "close": "close", - "scanAqrCode": "Scan a QR code", - "preferenceTabs": "{selectedTab, select, general{General} wallet{Wallet} other{unused}}", - "@preferenceTabs": { - "placeholders": { - "selectedTab": { - "type": "String" - } - } - }, - "vttSendSteps": "{currentStepIndex, select, Transaction{Transaction} MinerFee{Miner Fee} Review{Review} other{unused}}", - "@vttSendSteps": { - "placeholders": { - "currentStepIndex": { - "type": "String" - } - } - }, - "dashboardViewSteps": "{selectedIndex, select, transactions{Transactions} stats{Stats} other{unused}}", - "@dashboardViewSteps": { + "transaction": "Transaction", + "transactionDetails": "Transaction details", + "transactionId": "Transaction ID", + "transactionsFound": "Transactions found: ", + "tryAgain": "Try again!", + "txnCheckStatus": "Check the transaction status in the Witnet Block Explorer:", + "txnDetails": "Transaction details", + "txnSending": "Sending transaction", + "txnSending01": "The transaction is being sent", + "txnSigning": "Singing transaction", + "txnSigning01": "The transaction is being signed", + "txnStatus": "{feeType, select, pending{pending} mined{mined} confirmed{confirmed} other{}}", + "@txnStatus": { "placeholders": { - "selectedIndex": { + "feeType": { "type": "String" } } }, - "estimatedFeeOptions": "{feeOption, select, stinky{Stinky} low{Low} medium{Medium} high{High} opulent{Opulent} custom{Custom} other{}}", - "@estimatedFeeOptions": { + "txnSuccess": "Transaction succesfully sent!", + "type": "Type", + "unlockWallet": "Unlock wallet", + "verifyLabel": "Verify", + "versionNumber": "Version {versionNumber}", + "@versionNumber": { "placeholders": { - "feeOption": { + "versionNumber": { + "example": "0.0.0-dev", "type": "String" } } }, - "feeTypeOptions": "{feeType, select, absolute{Absolute} weighted{Weighted} other{}}", - "@feeTypeOptions": { + "vttSendSteps": "{currentStepIndex, select, Transaction{Transaction} MinerFee{Miner Fee} Review{Review} other{unused}}", + + + + + + "@vttSendSteps": { "placeholders": { - "feeType": { + "currentStepIndex": { "type": "String" } } }, - "txnStatus": "{feeType, select, pending{pending} mined{mined} confirmed{confirmed} other{}}", - "@txnStatus": { - "placeholders": { - "feeType": { - "type": "String" - } - } - } + + + "walletConfig01": "Your Xprv key allows you to export and back up your wallet at any point after creating it.", + "walletConfig02": "Privacy-wise, your Xprv key is equivalent to a secret recovery phrase. Do not share it with anyone, and never store it in a file in your device or anywhere else electronically.", + "walletConfig03": "Your Xprv key will be protected with the password below. When importing the Xprv on this or another app, you will be asked to type in that same password.", + "walletConfigHeader": "Export the Xprv key of my wallet", + "walletDetail01": "You can better keep track of your different wallets by giving each its own name and description.", + "walletDetail02": "Wallet names make it easy to quickly change from one wallet to another. Wallet descriptions can be more elaborate and rather describe the purpose of a wallet or any other metadata.", + "walletDetailHeader": "Identify your wallet", + "walletNameHint": "My first million Wits", + "walletSecurity01": "Please, read carefully before continuing.", + "walletSecurity02": "A wallet is an app that keeps your credentials safe and lets you interface with the Witnet blockchain. It allows you to easily transfer and receive Wit.", + "walletSecurity03": "You should never share your seed phrase with anyone. We at Witnet do not store your seed phrase and will never ask you to share it with us. If you lose your seed phrase, you will permanently lose access to your wallet and your funds.", + "walletSecurity04": "If someone finds or sees your seed phrase, they will have access to your wallet and all of your funds.", + "walletSecurity05": "We recommend storing your seed phrase on paper somewhere safe. Do not store it in a file on your computer or anywhere electronically.", + "walletSecurity06": "By accepting these disclaimers, you commit to comply with the explained restrictions and digitally sign your conformance using your Witnet wallet.", + "walletSecurityConfirmLabel": "I will be careful, I promise!", + "walletSecurityHeader": "Wallet security", + "walletTypeHDLabel": "HD Wallet", + "walletTypeNodeLabel": "Node", + "welcome": "Welcome", + "whatToDo": "What to do?", + "xprvInputHint": "Your Xprv key (starts with xprv...)", + "xprvOrigin": "Xprv Origin", + "yourMessage": "Your message..." } \ No newline at end of file diff --git a/lib/l10n/app_es.arb b/lib/l10n/app_es.arb index b5210de0..2db10acf 100644 --- a/lib/l10n/app_es.arb +++ b/lib/l10n/app_es.arb @@ -1,216 +1,222 @@ { - "welcome": "Bienvenido", + "address": "Dirección", + "addressCopied": "¡Dirección copiada!", + "amount": "Cantidad", + "authenticateWithBiometrics": "Autenticación biométrica", + "backLabel": "Volver", + "balance": "saldo", + "blocksMined": "Bloques extraídos", + "buildWallet01": "Se están escaneando las diferentes direcciones de tu cartera en busca de transacciones y saldo existentes. Esto normalmente tomará menos de 1 minuto.", + "buildWalletBalance": "Saldo:", + "buildWalletHeader": "Descubrimiento de direcciones", + "cancel": "Cancelar", + "cancelAuthentication": "Cancelar autentificación", "carouselMsg01": "myWitWallet te permite enviar y recibir Wit al instante. ¡Adiós a la sincronización!", "carouselMsg02": "myWitWallet utiliza la criptografía de última generación para almacenar tus monedas Wit de manera segura.", "carouselMsg03": "myWitWallet es completamente no custodial. Tus claves nunca saldrán de tu dispositivo.", + "chooseMinerFee": "Elija la tasa minera que desee", + "close": "cerrar", + "confirmMnemonic01": "Escribe tu frase de recuperación secreta a continuación exactamente como se muestra. Esto asegurará que hayas escrito tu frase de recuperación secreta correctamente.", + "confirmMnemonicHeader": "Confirmación de la frase de recuperación secreta", + "confirmPassword": "Confirmar contraseña", + "connectionIssue": "myWitWallet está experimentando problemas de conexión", + "connectionReestablished": "¡Conexión restablecida!", + "continueLabel": "Continuar", + "copyAddressConfirmed": "¡Dirección copiada!", + "copyAddressLabel": "Copiar dirección seleccionada", + "copyAddressToClipboard": "Copiar dirección en el portapapeles", + "copyJson": "Copiar JSON", + "copyXprvConfirmed": "¡Xprv copiado!", + "copyXprvLabel": "Copiar Xprv", + "createImportWallet01": "Cuando creaste tu cartera, probablemente escribiste la frase de seguridad secreta en un papel. Parece una lista de 12 palabras aparentemente aleatorias.", + "createImportWallet02": "Si no conservaste la frase de seguridad secreta, aún puedes exportar una clave Xprv protegida con contraseña desde la configuración de tu cartera existente.", + "createImportWalletHeader": "Crear o importar tu cartera", "createNewWalletLabel": "Crear nueva cartera", - "createWalletLabel": "Crear cartera", - "importWalletLabel": "Importar cartera", "createOrImportLabel": "Crear o importar", - "walletSecurityHeader": "Seguridad de la cartera", - "walletSecurity01": "Por favor, lee con atención antes de continuar.", - "walletSecurity02": "Una cartera es una aplicación que mantiene seguras tus credenciales y te permite interactuar con la cadena de bloques de Witnet. Te permite transferir y recibir Wit de manera sencilla.", - "walletSecurity03": "Nunca debes compartir tu frase de recuperación con nadie. Nosotros en Witnet no almacenamos tu frase de recuperación y nunca te pediremos que la compartas con nosotros. Si pierdes tu frase de recuperación, perderás permanentemente el acceso a tu cartera y a tus fondos.", - "walletSecurity04": "Si alguien encuentra o ve tu frase de recuperación, tendrá acceso a tu cartera y a todos tus fondos.", - "walletSecurity05": "Recomendamos almacenar tu frase de recuperación en papel en un lugar seguro. No la almacenes en un archivo en tu computadora ni en ningún lugar electrónico.", - "walletSecurity06": "Al aceptar estos avisos, te comprometes a cumplir con las restricciones explicadas y a firmar digitalmente tu conformidad utilizando tu cartera de Witnet.", - "walletSecurityConfirmLabel": "¡Seré cuidadoso, lo prometo!", - "backLabel": "Volver", - "continueLabel": "Continuar", - "passwordLabel": "Contraseña", - "invalidPassword": "Contraseña inválida", - "confirmPassword": "Confirmar contraseña", - "unlockWallet": "Desbloquear cartera", - "generateMnemonicHeader": "Escribe tu frase de recuperación secreta", - "generateMnemonic01": "Estas {mnemonicLength} palabras aparentemente aleatorias son tu frase de recuperación secreta. Te permitirán recuperar tus monedas Wit si desinstalas esta aplicación o olvidas la contraseña de bloqueo de tu cartera.", - "@generateMnemonic01": { + "createWalletLabel": "Crear cartera", + "currentAddress": "dirección actual", + "darkMode": "Modo oscuro", + "dashboardViewSteps": "{selectedIndex, select, transactions{Transacciones} stats{Estadísticas} other{unused}}", + "@dashboardViewSteps": { "placeholders": { - "mnemonicLength": { - "type": "int", - "example": "12" + "selectedIndex": { + "type": "String" } } }, - "generateMnemonic02": "Debes escribir tu frase de recuperación secreta en un papel y almacenarla en un lugar seguro. No la almacenes en un archivo en tu dispositivo ni en ningún otro lugar electrónico. Si pierdes tu frase de recuperación secreta, podrías perder permanentemente el acceso a tu cartera y tus monedas Wit.", - "generateMnemonic03": "Nunca debes compartir tu frase de recuperación secreta con nadie. Si alguien encuentra o ve tu frase de recuperación secreta, tendrá acceso completo a tu cartera y tus monedas Wit.", - "confirmMnemonicHeader": "Confirmación de la frase de recuperación secreta", - "confirmMnemonic01": "Escribe tu frase de recuperación secreta a continuación exactamente como se muestra. Esto asegurará que hayas escrito tu frase de recuperación secreta correctamente.", - "nameLabel": "Nombre", - "walletNameHint": "Mis primeros millones de Wits", - "walletDetailHeader": "Identifica tu cartera", - "walletDetail01": "Puedes hacer un mejor seguimiento de tus diferentes carteras dándoles a cada una su propio nombre y descripción.", - "walletDetail02": "Los nombres de las carteras facilitan cambiar rápidamente de una cartera a otra. Las descripciones de las carteras pueden ser más detalladas y describir el propósito de una cartera u otros metadatos.", - "encryptWalletHeader": "Encripta tu cartera", + "deleteStorageWarning": "Tu almacenamiento está a punto de ser eliminado permanentemente.", + "drSolved": "Solicitudes de datos resueltas", + "enableLoginWithBiometrics": "Inicio de sesión con datos biométricos", "encryptWallet01": "Esta contraseña encripta tu cartera Witnet solo en esta computadora.", "encryptWallet02": "Esta no es tu copia de seguridad y no puedes restaurar tu cartera con esta contraseña.", "encryptWallet03": "Tu frase de recuperación de {mnemonicLength} palabras sigue siendo tu método de recuperación definitivo.", "@encryptWallet03": { "placeholders": { "mnemonicLength": { - "type": "int", - "example": "12" + "example": "12", + "type": "int" } } }, "encryptWallet04": "Your Xprv is still your ultimate recovery method.", - "importMnemonicHeader": "Importar cartera desde la frase de recuperación secreta", - "importMnemonic01": "Escribe tu frase de recuperación secreta a continuación. Parece una lista de 12 palabras aparentemente aleatorias.", - "importWalletHeader": "", - "createImportWalletHeader": "Crear o importar tu cartera", - "createImportWallet01": "Cuando creaste tu cartera, probablemente escribiste la frase de seguridad secreta en un papel. Parece una lista de 12 palabras aparentemente aleatorias.", - "createImportWallet02": "Si no conservaste la frase de seguridad secreta, aún puedes exportar una clave Xprv protegida con contraseña desde la configuración de tu cartera existente.", - "importMnemonicLabel": "Importar cartera desde la frase de recuperación secreta", - "importXprvLabel": "Importar desde la clave Xprv", - "selectImportOptionHeader": "Importar tu cartera", - "importXprvHeader": "Importar cartera desde una clave Xprv", - "importXprv01": "Xprv es un formato de intercambio de claves que codifica y protege tu cartera con una contraseña. Las claves Xprv se ven como una larga secuencia de letras y números aparentemente aleatorios, precedidos por \"xprv\".", - "importXprv02": "Para importar tu cartera desde una clave Xprv encriptada con una contraseña, debes escribir la clave misma y su contraseña a continuación:", - "xprvOrigin": "Origen de Xprv", - "xprvInputHint": "Tu clave Xprv (comienza con xprv...)", - "sheikah": "Sheikah", - "scanQrCodeLabel": "Escanear código QR", - "buildWalletHeader": "Descubrimiento de direcciones", - "buildWallet01": "Se están escaneando las diferentes direcciones de tu cartera en busca de transacciones y saldo existentes. Esto normalmente tomará menos de 1 minuto.", - "buildWalletBalance": "Saldo:", - "connectionIssue": "myWitWallet está experimentando problemas de conexión", - "connectionReestablished": "¡Conexión restablecida!", - "showWalletList": "Mostrar lista de carteras", - "transactionsFound": "Transacciones encontradas:", + "encryptWalletHeader": "Encripta tu cartera", + "enterYourPassword": "Escriba su contraseña", + "epoch": "Época", + "error": "Error", + "errorFieldBlank": "Field is blank", + "errorReestablish": "Se ha producido un error al restablecer myWitWallet, inténtalo de nuevo.", + "errorSigning": "Mensaje de error al firmar", + "errorTransaction": "Error al enviar la transacción, ¡inténtelo de nuevo!", + "errorXprvStart": "needs to start with \\\"xprv1\\\"", + "estimatedFeeOptions": "{feeOption, select, stinky{Apestoso} low{Bajo} medium{Medio} high{High} opulent{Alta} custom{A medida} other{}}", + "@estimatedFeeOptions": { + "placeholders": { + "feeOption": { + "type": "String" + } + } + }, "exploredAddresses": "Direcciones exploradas:", "exploringAddress": "Explorando dirección:", - "verifyLabel": "Verificar", - "darkMode": "Modo oscuro", - "lightMode": "Modo claro", - "theme": "Tema", - "lockYourWallet": "Bloquea tu cartera", - "lockWalletLabel": "Bloquear cartera", - "versionNumber": "Versión {versionNumber}", - "@versionNumber": { + "exportJson": "Exportar JSON", + "exportXprv": "Exportar Xprv", + "fee": "Tasa", + "feesCollected": "Comisiones cobradas", + "feesPayed": "Comisiones pagadas", + "feeTypeOptions": "{feeType, select, absolute{Absoluto} weighted{Ponderado} other{}}", + "@feeTypeOptions": { "placeholders": { - "versionNumber": { - "type": "String", - "example": "0.0.0-dev" + "feeType": { + "type": "String" } } }, - "copyXprvLabel": "Copiar Xprv", - "copyXprvConfirmed": "¡Xprv copiado!", + "forgetPassword": "¿Has olvidado tu contraseña?, ¡Puedes borrar tu monedero y configurar uno nuevo!", + "from": "de", + "generatedAddress": "Dirección generada", + "generatedAddresses": "Direcciones generadas", + "generateMnemonic01": "Estas {mnemonicLength} palabras aparentemente aleatorias son tu frase de recuperación secreta. Te permitirán recuperar tus monedas Wit si desinstalas esta aplicación o olvidas la contraseña de bloqueo de tu cartera.", + "@generateMnemonic01": { + "placeholders": { + "mnemonicLength": { + "example": "12", + "type": "int" + } + } + }, + "generateMnemonic02": "Debes escribir tu frase de recuperación secreta en un papel y almacenarla en un lugar seguro. No la almacenes en un archivo en tu dispositivo ni en ningún otro lugar electrónico. Si pierdes tu frase de recuperación secreta, podrías perder permanentemente el acceso a tu cartera y tus monedas Wit.", + "generateMnemonic03": "Nunca debes compartir tu frase de recuperación secreta con nadie. Si alguien encuentra o ve tu frase de recuperación secreta, tendrá acceso completo a tu cartera y tus monedas Wit.", + "generateMnemonicHeader": "Escribe tu frase de recuperación secreta", "generateXprv": "Generar Xprv", - "enterYourPassword": "Escriba su contraseña", - "exportXprv": "Exportar Xprv", - "messageSigning": "Firma de mensajes", - "signMessage": "Signo Mensaje", - "yourMessage": "Tu mensaje...", - "messageToBeSigned": "Mensaje a firmar", - "copyJson": "Copiar JSON", - "errorSigning": "Mensaje de error al firmar", - "messageSigning01": "Demuestre la propiedad de su dirección añadiendo su firma a un mensaje.", - "walletConfigHeader": "Exportar la clave Xprv de mi cartera", - "walletConfig01": "Tu clave Xprv te permite exportar y hacer una copia de seguridad de tu cartera en cualquier momento después de crearla.", - "walletConfig02": "En términos de privacidad, tu clave Xprv es equivalente a una frase de recuperación secreta. No la compartas con nadie y nunca la almacenes en un archivo en tu dispositivo ni en ningún otro lugar electrónico.", - "walletConfig03": "Tu clave Xprv estará protegida con la contraseña a continuación. Al importar la clave Xprv en esta u otra aplicación, se te pedirá que escribas esa misma contraseña.", "genNewAddressLabel": "Generar nueva dirección", - "copyAddressLabel": "Copiar dirección seleccionada", - "copyAddressConfirmed": "¡Dirección copiada!", - "generatedAddresses": "Direcciones generadas", - "generatedAddress": "Dirección generada", - "invalidXprv": "Xprv inválido:", - "invalidXprvBlank": "El campo está en blanco", - "invalidXprvStart": "debe comenzar con \"xprv1\"", + "history": "Historia", + "importMnemonic01": "Escribe tu frase de recuperación secreta a continuación. Parece una lista de 12 palabras aparentemente aleatorias.", + "importMnemonicHeader": "Importar cartera desde la frase de recuperación secreta", + "importMnemonicLabel": "Importar cartera desde la frase de recuperación secreta", + "importWalletHeader": "", + "importWalletLabel": "Importar cartera", + "importXprv01": "Xprv es un formato de intercambio de claves que codifica y protege tu cartera con una contraseña. Las claves Xprv se ven como una larga secuencia de letras y números aparentemente aleatorios, precedidos por \"xprv\".", + "importXprv02": "Para importar tu cartera desde una clave Xprv encriptada con una contraseña, debes escribir la clave misma y su contraseña a continuación:", + "importXprvHeader": "Importar cartera desde una clave Xprv", + "importXprvLabel": "Importar desde la clave Xprv", "initializingWallet": "Inicializando cartera.", - "internalBalance": "Saldo interno", - "internalBalanceHint": "El saldo interno corresponde a la suma del saldo disponible en todas las cuentas de cambio", - "okLabel": "Aceptar", - "passwordDescription": "Esta contraseña encripta tu archivo xprv. Se te pedirá que ingreses esta contraseña si deseas importar este xprv como copia de seguridad.", "inputAmountHint": "Ingresar un monto", - "inputYourPassword": "Ingresa tu contraseña", "inputPasswordPrompt": "Por favor, ingresa la contraseña de tu cartera.", - "showPassword": "Mostrar contraseña", + "inputs": "Insumos", + "inputYourPassword": "Ingresa tu contraseña", + "internalBalance": "Saldo interno", + "internalBalanceHint": "El saldo interno corresponde a la suma del saldo disponible en todas las cuentas de cambio", + "invalidPassword": "Contraseña inválida", + "invalidXprv": "Xprv inválido:", + "invalidXprvBlank": "El campo está en blanco", + "invalidXprvStart": "debe comenzar con \"xprv1\"", "launchUrlError": "No se pudo abrir {error}", + "jsonCopied": "JSON copiado!", "@launchUrlError": { "placeholders": { "error": { - "type": "String", - "example": "error de URL" + "example": "error de URL", + "type": "String" } } }, - "balance": "saldo", - "currentAddress": "dirección actual", - "copyAddressToClipboard": "Copiar dirección en el portapapeles", - "addressCopied": "¡Dirección copiada!", - "settings": "Ajustes", - "transactionDetails": "Detalles de la transacción", - "status": "Estado", - "transactionId": "ID de la transacción", - "epoch": "Época", - "type": "Tipo", - "feesPayed": "Comisiones pagadas", - "feesCollected": "Comisiones cobradas", - "timestamp": "Marca de tiempo", - "inputs": "Insumos", - "outputs": "Salidas", - "from": "de", - "to": "a", + "lightMode": "Modo claro", + "lockWalletLabel": "Bloquear cartera", + "lockYourWallet": "Bloquea tu cartera", + "messageSigning": "Firma de mensajes", + "messageSigning01": "Demuestre la propiedad de su dirección añadiendo su firma a un mensaje.", + "messageToBeSigned": "Mensaje a firmar", + "minerFeeHint": "Por defecto, la tarifa Absoluta está seleccionada. La comisión ponderada la calcula automáticamente el monedero teniendo en cuenta la congestión de la red y el peso de la transacción multiplicado por el valor seleccionado como personalizado.", + "minerFeeInputHint": "Introduzca la tasa minera", + "nameLabel": "Nombre", + "noTransactions": "¡Aún no tienes transacciones!", - "transaction": "Transacción", - "forgetPassword": "¿Has olvidado tu contraseña?, ¡Puedes borrar tu monedero y configurar uno nuevo!", - "reestablishWallet": "Restablecer cartera", - "send": "Enviar", - "history": "Historia", + "okLabel": "Aceptar", + "outputs": "Salidas", + "passwordDescription": "Esta contraseña encripta tu archivo xprv. Se te pedirá que ingreses esta contraseña si deseas importar este xprv como copia de seguridad.", + "passwordLabel": "Contraseña", + "preferenceTabs": "{selectedTab, select, general{General} wallet{Cartera} other{unused}}", + "@preferenceTabs": { + "placeholders": { + "selectedTab": { + "type": "String" + } + } + }, + "readCarefully": "Por favor, lea atentamente antes de continuar. Su atención es crucial.", "receive": "Recibir", - "walletTypeHDLabel": "HD Cartera", - "walletTypeNodeLabel": "Nodo", - "address": "Dirección", "recipientAddress": "Dirección del receptor", - "amount": "Cantidad", - "minerFeeInputHint": "Introduzca la tasa minera", - "minerFeeHint": "Por defecto, la tarifa Absoluta está seleccionada. La comisión ponderada la calcula automáticamente el monedero teniendo en cuenta la congestión de la red y el peso de la transacción multiplicado por el valor seleccionado como personalizado.", - "chooseMinerFee": "Elija la tasa minera que desee", - "signAndSend": "Firmar y enviar", - "cancel": "Cancelar", - "tryAgain": "¡Inténtalo de nuevo!", - "error": "Error", - "errorTransaction": "Error al enviar la transacción, ¡inténtelo de nuevo!", - "errorReestablish": "Se ha producido un error al restablecer myWitWallet, inténtalo de nuevo.", "reestablish": "Restablecer", - "readCarefully": "Por favor, lea atentamente antes de continuar. Su atención es crucial.", - "reestablishYourWallet": "Restablezca su cartera", "reestablishInstructions": "Al hacer clic en \"Continuar\" se eliminarán permanentemente los datos de su monedero actual. Si continúa, tendrá que importar un monedero existente o crear uno nuevo para acceder a sus fondos.", "reestablishSteps01": "Asegúrese de que ha almacenado su frase semilla de recuperación o Xprv.", "reestablishSteps02": "Haga clic en \"Continuar\" para borrar su almacenamiento e importar su monedero de nuevo.", - "whatToDo": "¿Qué hacer?", - "deleteStorageWarning": "Tu almacenamiento está a punto de ser eliminado permanentemente.", "reestablishSucess": "¡myWitWallet se ha restablecido con éxito!", - "cancelAuthentication": "Cancelar autentificación", - "authenticateWithBiometrics": "Autenticación biométrica", - "enableLoginWithBiometrics": "Inicio de sesión con datos biométricos", - "txnSigning": "Transacción de canto", - "txnSigning01": "Se está firmando la transacción", - "txnSending": "Transacción de envío", - "txnSending01": "La transacción se está enviando", - "txnSuccess": "¡Transacción enviada con éxito!", - "txnCheckStatus": "Compruebe el estado de la transacción en el Explorador de bloques de Witnet:", - "txnDetails": "Detalles de la transacción", - "drSolved": "Solicitudes de datos resueltas", - "blocksMined": "Bloques extraídos", + "reestablishWallet": "Restablecer cartera", + "reestablishYourWallet": "Restablezca su cartera", + "scanAqrCode": "Escanear un código QR", + "scanQrCodeLabel": "Escanear código QR", + "selectImportOptionHeader": "Importar tu cartera", + "send": "Enviar", + "settings": "Ajustes", + "sheikah": "Sheikah", + "showPassword": "Mostrar contraseña", + "showWalletList": "Mostrar lista de carteras", + "signAndSend": "Firmar y enviar", + "signMessage": "Signo Mensaje", + "status": "Estado", + "theme": "Tema", + "timestamp": "Marca de tiempo", + "to": "a", "totalFeesPaid": "Total de tasas pagadas", "totalMiningRewards": "Recompensas mineras totales", - "dashboardViewSteps": "{selectedIndex, select, transactions{Transacciones} stats{Estadísticas} other{unused}}", - "@dashboardViewSteps": { + "transaction": "Transacción", + "transactionDetails": "Detalles de la transacción", + "transactionId": "ID de la transacción", + "transactionsFound": "Transacciones encontradas:", + "tryAgain": "¡Inténtalo de nuevo!", + "txnCheckStatus": "Compruebe el estado de la transacción en el Explorador de bloques de Witnet:", + "txnDetails": "Detalles de la transacción", + "txnSending": "Transacción de envío", + "txnSending01": "La transacción se está enviando", + "txnSigning": "Transacción de canto", + "txnSigning01": "Se está firmando la transacción", + "txnStatus": "{feeType, select, pending{pendiente} mined{minado} confirmed{confirmado} other{}}", + "@txnStatus": { "placeholders": { - "selectedIndex": { + "feeType": { "type": "String" } } }, - "fee": "Tasa", - "close": "cerrar", - "scanAqrCode": "Escanear un código QR", - "preferenceTabs": "{selectedTab, select, general{General} wallet{Cartera} other{unused}}", - "@preferenceTabs": { - "placeholders":{ - "selectedTab": { + "txnSuccess": "¡Transacción enviada con éxito!", + "type": "Tipo", + "unlockWallet": "Desbloquear cartera", + "verifyLabel": "Verificar", + "versionNumber": "Versión {versionNumber}", + "@versionNumber": { + "placeholders": { + "versionNumber": { + "example": "0.0.0-dev", "type": "String" } } @@ -223,28 +229,27 @@ } } }, - "estimatedFeeOptions": "{feeOption, select, stinky{Apestoso} low{Bajo} medium{Medio} high{High} opulent{Alta} custom{A medida} other{}}", - "@estimatedFeeOptions": { - "placeholders": { - "feeOption": { - "type": "String" - } - } - }, - "feeTypeOptions": "{feeType, select, absolute{Absoluto} weighted{Ponderado} other{}}", - "@feeTypeOptions": { - "placeholders": { - "feeType": { - "type": "String" - } - } - }, - "txnStatus": "{feeType, select, pending{pendiente} mined{minado} confirmed{confirmado} other{}}", - "@txnStatus": { - "placeholders": { - "feeType": { - "type": "String" - } - } - } -} + "walletConfig01": "Tu clave Xprv te permite exportar y hacer una copia de seguridad de tu cartera en cualquier momento después de crearla.", + "walletConfig02": "En términos de privacidad, tu clave Xprv es equivalente a una frase de recuperación secreta. No la compartas con nadie y nunca la almacenes en un archivo en tu dispositivo ni en ningún otro lugar electrónico.", + "walletConfig03": "Tu clave Xprv estará protegida con la contraseña a continuación. Al importar la clave Xprv en esta u otra aplicación, se te pedirá que escribas esa misma contraseña.", + "walletConfigHeader": "Exportar la clave Xprv de mi cartera", + "walletDetail01": "Puedes hacer un mejor seguimiento de tus diferentes carteras dándoles a cada una su propio nombre y descripción.", + "walletDetail02": "Los nombres de las carteras facilitan cambiar rápidamente de una cartera a otra. Las descripciones de las carteras pueden ser más detalladas y describir el propósito de una cartera u otros metadatos.", + "walletDetailHeader": "Identifica tu cartera", + "walletNameHint": "Mis primeros millones de Wits", + "walletSecurity01": "Por favor, lee con atención antes de continuar.", + "walletSecurity02": "Una cartera es una aplicación que mantiene seguras tus credenciales y te permite interactuar con la cadena de bloques de Witnet. Te permite transferir y recibir Wit de manera sencilla.", + "walletSecurity03": "Nunca debes compartir tu frase de recuperación con nadie. Nosotros en Witnet no almacenamos tu frase de recuperación y nunca te pediremos que la compartas con nosotros. Si pierdes tu frase de recuperación, perderás permanentemente el acceso a tu cartera y a tus fondos.", + "walletSecurity04": "Si alguien encuentra o ve tu frase de recuperación, tendrá acceso a tu cartera y a todos tus fondos.", + "walletSecurity05": "Recomendamos almacenar tu frase de recuperación en papel en un lugar seguro. No la almacenes en un archivo en tu computadora ni en ningún lugar electrónico.", + "walletSecurity06": "Al aceptar estos avisos, te comprometes a cumplir con las restricciones explicadas y a firmar digitalmente tu conformidad utilizando tu cartera de Witnet.", + "walletSecurityConfirmLabel": "¡Seré cuidadoso, lo prometo!", + "walletSecurityHeader": "Seguridad de la cartera", + "walletTypeHDLabel": "HD Cartera", + "walletTypeNodeLabel": "Nodo", + "welcome": "Bienvenido", + "whatToDo": "¿Qué hacer?", + "xprvInputHint": "Tu clave Xprv (comienza con xprv...)", + "xprvOrigin": "Origen de Xprv", + "yourMessage": "Tu mensaje..." +} \ No newline at end of file diff --git a/lib/screens/dashboard/view/dashboard_screen.dart b/lib/screens/dashboard/view/dashboard_screen.dart index 6ee25250..49ec5df7 100644 --- a/lib/screens/dashboard/view/dashboard_screen.dart +++ b/lib/screens/dashboard/view/dashboard_screen.dart @@ -19,14 +19,6 @@ enum DashboardViewSteps { stats, } -Map _localizedDashboardSteps(BuildContext context) { - return { - localization.dashboardViewSteps('transactions'): - DashboardViewSteps.transactions, - localization.dashboardViewSteps('stats'): DashboardViewSteps.stats, - }; -} - class DashboardScreen extends StatefulWidget { static final route = '/dashboard'; @override @@ -49,8 +41,8 @@ class DashboardScreenState extends State ApiDatabase database = Locator.instance.get(); ScrollController scrollController = ScrollController(keepScrollOffset: true); ExplorerBloc? explorerBlock; - - String? selectedItem; + String selectedItem = + localizedDashboardSteps[DashboardViewSteps.transactions]!; @override void initState() { @@ -133,8 +125,8 @@ class DashboardScreenState extends State } Widget buildMainDashboardContent(ThemeData theme) { - if (_localizedDashboardSteps(context)[selectedItem]! == - DashboardViewSteps.transactions) { + if (localizedDashboardSteps[DashboardViewSteps.transactions]! == + selectedItem) { return buildTransactionsView(); } return Stats(currentWallet: currentWallet!); @@ -151,13 +143,16 @@ class DashboardScreenState extends State crossAxisAlignment: CrossAxisAlignment.start, children: [ StepBar( - selectedItem: selectedItem ?? - _localizedDashboardSteps(context).keys.first, - listItems: _localizedDashboardSteps(context).keys.toList(), + selectedItem: selectedItem, + listItems: localizedDashboardSteps.values.toList(), actionable: true, onChanged: (item) => { scrollController.jumpTo(0.0), - setState(() => selectedItem = item), + setState( + () => selectedItem = localizedDashboardSteps.entries + .firstWhere((element) => element.value == item) + .value, + ), }), SizedBox(height: 16), buildMainDashboardContent(theme) @@ -168,10 +163,6 @@ class DashboardScreenState extends State @override Widget build(BuildContext context) { - if (selectedItem == null) { - selectedItem = _localizedDashboardSteps(context).keys.first; - } - return BlocConsumer( builder: (BuildContext context, ExplorerState state) { return DashboardLayout( diff --git a/lib/screens/preferences/export_signed_msg.dart b/lib/screens/preferences/export_signed_msg.dart index 379c8999..5b6606ca 100644 --- a/lib/screens/preferences/export_signed_msg.dart +++ b/lib/screens/preferences/export_signed_msg.dart @@ -3,6 +3,7 @@ import 'dart:convert'; import 'package:dart_date/dart_date.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; +import 'package:my_wit_wallet/constants.dart'; import 'package:my_wit_wallet/util/storage/path_provider_interface.dart'; import 'package:my_wit_wallet/widgets/PaddedButton.dart'; import 'package:my_wit_wallet/widgets/dashed_rect.dart'; @@ -63,7 +64,7 @@ class ExportSignMessageState extends State { }), SizedBox(height: 16), PaddedButton( - text: 'Export JSON', + text: localization.exportJson, type: ButtonType.primary, isLoading: false, padding: EdgeInsets.only(bottom: 8), @@ -73,7 +74,7 @@ class ExportSignMessageState extends State { ), SizedBox(height: 8), PaddedButton( - text: 'Copy JSON', + text: localization.copyJson, type: ButtonType.secondary, isLoading: false, padding: EdgeInsets.only(bottom: 16), @@ -83,7 +84,7 @@ class ExportSignMessageState extends State { if (await Clipboard.hasStrings()) { ScaffoldMessenger.of(context).clearSnackBars(); ScaffoldMessenger.of(context) - .showSnackBar(buildCopiedSnackbar(theme, 'JSON copied!')); + .showSnackBar(buildCopiedSnackbar(theme, localization.jsonCopied)); } }, ), diff --git a/lib/screens/preferences/preferences_screen.dart b/lib/screens/preferences/preferences_screen.dart index 456aa29d..58aaf1ee 100644 --- a/lib/screens/preferences/preferences_screen.dart +++ b/lib/screens/preferences/preferences_screen.dart @@ -17,18 +17,11 @@ enum ConfigSteps { wallet, } -Map _localizedConfigSteps(BuildContext context) { - return { - localization.preferenceTabs('general'): ConfigSteps.general, - localization.preferenceTabs('wallet'): ConfigSteps.wallet, - }; -} - class _PreferencePageState extends State { ScrollController scrollController = ScrollController(keepScrollOffset: false); - String? selectedItem; - + ConfigSteps currentStep = ConfigSteps.general; + String selectedItem = localizedConfigSteps[ConfigSteps.general]!; @override void initState() { super.initState(); @@ -41,14 +34,9 @@ class _PreferencePageState extends State { Widget _buildConfigView() { Widget view = GeneralConfig(); - if (selectedItem == null) { - selectedItem = _localizedConfigSteps(context).keys.first; - view = GeneralConfig(); - } else if (_localizedConfigSteps(context)[selectedItem]! == - ConfigSteps.general) { + if (localizedConfigSteps[ConfigSteps.general] == selectedItem) { view = GeneralConfig(); - } else if (_localizedConfigSteps(context)[selectedItem]! == - ConfigSteps.wallet) { + } else if (localizedConfigSteps[ConfigSteps.wallet] == selectedItem) { view = WalletConfig(scrollController: scrollController); } else { return GeneralConfig(); @@ -58,13 +46,19 @@ class _PreferencePageState extends State { crossAxisAlignment: CrossAxisAlignment.start, children: [ StepBar( - selectedItem: - selectedItem ?? _localizedConfigSteps(context).keys.first, - listItems: _localizedConfigSteps(context).keys.toList(), + selectedItem: selectedItem, + listItems: localizedConfigSteps.values.toList(), actionable: true, onChanged: (item) => { scrollController.jumpTo(0.0), - setState(() => selectedItem = item), + setState(() { + selectedItem = localizedConfigSteps.entries + .firstWhere((element) => element.value == item) + .value; + currentStep = localizedConfigSteps.entries + .firstWhere((element) => element.value == item) + .key; + }), }), SizedBox(height: 16), view, diff --git a/lib/screens/send_transaction/send_vtt_screen.dart b/lib/screens/send_transaction/send_vtt_screen.dart index d74604d6..092ad1e3 100644 --- a/lib/screens/send_transaction/send_vtt_screen.dart +++ b/lib/screens/send_transaction/send_vtt_screen.dart @@ -27,14 +27,6 @@ enum VTTsteps { Review, } -Map _localizedVTTsteps(BuildContext context) { - return { - localization.vttSendSteps('Transaction'): VTTsteps.Transaction, - localization.vttSendSteps('MinerFee'): VTTsteps.MinerFee, - localization.vttSendSteps('Review'): VTTsteps.Review, - }; -} - class CreateVttScreenState extends State with TickerProviderStateMixin { GlobalKey transactionFormState = @@ -52,7 +44,7 @@ class CreateVttScreenState extends State FeeType? savedFeeType; ScrollController scrollController = ScrollController(keepScrollOffset: false); - String? selectedItem; + String selectedItem = localizedVTTsteps[VTTsteps.Transaction]!; @override void initState() { @@ -81,16 +73,11 @@ class CreateVttScreenState extends State } void goToNextStep() { - setState(() { - setOngoingTransaction(); - }); - VTTsteps currentStep = _localizedVTTsteps(context)[selectedItem]!; - if (currentStep.index + 1 < VTTsteps.values.length) { + int currentStep = localizedVTTsteps.values.toList().indexOf(selectedItem); + if (currentStep + 1 < VTTsteps.values.length) { scrollController.jumpTo(0.0); setState(() { - selectedItem = - _localizedVTTsteps(context).keys.elementAt(currentStep.index + 1); - setOngoingTransaction(); + selectedItem = localizedVTTsteps.values.elementAt(currentStep + 1); }); } } @@ -108,7 +95,9 @@ class CreateVttScreenState extends State } bool _isNextStepAllow() { - VTTsteps currentStep = _localizedVTTsteps(context)[selectedItem]!; + VTTsteps currentStep = localizedVTTsteps.entries + .firstWhere((element) => element.value == selectedItem) + .key; bool isTransactionFormValid = currentStep == VTTsteps.Transaction && (transactionFormState.currentState != null && transactionFormState.currentState!.validateForm(force: true)); @@ -194,10 +183,9 @@ class CreateVttScreenState extends State } Widget stepToBuild() { - if (selectedItem == null) { - return _recipientStep(); - } - VTTsteps currentStep = _localizedVTTsteps(context)[selectedItem]!; + VTTsteps currentStep = localizedVTTsteps.entries + .firstWhere((element) => element.value == selectedItem) + .key; if (currentStep == VTTsteps.Transaction) { return _recipientStep(); } else if (currentStep == VTTsteps.MinerFee) { @@ -212,13 +200,14 @@ class CreateVttScreenState extends State crossAxisAlignment: CrossAxisAlignment.start, children: [ StepBar( - listItems: _localizedVTTsteps(context).keys.toList(), - selectedItem: - selectedItem ?? _localizedVTTsteps(context).keys.first, + listItems: localizedVTTsteps.values.toList(), + selectedItem: selectedItem, actionable: false, onChanged: (item) => { setState(() { - selectedItem = item; + selectedItem = localizedVTTsteps.entries + .firstWhere((element) => element.value == item) + .value; setOngoingTransaction(); }), }), @@ -272,9 +261,6 @@ class CreateVttScreenState extends State @override Widget build(BuildContext context) { - if (selectedItem == null) { - selectedItem = _localizedVTTsteps(context).keys.first; - } return BlocBuilder( builder: (context, state) { return _dashboardBlocListener(); diff --git a/lib/widgets/witnet/transactions/value_transfer/create_dialog_box/vtt_builder/02_select_miner_fee.dart b/lib/widgets/witnet/transactions/value_transfer/create_dialog_box/vtt_builder/02_select_miner_fee.dart index f50b2525..917e94fb 100644 --- a/lib/widgets/witnet/transactions/value_transfer/create_dialog_box/vtt_builder/02_select_miner_fee.dart +++ b/lib/widgets/witnet/transactions/value_transfer/create_dialog_box/vtt_builder/02_select_miner_fee.dart @@ -52,8 +52,9 @@ class SelectMinerFeeStepState extends State ValidationUtils validationUtils = ValidationUtils(); List _formFocusElements() => [_minerFeeFocusNode]; bool _connectionError = false; - EstimatedFeeOptions? _selectedFeeOption; + EstimatedFeeOptions? _selectedFeeOption = EstimatedFeeOptions.Medium; + /// Overrides @override void initState() { super.initState(); @@ -61,8 +62,18 @@ class SelectMinerFeeStepState extends State vsync: this, duration: const Duration(milliseconds: 400), ); - _minerFeeOptionsNanoWit = - BlocProvider.of(context).minerFeeOptions; + VTTCreateBloc vttCreateBloc = BlocProvider.of(context); + _minerFeeOptionsNanoWit = vttCreateBloc.minerFeeOptions; + + if (widget.savedFeeAmount != null) { + if (_minerFeeOptionsNanoWit.containsValue(widget.savedFeeAmount)) { + _selectedFeeOption = _minerFeeOptionsNanoWit.entries + .firstWhere((element) => element.value == widget.savedFeeAmount) + .key; + } else { + _selectedFeeOption = EstimatedFeeOptions.Custom; + } + } WidgetsBinding.instance.addPostFrameCallback( (_) => {widget.nextAction(next), _setSavedFeeData()}); } @@ -76,13 +87,16 @@ class SelectMinerFeeStepState extends State } int _minerFeeWitToNanoWitNumber() { + num number = 0; try { - final number = num.parse(_minerFeeWit.value) - .standardizeWitUnits( - outputUnit: WitUnit.nanoWit, inputUnit: WitUnit.Wit) - .toBigInt() - .toInt(); - return _minerFeeWit.value != '' ? number : 0; + if (num.tryParse(_minerFeeWit.value) != null) { + number = num.parse(_minerFeeWit.value) + .standardizeWitUnits( + outputUnit: WitUnit.nanoWit, inputUnit: WitUnit.Wit) + .toBigInt() + .toInt(); + } + return number.toInt(); } catch (e) { return 0; } @@ -99,20 +113,21 @@ class SelectMinerFeeStepState extends State } } - bool _isAbsoluteFee() { - return _feeType == FeeType.Absolute; - } - void _setSavedFeeData() { if (widget.savedFeeType != null) { - _setFeeType(widget.savedFeeType); + _setFeeType(widget.savedFeeType ?? FeeType.Absolute); selectedIndex = widget.savedFeeType == FeeType.Absolute ? 0 : 1; } - String savedFee = _nanoWitFeeToWit(widget.savedFeeAmount ?? '1'); - _minerFeeController.text = savedFee; + String savedFee = widget.savedFeeAmount ?? + _minerFeeOptionsNanoWit[_selectedFeeOption] ?? + _minerFeeWit.value; + setState(() { setMinerFeeValue(savedFee, validate: false); + _minerFeeController.text = savedFee; }); + _updateTxFee(); + // BlocProvider.of(context).updateFee(_feeType, int.parse(savedFee)); } void setMinerFeeValue(String amount, {bool? validate}) { @@ -125,18 +140,18 @@ class SelectMinerFeeStepState extends State value: amount, weightedAmount: _feeType == FeeType.Weighted ? weightedFeeAmount : null, allowZero: true); + // _updateTxFee(); } void _setFeeType(FeeType? type) { - setState(() { - _feeType = type == FeeType.Absolute ? type! : FeeType.Weighted; - }); + setState(() => _feeType = type ?? FeeType.Absolute); } void _updateTxFee() { - if (_isAbsoluteFee()) { + if (_feeType == FeeType.Absolute) { _setAbsoluteFee(); - } else { + } + if (_feeType == FeeType.Weighted) { _setWeightedFee(); } validateForm(force: true); @@ -152,22 +167,6 @@ class SelectMinerFeeStepState extends State feeType: FeeType.Weighted, feeNanoWit: _minerFeeWitToNanoWitNumber())); } - Map localizedFeeOptions(BuildContext context) => - { - localization.estimatedFeeOptions('stinky'): EstimatedFeeOptions.Stinky, - localization.estimatedFeeOptions('low'): EstimatedFeeOptions.Low, - localization.estimatedFeeOptions('medium'): EstimatedFeeOptions.Medium, - localization.estimatedFeeOptions('high'): EstimatedFeeOptions.High, - localization.estimatedFeeOptions('opulent'): - EstimatedFeeOptions.Opulent, - localization.estimatedFeeOptions('custom'): EstimatedFeeOptions.Custom, - }; - - Map localizedFeeTypeOptions(BuildContext context) => { - FeeType.Absolute: localization.feeTypeOptions('absolute'), - FeeType.Weighted: localization.feeTypeOptions('weighted'), - }; - bool formValidation() { return _minerFeeWit.isValid; } @@ -202,49 +201,47 @@ class SelectMinerFeeStepState extends State availableNanoWit: balanceInfo.availableNanoWit); String? errorText = _feePriority.validator(value, avoidWeightedAmountCheck: true); - if (_selectedFeeOption != EstimatedFeeOptions.Custom) { - setMinerFeeValue(value); - } + return ClickableBox( label: label, - isSelected: _selectedFeeOption == localizedFeeOptions(context)[label], - error: _selectedFeeOption != localizedFeeOptions(context)[label] - ? errorText - : null, + isSelected: label == localizedFeeOptions[_selectedFeeOption], + error: + label != localizedFeeOptions[_selectedFeeOption] ? errorText : null, value: value, content: [ Expanded( flex: 1, child: Text(label, style: theme.textTheme.bodyMedium)), Expanded( flex: 0, - child: Text( - EstimatedFeeOptions.Custom != - localizedFeeOptions(context)[label] - ? '$value ${WIT_UNIT[WitUnit.Wit]}' - : '', + child: Text('$value ${WIT_UNIT[WitUnit.Wit]}', style: theme.textTheme.bodyMedium)), ], onClick: (value) => { - _setFeeType(FeeType.Absolute), setState(() { + _selectedFeeOption = localizedFeeOptions.entries + .firstWhere((element) => element.value == label) + .key; + _setSavedFeeData(); setMinerFeeValue(value); _minerFeeController.text = value; - _selectedFeeOption = localizedFeeOptions(context)[label]!; + _updateTxFee(); }), - _updateTxFee(), }, ); } Widget _buildFeeOptionsButtonGroup(BuildContext context) { + // TODO: return ListView.builder( shrinkWrap: true, padding: EdgeInsets.zero, physics: NeverScrollableScrollPhysics(), - itemCount: _minerFeeOptionsNanoWit.length, + itemCount: localizedFeeOptions.length, itemBuilder: (context, index) { - String? fee = _minerFeeOptionsNanoWit.values.toList()[index]; - String label = localizedFeeOptions(context).keys.toList()[index]; + EstimatedFeeOptions currentFeeOption = + localizedFeeOptions.keys.toList()[index]; + String? fee = _minerFeeOptionsNanoWit[currentFeeOption]; + String label = localizedFeeOptions[currentFeeOption]!; return _buildFeeOptionButton(label, _nanoWitFeeToWit(fee ?? '1')); }, ); @@ -277,6 +274,7 @@ class SelectMinerFeeStepState extends State widget.goNext(); }, onEditingComplete: () { + _setSavedFeeData(); _setAbsoluteFee(); }, ), @@ -302,6 +300,7 @@ class SelectMinerFeeStepState extends State child: Icon(FontAwesomeIcons.circleQuestion, size: 12, color: extendedTheme?.inputIconColor))), ), + // TODO: ToggleSwitch( minWidth: 90.0, inactiveBgColor: extendedTheme?.switchInactiveBg, @@ -313,13 +312,13 @@ class SelectMinerFeeStepState extends State borderWidth: 1.0, borderColor: [extendedTheme.switchBorderColor!], totalSwitches: 2, - labels: localizedFeeTypeOptions(context).values.toList(), + labels: localizedFeeTypeOptions.values.toList(), onToggle: (index) { setState(() { selectedIndex = index; + _setFeeType(FeeType.values[index]); + _updateTxFee(); }); - _setFeeType(FeeType.values[index]); - _updateTxFee(); }, ), ], @@ -332,9 +331,6 @@ class SelectMinerFeeStepState extends State @override Widget build(BuildContext context) { - if (_selectedFeeOption == null) { - _selectedFeeOption = localizedFeeOptions(context).values.first; - } final theme = Theme.of(context); return BlocListener( listenWhen: (previousState, currentState) { diff --git a/lib/widgets/witnet/transactions/value_transfer/create_dialog_box/vtt_builder/03_review_step.dart b/lib/widgets/witnet/transactions/value_transfer/create_dialog_box/vtt_builder/03_review_step.dart index 8e12996a..7b72a516 100644 --- a/lib/widgets/witnet/transactions/value_transfer/create_dialog_box/vtt_builder/03_review_step.dart +++ b/lib/widgets/witnet/transactions/value_transfer/create_dialog_box/vtt_builder/03_review_step.dart @@ -89,7 +89,7 @@ class ReviewStepState extends State builder: (context, state) { if (state.vttCreateStatus == VTTCreateStatus.needPasswordValidation) { unlockKeychainModal( - title: 'Enter your password to sign the transaction', + title: localization.enterYourPassword, imageName: 'signing-transaction', theme: theme, context: context,