1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 09:52:26 +01:00

better organization of locale file; i18n in more view files

This commit is contained in:
Nick Doiron 2018-01-23 22:14:47 -10:00
parent bad70eb1b3
commit 99898ac775
26 changed files with 629 additions and 260 deletions

View File

@ -1,71 +1,224 @@
{ {
"appName": { "accept": {
"message": "MetaMask", "message": "Accept"
"description": "The name of the application" },
"account": {
"message": "Account:"
},
"accDetails": {
"message": "Account Details"
},
"accountName": {
"message": "Account Name"
},
"address": {
"message": "Address"
},
"addToken": {
"message": "Add Token"
},
"amountPlusGas": {
"message": "Amount + Gas"
}, },
"appDescription": { "appDescription": {
"message": "Ethereum Identity Management", "message": "Ethereum Identity Management",
"description": "The description of the application" "description": "The description of the application"
}, },
"encryptNewDen": { "appName": {
"message": "Encrypt your new DEN" "message": "MetaMask",
"description": "The name of the application"
}, },
"denExplainer": { "attemptingConnect": {
"message": "Your DEN is your password-encrypted storage within MetaMask." "message": "Attempting to connect to blockchain."
}, },
"importDen": { "available": {
"message": "Import Existing DEN" "message": "Available"
}, },
"createDen": { "back": {
"message": "Create" "message": "Back"
}, },
"newPassword": { "balance": {
"message": "New Password (min 8 chars)" "message": "Balance:"
},
"balanceIsInsufficientGas": {
"message": "Insufficient balance for current gas total"
},
"borrowDharma": {
"message": "Borrow With Dharma (Beta)"
},
"buyButton": {
"message": "Buy"
},
"buyCoinbase": {
"message": "Buy on Coinbase"
},
"buyCoinbaseExplainer": {
"message": "Coinbase is the worlds most popular way to buy and sell bitcoin, ethereum, and litecoin."
},
"cancel": {
"message": "Cancel"
},
"cancelCaps": {
"message": "CANCEL"
},
"clickCopy": {
"message": "Click to Copy"
},
"confirm": {
"message": "Confirm"
},
"confirmCaps": {
"message": "CONFIRM"
},
"confirmContract": {
"message": "Confirm Contract"
}, },
"confirmPassword": { "confirmPassword": {
"message": "Confirm Password" "message": "Confirm Password"
}, },
"passwordMismatch": { "confirmPasswordSmall": {
"message": "passwords don't match" "message": "confirm password"
}, },
"passwordShort": { "continueToCoinbase": {
"message": "password not long enough" "message": "Continue to Coinbase"
}, },
"myAccounts": { "contractPublished": {
"message": "My Accounts" "message": "Contract Published"
}, },
"logout": { "conversionProgress": {
"message": "Log out" "message": "Conversion in progress"
},
"copiedButton": {
"message": "Copied"
},
"copiedClipboard": {
"message": "Copied to Clipboard"
},
"copiedExclamation": {
"message": "Copied!"
},
"copy": {
"message": "Copy"
},
"copyAddress": {
"message": "Copy Address to clipboard"
},
"copyButton": {
"message": " Copy "
},
"copyPrivateKey": {
"message": "This is your private key (click to copy)"
}, },
"createAccount": { "createAccount": {
"message": "Create Account" "message": "Create Account"
}, },
"importAccount": { "createCaps": {
"message": "Import Account" "message": "CREATE"
}, },
"account": { "createDen": {
"message": "Account:" "message": "Create"
}, },
"infoHelp": { "customGas": {
"message": "Info & Help" "message": "Customize Gas"
}, },
"settings": { "customize": {
"message": "Settings" "message": "Customize"
}, },
"importedCaps": { "customRPC": {
"message": "IMPORTED" "message": "Custom RPC"
}, },
"saveButton": { "defaultNetwork": {
"message": "SAVE" "message": "The default network for Ether transactions is Main Net."
}, },
"cancelButton": { "denExplainer": {
"message": "CANCEL" "message": "Your DEN is your password-encrypted storage within MetaMask."
}, },
"signButton": { "deposit": {
"message": "SIGN" "message": "Deposit"
}, },
"revert": { "depositBTC": {
"message": "Revert" "message": "Deposit your BTC to the address below:"
},
"depositButton": {
"message": "DEPOSIT"
},
"depositEth": {
"message": "Deposit Eth"
},
"depositEther": {
"message": "Deposit Ether"
},
"depositFiat": {
"message": "Deposit with Fiat"
},
"depositFromAccount": {
"message": "Deposit from another account"
},
"depositShapeShift": {
"message": "Deposit with ShapeShift"
},
"depositShapeShiftExplainer": {
"message": "If you own other cryptocurrencies, you can trade and deposit Ether directly into your MetaMask wallet. No Account Needed."
},
"detailsCaps": {
"message": "DETAILS"
},
"directDeposit": {
"message": "Direct Deposit"
},
"directDepositEther": {
"message": "Directly Deposit Ether"
},
"directDepositEtherExplainer": {
"message": "If you already have some Ether, the quickest way to get Ether in your new wallet by direct deposit."
},
"done": {
"message": "Done"
},
"editAccountName": {
"message": "Edit Account Name"
},
"editCaps": {
"message": "EDIT"
},
"encryptNewDen": {
"message": "Encrypt your new DEN"
},
"enterPassword": {
"message": "Enter password"
},
"etherscanView": {
"message": "View account on Etherscan"
},
"exchangeRate": {
"message": "Exchange Rate"
},
"exportPrivateKey": {
"message": "Export Private Key"
},
"exportPrivateKeyLower": {
"message": "Export private key"
},
"exportPrivateKeyWarning": {
"message": "Export private keys at your own risk."
},
"failed": {
"message": "Failed"
},
"fileImportFail": {
"message": "File import not working? Click here!"
},
"from": {
"message": "From"
},
"fromShapeShift": {
"message": "From ShapeShift"
},
"gasFee": {
"message": "Gas Fee"
},
"gasFeeSpecific": {
"message": "Gas fee:"
}, },
"gasLimit": { "gasLimit": {
"message": "Gas Limit" "message": "Gas Limit"
@ -73,103 +226,331 @@
"gasLimitCalculation": { "gasLimitCalculation": {
"message": "We calculate the suggested gas limit based on network success rates." "message": "We calculate the suggested gas limit based on network success rates."
}, },
"gasLimitRequired": {
"message": "Gas Limit Required"
},
"gasLimitTooLow": {
"message": "Gas limit must be at least 21000"
},
"gasPrice": { "gasPrice": {
"message": "Gas Price (GWEI)" "message": "Gas Price (GWEI)"
}, },
"gasPriceCalculation": { "gasPriceCalculation": {
"message": "We calculate the suggested gas prices based on network success rates." "message": "We calculate the suggested gas prices based on network success rates."
}, },
"customGas": { "gasPriceRequired": {
"message": "Customize Gas" "message": "Gas Price Required"
}, },
"balanceIsInsufficientGas": { "getEther": {
"message": "Insufficient balance for current gas total" "message": "Get Ether"
}, },
"gasLimitTooLow": { "here": {
"message": "Gas limit must be at least 21000" "message": "here"
}, },
"editButton": { "hideCaps": {
"message": "Edit" "message": "HIDE"
},
"hideToken": {
"message": "Hide Token"
},
"hideTokenPrompt": {
"message": "Hide Token?"
},
"howToDeposit": {
"message": "How would you like to deposit Ether?"
},
"import": {
"message": "Import"
},
"importAccount": {
"message": "Import Account"
},
"importAnAccount": {
"message": "Import an account"
},
"importCaps": {
"message": "IMPORT"
},
"importDen": {
"message": "Import Existing DEN"
},
"importedCaps": {
"message": "IMPORTED"
},
"infoHelp": {
"message": "Info & Help"
},
"invalidAddress": {
"message": "Invalid address"
},
"invalidGasParams": {
"message": "Invalid Gas Parameters"
},
"invalidInput": {
"message": "Invalid input."
},
"invalidRequest": {
"message": "Invalid Request"
},
"kovan": {
"message": "Kovan Test Network"
},
"limit": {
"message": "Limit"
},
"loading": {
"message": "Loading..."
},
"loadingTokens": {
"message": "Loading Tokens..."
},
"localhost": {
"message": "Localhost 8545"
},
"logout": {
"message": "Log out"
}, },
"looseCaps": { "looseCaps": {
"message": "LOOSE" "message": "LOOSE"
}, },
"addToken": "Add Token", "mainnet": {
"exportPrivateKey": "Export Private Key", "message": "Main Ethereum Network"
"copyAddress": "Copy Address to clipboard", },
"etherscanView": "View account on Etherscan", "message": {
"qrCode": "Show QR Code", "message": "Message"
"accDetails": "Account Details", },
"networks": "Networks", "messageCaps": {
"defaultNetwork": "The default network for Ether transactions is Main Net.", "message": "MESSAGE"
"mainnet": "Main Ethereum Network", },
"unknownNetwork": "Unknown Private Network", "min": {
"rinkeby": "Rinkeby Test Network", "message": "Minimum"
"kovan": "Kovan Test Network", },
"ropsten": "Ropsten Test Network", "myAccounts": {
"localhost": "Localhost 8545", "message": "My Accounts"
"customRPC": "Custom RPC", },
"hideToken": "Hide Token", "needEtherInWallet": {
"copiedClipboard": "Copied to Clipboard", "message": "To interact with decentralized applications using MetaMask, youll need Ether in your wallet."
"detailsCaps": "DETAILS", },
"sendButton": "SEND", "needImportFile": {
"depositButton": "DEPOSIT", "message": "You must select a file to import."
"notStarted": "Not Started", },
"noTransactions": "No Transactions", "needImportPassword": {
"contractPublished": "Contract Published", "message": "You must enter a password for the selected file."
"noTransactionHistory": "No transaction history.", },
"warning": "Warning", "networks": {
"failed": "Failed", "message": "Networks"
"rejected": "Rejected", },
"sigRequested": "Signature Requested", "newAccount": {
"yourSigRequested": "Your signature is being requested", "message": "New Account"
"balance": "Balance:", },
"retryWithMoreGas": "Retry with a higher gas price here", "newContract": {
"takesTooLong": "Taking too long?", "message": "New Contract"
"transactionNumber": "Transaction Number", },
"loadingTokens": "Loading Tokens...", "newPassword": {
"troubleTokenBalances": "We had trouble loading your token balances. You can view them ", "message": "New Password (min 8 chars)"
"here": "here", },
"message": "Message", "newRecipient": {
"signNotice": "Signing this message can have \ndangerous side effects. Only sign messages from \nsites you fully trust with your entire account.\n This dangerous method will be removed in a future version. ", "message": "New Recipient"
"youSign": "You are signing:", },
"conversionProgress": "Conversion in progress", "next": {
"noDeposits": "No deposits received", "message": "Next"
"fromShapeShift": "From ShapeShift", },
"invalidRequest": "Invalid Request", "noAddressForName": {
"status": "Status", "message": "No address has been set for this name."
"limit": "Limit", },
"exchangeRate": "Exchange Rate", "noDeposits": {
"min": "Minimum", "message": "No deposits received"
"available": "Available", },
"unavailable": "Unavailable", "noTransactionHistory": {
"depositBTC": "Deposit your BTC to the address below:", "message": "No transaction history."
"deposit": "Deposit", },
"receive": "Receive", "noTransactions": {
"refundAddress": "Your Refund Address", "message": "No Transactions"
"buyButton": "Buy", },
"signMessage": "Sign Message", "notStarted": {
"youSignCaps": "YOU ARE SIGNING", "message": "Not Started"
"messageCaps": "MESSAGE", },
"readMore": "Read more here.", "oldUI": {
"cancel": "Cancel", "message": "Old UI"
"sign": "Sign", },
"accept": "Accept", "oldUIMessage": {
"attemptingConnect": "Attempting to connect to blockchain.", "message": "You have returned to the old UI. You can switch back to the New UI through the option in the top right dropdown menu."
"privateNetwork": "Private Network", },
"invalidInput": "Invalid input.", "or": {
"noAddressForName": "No address has been set for this name.", "message": "or"
"clickCopy": "Click to Copy", },
"copyButton": " Copy ", "passwordMismatch": {
"copiedButton": "Copied", "message": "passwords don't match"
"copy": "Copy", },
"copiedExclamation": "Copied!", "passwordShort": {
"continueToCoinbase": "Continue to Coinbase", "message": "password not long enough"
"depositEth": "Deposit Eth", },
"selectService": "Select Service", "pastePrivateKey": {
"unknownNetworkId": "Unknown network ID", "message": "Paste your private key string here:"
"borrowDharma": "Borrow With Dharma (Beta)", },
"exportPrivateKeyWarning": "Export private keys at your own risk.", "pasteSeed": {
"confirmPasswordSmall": "confirm password", "message": "Paste your seed phrase here!"
"submit": "Submit", },
"privateKeyWarning": {
"message": "Warning: Never disclose this key. Anyone with your private keys can take steal any assets held in your account."
},
"privateNetwork": {
"message": "Private Network"
},
"qrCode": {
"message": "Show QR Code"
},
"readdToken": {
"message": "You can add this token back in the future by going go to “Add token” in your accounts options menu."
},
"readMore": {
"message": "Read more here."
},
"receive": {
"message": "Receive"
},
"recipientAddress": {
"message": "Recipient Address"
},
"refundAddress": {
"message": "Your Refund Address"
},
"rejected": {
"message": "Rejected"
},
"required": {
"message": "Required"
},
"retryWithMoreGas": {
"message": "Retry with a higher gas price here"
},
"revert": {
"message": "Revert"
},
"rinkeby": {
"message": "Rinkeby Test Network"
},
"ropsten": {
"message": "Ropsten Test Network"
},
"sampleAccountName": {
"message": "E.g. My new account"
},
"saveCaps": {
"message": "SAVE"
},
"selectService": {
"message": "Select Service"
},
"sendButton": {
"message": "SEND"
},
"sendTokens": {
"message": "Send Tokens"
},
"sendTokensAnywhere": {
"message": "Send Tokens to anyone with an Ethereum account"
},
"settings": {
"message": "Settings"
},
"shapeshiftBuy": {
"message": "Buy with Shapeshift"
},
"showPrivateKeys": {
"message": "Show Private Keys"
},
"sign": {
"message": "Sign"
},
"signCaps": {
"message": "SIGN"
},
"signMessage": {
"message": "Sign Message"
},
"signNotice": {
"message": "Signing this message can have \ndangerous side effects. Only sign messages from \nsites you fully trust with your entire account.\n This dangerous method will be removed in a future version. "
},
"sigRequested": {
"message": "Signature Requested"
},
"status": {
"message": "Status"
},
"submit": {
"message": "Submit"
},
"takesTooLong": {
"message": "Taking too long?"
},
"testFaucet": {
"message": "Test Faucet"
},
"to": {
"message": "To"
},
"tokenBalance": {
"message": "Your Token Balance is:"
},
"toSpecific": {
"message": "To:"
},
"total": {
"message": "Total"
},
"transactionMemo": {
"message": "Transaction memo (optional)"
},
"transactionNumber": {
"message": "Transaction Number"
},
"transfers": {
"message": "Transfers"
},
"troubleTokenBalances": {
"message": "We had trouble loading your token balances. You can view them "
},
"typePassword": {
"message": "Type Your Password"
},
"uiWelcome": {
"message": "Welcome to the New UI (Beta)"
},
"uiWelcomeMessage": {
"message": "You are now using the new Metamask UI. Take a look around, try out new features like sending tokens, and let us know if you have any issues."
},
"unavailable": {
"message": "Unavailable"
},
"unknown": {
"message": "Unknown"
},
"unknownNetwork": {
"message": "Unknown Private Network"
},
"unknownNetworkId": {
"message": "Unknown network ID"
},
"usedByClients": {
"message": "Used by a variety of different clients"
},
"viewAccount": {
"message": "View Account"
},
"warning": {
"message": "Warning"
},
"whatsThis": {
"message": "What's this?"
},
"yourSigRequested": {
"message": "Your signature is being requested"
},
"youSign": {
"message": "You are signing:"
},
"youSignCaps": {
"message": "YOU ARE SIGNING"
}
} }

View File

@ -26,8 +26,8 @@ JsonImportSubview.prototype.render = function () {
return ( return (
h('div.new-account-import-form__json', [ h('div.new-account-import-form__json', [
h('p', 'Used by a variety of different clients'), h('p', t('usedByClients')),
h('a.warning', { href: HELP_LINK, target: '_blank' }, 'File import not working? Click here!'), h('a.warning', { href: HELP_LINK, target: '_blank' }, t('fileImportFail')),
h(FileInput, { h(FileInput, {
readAs: 'text', readAs: 'text',
@ -42,7 +42,7 @@ JsonImportSubview.prototype.render = function () {
h('input.new-account-import-form__input-password', { h('input.new-account-import-form__input-password', {
type: 'password', type: 'password',
placeholder: 'Enter password', placeholder: t('enterPassword'),
id: 'json-password-box', id: 'json-password-box',
onKeyPress: this.createKeyringOnEnter.bind(this), onKeyPress: this.createKeyringOnEnter.bind(this),
}), }),
@ -52,13 +52,13 @@ JsonImportSubview.prototype.render = function () {
h('button.new-account-create-form__button-cancel', { h('button.new-account-create-form__button-cancel', {
onClick: () => this.props.goHome(), onClick: () => this.props.goHome(),
}, [ }, [
'CANCEL', t('cancelCaps'),
]), ]),
h('button.new-account-create-form__button-create', { h('button.new-account-create-form__button-create', {
onClick: () => this.createNewKeychain.bind(this), onClick: () => this.createNewKeychain.bind(this),
}, [ }, [
'IMPORT', t('importCaps'),
]), ]),
]), ]),
@ -84,7 +84,7 @@ JsonImportSubview.prototype.createNewKeychain = function () {
const { fileContents } = state const { fileContents } = state
if (!fileContents) { if (!fileContents) {
const message = 'You must select a file to import.' const message = t('needImportFile')
return this.props.dispatch(actions.displayWarning(message)) return this.props.dispatch(actions.displayWarning(message))
} }
@ -92,7 +92,7 @@ JsonImportSubview.prototype.createNewKeychain = function () {
const password = passwordInput.value const password = passwordInput.value
if (!password) { if (!password) {
const message = 'You must enter a password for the selected file.' const message = t('needImportPassword')
return this.props.dispatch(actions.displayWarning(message)) return this.props.dispatch(actions.displayWarning(message))
} }

View File

@ -32,7 +32,7 @@ PrivateKeyImportView.prototype.render = function () {
return ( return (
h('div.new-account-import-form__private-key', [ h('div.new-account-import-form__private-key', [
h('span.new-account-create-form__instruction', 'Paste your private key string here:'), h('span.new-account-create-form__instruction', t('pastePrivateKey')),
h('input.new-account-import-form__input-password', { h('input.new-account-import-form__input-password', {
type: 'password', type: 'password',
@ -45,13 +45,13 @@ PrivateKeyImportView.prototype.render = function () {
h('button.new-account-create-form__button-cancel', { h('button.new-account-create-form__button-cancel', {
onClick: () => goHome(), onClick: () => goHome(),
}, [ }, [
'CANCEL', t('cancelCaps'),
]), ]),
h('button.new-account-create-form__button-create', { h('button.new-account-create-form__button-create', {
onClick: () => this.createNewKeychain(), onClick: () => this.createNewKeychain(),
}, [ }, [
'IMPORT', t('importCaps'),
]), ]),
]), ]),

View File

@ -20,11 +20,10 @@ SeedImportSubview.prototype.render = function () {
style: { style: {
}, },
}, [ }, [
`Paste your seed phrase here!`, t('pasteSeed'),
h('textarea'), h('textarea'),
h('br'), h('br'),
h('button', 'Submit'), h('button', t('submit')),
]) ])
) )
} }

View File

@ -21,13 +21,13 @@ class NewAccountCreateForm extends Component {
return h('div.new-account-create-form', [ return h('div.new-account-create-form', [
h('div.new-account-create-form__input-label', {}, [ h('div.new-account-create-form__input-label', {}, [
'Account Name', t('accountName'),
]), ]),
h('div.new-account-create-form__input-wrapper', {}, [ h('div.new-account-create-form__input-wrapper', {}, [
h('input.new-account-create-form__input', { h('input.new-account-create-form__input', {
value: this.state.newAccountName, value: this.state.newAccountName,
placeholder: 'E.g. My new account', placeholder: t('sampleAccountName'),
onChange: event => this.setState({ newAccountName: event.target.value }), onChange: event => this.setState({ newAccountName: event.target.value }),
}, []), }, []),
]), ]),
@ -37,13 +37,13 @@ class NewAccountCreateForm extends Component {
h('button.new-account-create-form__button-cancel', { h('button.new-account-create-form__button-cancel', {
onClick: () => this.props.goHome(), onClick: () => this.props.goHome(),
}, [ }, [
'CANCEL', t('cancelCaps'),
]), ]),
h('button.new-account-create-form__button-create', { h('button.new-account-create-form__button-create', {
onClick: () => this.props.createAccount(newAccountName), onClick: () => this.props.createAccount(newAccountName),
}, [ }, [
'CREATE', t('createCaps'),
]), ]),
]), ]),

View File

@ -42,10 +42,10 @@ AccountDetailsModal.prototype.render = function () {
const { displayedForm, displayForm } = this.props const { displayedForm, displayForm } = this.props
return h('div.new-account', {}, [ return h('div.new-account', {}, [
h('div.new-account__header', [ h('div.new-account__header', [
h('div.new-account__title', 'New Account'), h('div.new-account__title', t('newAccount')),
h('div.new-account__tabs', [ h('div.new-account__tabs', [
@ -55,7 +55,7 @@ AccountDetailsModal.prototype.render = function () {
'new-account__tabs__unselected cursor-pointer': displayedForm !== 'CREATE', 'new-account__tabs__unselected cursor-pointer': displayedForm !== 'CREATE',
}), }),
onClick: () => displayForm('CREATE'), onClick: () => displayForm('CREATE'),
}, 'Create'), }, t('createDen')),
h('div.new-account__tabs__tab', { h('div.new-account__tabs__tab', {
className: classnames('new-account__tabs__tab', { className: classnames('new-account__tabs__tab', {
@ -63,7 +63,7 @@ AccountDetailsModal.prototype.render = function () {
'new-account__tabs__unselected cursor-pointer': displayedForm !== 'IMPORT', 'new-account__tabs__unselected cursor-pointer': displayedForm !== 'IMPORT',
}), }),
onClick: () => displayForm('IMPORT'), onClick: () => displayForm('IMPORT'),
}, 'Import'), }, t('import')),
]), ]),

View File

@ -284,11 +284,11 @@ CustomizeGasModal.prototype.render = function () {
h('div.send-v2__customize-gas__buttons', [ h('div.send-v2__customize-gas__buttons', [
h('div.send-v2__customize-gas__cancel', { h('div.send-v2__customize-gas__cancel', {
onClick: this.props.hideModal, onClick: this.props.hideModal,
}, [t('cancelButton')]), }, [t('cancelCaps')]),
h(`div.send-v2__customize-gas__save${error ? '__error' : ''}`, { h(`div.send-v2__customize-gas__save${error ? '__error' : ''}`, {
onClick: () => !error && this.save(gasPrice, gasLimit, gasTotal), onClick: () => !error && this.save(gasPrice, gasLimit, gasTotal),
}, [t('saveButton')]), }, [t('saveCaps')]),
]), ]),
]), ]),

View File

@ -129,7 +129,7 @@ class AccountDropdowns extends Component {
actions.showEditAccountModal(identity) actions.showEditAccountModal(identity)
}, },
}, [ }, [
t('editButton'), t('editCaps'),
]), ]),
]), ]),

View File

@ -64,12 +64,12 @@ AccountDetailsModal.prototype.render = function () {
h('button.btn-clear.account-modal__button', { h('button.btn-clear.account-modal__button', {
onClick: () => global.platform.openWindow({ url: genAccountLink(address, network) }), onClick: () => global.platform.openWindow({ url: genAccountLink(address, network) }),
}, 'View account on Etherscan'), }, t('etherscanView')),
// Holding on redesign for Export Private Key functionality // Holding on redesign for Export Private Key functionality
h('button.btn-clear.account-modal__button', { h('button.btn-clear.account-modal__button', {
onClick: () => showExportPrivateKeyModal(), onClick: () => showExportPrivateKeyModal(),
}, 'Export private key'), }, t('exportPrivateKeyLower')),
]) ])
} }

View File

@ -59,7 +59,7 @@ AccountModalContainer.prototype.render = function () {
h('i.fa.fa-angle-left.fa-lg'), h('i.fa.fa-angle-left.fa-lg'),
h('span.account-modal-back__text', ' Back'), h('span.account-modal-back__text', ' ' + t('back')),
]), ]),

View File

@ -56,15 +56,15 @@ BuyOptions.prototype.render = function () {
}, [ }, [
h('div.buy-modal-content-title', { h('div.buy-modal-content-title', {
style: {}, style: {},
}, 'Transfers'), }, t('transfers')),
h('div', {}, 'How would you like to deposit Ether?'), h('div', {}, t('howToDeposit')),
]), ]),
h('div.buy-modal-content-options.flex-column.flex-center', {}, [ h('div.buy-modal-content-options.flex-column.flex-center', {}, [
isTestNetwork isTestNetwork
? this.renderModalContentOption(networkName, 'Test Faucet', () => toFaucet(network)) ? this.renderModalContentOption(networkName, t('testFaucet'), () => toFaucet(network))
: this.renderModalContentOption('Coinbase', 'Deposit with Fiat', () => toCoinbase(address)), : this.renderModalContentOption('Coinbase', t('depositFiat'), () => toCoinbase(address)),
// h('div.buy-modal-content-option', {}, [ // h('div.buy-modal-content-option', {}, [
// h('div.buy-modal-content-option-title', {}, 'Shapeshift'), // h('div.buy-modal-content-option-title', {}, 'Shapeshift'),
@ -72,8 +72,8 @@ BuyOptions.prototype.render = function () {
// ]),, // ]),,
this.renderModalContentOption( this.renderModalContentOption(
'Direct Deposit', t('directDeposit'),
'Deposit from another account', t('depositFromAccount'),
() => this.goToAccountDetailsModal() () => this.goToAccountDetailsModal()
), ),
@ -84,7 +84,7 @@ BuyOptions.prototype.render = function () {
background: 'white', background: 'white',
}, },
onClick: () => { this.props.hideModal() }, onClick: () => { this.props.hideModal() },
}, h('div.buy-modal-content-footer#buy-modal-content-footer-text', {}, 'Cancel')), }, h('div.buy-modal-content-footer#buy-modal-content-footer-text', {}, t('cancel'))),
]), ]),
]) ])
} }

View File

@ -6,16 +6,13 @@ const actions = require('../../actions')
const networkNames = require('../../../../app/scripts/config.js').networkNames const networkNames = require('../../../../app/scripts/config.js').networkNames
const ShapeshiftForm = require('../shapeshift-form') const ShapeshiftForm = require('../shapeshift-form')
const DIRECT_DEPOSIT_ROW_TITLE = 'Directly Deposit Ether' const DIRECT_DEPOSIT_ROW_TITLE = t('directDepositEther')
const DIRECT_DEPOSIT_ROW_TEXT = `If you already have some Ether, the quickest way to get Ether in const DIRECT_DEPOSIT_ROW_TEXT = t('directDepositEtherExplainer')
your new wallet by direct deposit.` const COINBASE_ROW_TITLE = t('buyCoinbase')
const COINBASE_ROW_TITLE = 'Buy on Coinbase' const COINBASE_ROW_TEXT = t('buyCoinbaseExplainer')
const COINBASE_ROW_TEXT = `Coinbase is the worlds most popular way to buy and sell bitcoin, const SHAPESHIFT_ROW_TITLE = t('depositShapeShift')
ethereum, and litecoin.` const SHAPESHIFT_ROW_TEXT = t('depositShapeShiftExplainer')
const SHAPESHIFT_ROW_TITLE = 'Deposit with ShapeShift' const FAUCET_ROW_TITLE = t('testFaucet')
const SHAPESHIFT_ROW_TEXT = `If you own other cryptocurrencies, you can trade and deposit Ether
directly into your MetaMask wallet. No Account Needed.`
const FAUCET_ROW_TITLE = 'Test Faucet'
const facuetRowText = networkName => `Get Ether from a faucet for the ${networkName}` const facuetRowText = networkName => `Get Ether from a faucet for the ${networkName}`
function mapStateToProps (state) { function mapStateToProps (state) {
@ -110,10 +107,10 @@ DepositEtherModal.prototype.render = function () {
h('div.deposit-ether-modal__header', [ h('div.deposit-ether-modal__header', [
h('div.deposit-ether-modal__header__title', ['Deposit Ether']), h('div.deposit-ether-modal__header__title', [t('depositEther')]),
h('div.deposit-ether-modal__header__description', [ h('div.deposit-ether-modal__header__description', [
'To interact with decentralized applications using MetaMask, youll need Ether in your wallet.', t('needEtherInWallet'),
]), ]),
h('div.deposit-ether-modal__header__close', { h('div.deposit-ether-modal__header__close', {
@ -131,7 +128,7 @@ DepositEtherModal.prototype.render = function () {
logo: h('img.deposit-ether-modal__buy-row__eth-logo', { src: '../../../images/eth_logo.svg' }), logo: h('img.deposit-ether-modal__buy-row__eth-logo', { src: '../../../images/eth_logo.svg' }),
title: DIRECT_DEPOSIT_ROW_TITLE, title: DIRECT_DEPOSIT_ROW_TITLE,
text: DIRECT_DEPOSIT_ROW_TEXT, text: DIRECT_DEPOSIT_ROW_TEXT,
buttonLabel: 'View Account', buttonLabel: t('viewAccount'),
onButtonClick: () => this.goToAccountDetailsModal(), onButtonClick: () => this.goToAccountDetailsModal(),
hide: buyingWithShapeshift, hide: buyingWithShapeshift,
}), }),
@ -140,7 +137,7 @@ DepositEtherModal.prototype.render = function () {
logo: h('i.fa.fa-tint.fa-2x'), logo: h('i.fa.fa-tint.fa-2x'),
title: FAUCET_ROW_TITLE, title: FAUCET_ROW_TITLE,
text: facuetRowText(networkName), text: facuetRowText(networkName),
buttonLabel: 'Get Ether', buttonLabel: t('getEther'),
onButtonClick: () => toFaucet(network), onButtonClick: () => toFaucet(network),
hide: !isTestNetwork || buyingWithShapeshift, hide: !isTestNetwork || buyingWithShapeshift,
}), }),
@ -151,7 +148,7 @@ DepositEtherModal.prototype.render = function () {
}), }),
title: COINBASE_ROW_TITLE, title: COINBASE_ROW_TITLE,
text: COINBASE_ROW_TEXT, text: COINBASE_ROW_TEXT,
buttonLabel: 'Continue to Coinbase', buttonLabel: t('continueToCoinbase'),
onButtonClick: () => toCoinbase(address), onButtonClick: () => toCoinbase(address),
hide: isTestNetwork || buyingWithShapeshift, hide: isTestNetwork || buyingWithShapeshift,
}), }),
@ -162,7 +159,7 @@ DepositEtherModal.prototype.render = function () {
}), }),
title: SHAPESHIFT_ROW_TITLE, title: SHAPESHIFT_ROW_TITLE,
text: SHAPESHIFT_ROW_TEXT, text: SHAPESHIFT_ROW_TEXT,
buttonLabel: 'Buy with Shapeshift', buttonLabel: t('shapeshiftBuy'),
onButtonClick: () => this.setState({ buyingWithShapeshift: true }), onButtonClick: () => this.setState({ buyingWithShapeshift: true }),
hide: isTestNetwork, hide: isTestNetwork,
hideButton: buyingWithShapeshift, hideButton: buyingWithShapeshift,

View File

@ -50,7 +50,7 @@ EditAccountNameModal.prototype.render = function () {
]), ]),
h('div.edit-account-name-modal-title', { h('div.edit-account-name-modal-title', {
}, ['Edit Account Name']), }, [t('editAccountName')]),
h('input.edit-account-name-modal-input', { h('input.edit-account-name-modal-input', {
placeholder: identity.name, placeholder: identity.name,
@ -69,7 +69,7 @@ EditAccountNameModal.prototype.render = function () {
}, },
disabled: this.state.inputText.length === 0, disabled: this.state.inputText.length === 0,
}, [ }, [
'SAVE', t('saveCaps'),
]), ]),
]), ]),

View File

@ -48,8 +48,8 @@ ExportPrivateKeyModal.prototype.exportAccountAndGetPrivateKey = function (passwo
ExportPrivateKeyModal.prototype.renderPasswordLabel = function (privateKey) { ExportPrivateKeyModal.prototype.renderPasswordLabel = function (privateKey) {
return h('span.private-key-password-label', privateKey return h('span.private-key-password-label', privateKey
? 'This is your private key (click to copy)' ? t('copyPrivateKey')
: 'Type Your Password' : t('typePassword')
) )
} }
@ -86,8 +86,8 @@ ExportPrivateKeyModal.prototype.renderButtons = function (privateKey, password,
), ),
(privateKey (privateKey
? this.renderButton('btn-clear export-private-key__button', () => hideModal(), 'Done') ? this.renderButton('btn-clear export-private-key__button', () => hideModal(), t('done'))
: this.renderButton('btn-clear export-private-key__button', () => this.exportAccountAndGetPrivateKey(this.state.password, address), 'Confirm') : this.renderButton('btn-clear export-private-key__button', () => this.exportAccountAndGetPrivateKey(this.state.password, address), t('confirm'))
), ),
]) ])
@ -120,7 +120,7 @@ ExportPrivateKeyModal.prototype.render = function () {
h('div.account-modal-divider'), h('div.account-modal-divider'),
h('span.modal-body-title', 'Show Private Keys'), h('span.modal-body-title', t('showPrivateKeys')),
h('div.private-key-password', {}, [ h('div.private-key-password', {}, [
this.renderPasswordLabel(privateKey), this.renderPasswordLabel(privateKey),
@ -130,10 +130,7 @@ ExportPrivateKeyModal.prototype.render = function () {
!warning ? null : h('span.private-key-password-error', warning), !warning ? null : h('span.private-key-password-error', warning),
]), ]),
h('div.private-key-password-warning', `Warning: Never disclose this key. h('div.private-key-password-warning', t('privateKeyWarning')),
Anyone with your private keys can take steal any assets held in your
account.`
),
this.renderButtons(privateKey, this.state.password, address, hideModal), this.renderButtons(privateKey, this.state.password, address, hideModal),

View File

@ -41,7 +41,7 @@ HideTokenConfirmationModal.prototype.render = function () {
h('div.hide-token-confirmation__container', { h('div.hide-token-confirmation__container', {
}, [ }, [
h('div.hide-token-confirmation__title', {}, [ h('div.hide-token-confirmation__title', {}, [
'Hide Token?', t('hideTokenPrompt'),
]), ]),
h(Identicon, { h(Identicon, {
@ -54,19 +54,19 @@ HideTokenConfirmationModal.prototype.render = function () {
h('div.hide-token-confirmation__symbol', {}, symbol), h('div.hide-token-confirmation__symbol', {}, symbol),
h('div.hide-token-confirmation__copy', {}, [ h('div.hide-token-confirmation__copy', {}, [
'You can add this token back in the future by going go to “Add token” in your accounts options menu.', t('readdToken'),
]), ]),
h('div.hide-token-confirmation__buttons', {}, [ h('div.hide-token-confirmation__buttons', {}, [
h('button.btn-cancel.hide-token-confirmation__button', { h('button.btn-cancel.hide-token-confirmation__button', {
onClick: () => hideModal(), onClick: () => hideModal(),
}, [ }, [
'CANCEL', t('cancelCaps'),
]), ]),
h('button.btn-clear.hide-token-confirmation__button', { h('button.btn-clear.hide-token-confirmation__button', {
onClick: () => hideToken(address), onClick: () => hideToken(address),
}, [ }, [
'HIDE', t('hideCaps'),
]), ]),
]), ]),
]), ]),

View File

@ -169,9 +169,8 @@ const MODALS = {
BETA_UI_NOTIFICATION_MODAL: { BETA_UI_NOTIFICATION_MODAL: {
contents: [ contents: [
h(NotifcationModal, { h(NotifcationModal, {
header: 'Welcome to the New UI (Beta)', header: t('uiWelcome'),
message: `You are now using the new Metamask UI. Take a look around, try out new features like sending tokens, message: t('uiWelcomeMessage'),
and let us know if you have any issues.`,
}), }),
], ],
mobileModalStyle: { mobileModalStyle: {
@ -187,9 +186,8 @@ const MODALS = {
OLD_UI_NOTIFICATION_MODAL: { OLD_UI_NOTIFICATION_MODAL: {
contents: [ contents: [
h(NotifcationModal, { h(NotifcationModal, {
header: 'Old UI', header: t('oldUI'),
message: `You have returned to the old UI. You can switch back to the New UI through the option in the top message: t('oldUIMessage'),
right dropdown menu.`,
}), }),
], ],
mobileModalStyle: { mobileModalStyle: {

View File

@ -22,7 +22,7 @@ class NewAccountModal extends Component {
h('div.new-account-modal-wrapper', { h('div.new-account-modal-wrapper', {
}, [ }, [
h('div.new-account-modal-header', {}, [ h('div.new-account-modal-header', {}, [
'New Account', t('newAccount'),
]), ]),
h('div.modal-close-x', { h('div.modal-close-x', {
@ -30,19 +30,19 @@ class NewAccountModal extends Component {
}), }),
h('div.new-account-modal-content', {}, [ h('div.new-account-modal-content', {}, [
'Account Name', t('accountName'),
]), ]),
h('div.new-account-input-wrapper', {}, [ h('div.new-account-input-wrapper', {}, [
h('input.new-account-input', { h('input.new-account-input', {
value: this.state.newAccountName, value: this.state.newAccountName,
placeholder: 'E.g. My new account', placeholder: t('sampleAccountName'),
onChange: event => this.setState({ newAccountName: event.target.value }), onChange: event => this.setState({ newAccountName: event.target.value }),
}, []), }, []),
]), ]),
h('div.new-account-modal-content.after-input', {}, [ h('div.new-account-modal-content.after-input', {}, [
'or', t('or'),
]), ]),
h('div.new-account-modal-content.after-input.pointer', { h('div.new-account-modal-content.after-input.pointer', {
@ -50,13 +50,13 @@ class NewAccountModal extends Component {
this.props.hideModal() this.props.hideModal()
this.props.showImportPage() this.props.showImportPage()
}, },
}, 'Import an account'), }, t('importAnAccount')),
h('div.new-account-modal-content.button', {}, [ h('div.new-account-modal-content.button', {}, [
h('button.btn-clear', { h('button.btn-clear', {
onClick: () => this.props.createAccount(newAccountName), onClick: () => this.props.createAccount(newAccountName),
}, [ }, [
'SAVE', t('saveCaps'),
]), ]),
]), ]),
]), ]),

View File

@ -200,7 +200,7 @@ ConfirmDeployContract.prototype.renderGasFee = function () {
return ( return (
h('section.flex-row.flex-center.confirm-screen-row', [ h('section.flex-row.flex-center.confirm-screen-row', [
h('span.confirm-screen-label.confirm-screen-section-column', [ 'Gas Fee' ]), h('span.confirm-screen-label.confirm-screen-section-column', [ t('gasFee') ]),
h('div.confirm-screen-section-column', [ h('div.confirm-screen-section-column', [
h('div.confirm-screen-row-info', `${fiatGas} ${currentCurrency.toUpperCase()}`), h('div.confirm-screen-row-info', `${fiatGas} ${currentCurrency.toUpperCase()}`),
@ -239,8 +239,8 @@ ConfirmDeployContract.prototype.renderTotalPlusGas = function () {
return ( return (
h('section.flex-row.flex-center.confirm-screen-total-box ', [ h('section.flex-row.flex-center.confirm-screen-total-box ', [
h('div.confirm-screen-section-column', [ h('div.confirm-screen-section-column', [
h('span.confirm-screen-label', [ 'Total ' ]), h('span.confirm-screen-label', [ t('total') + ' ' ]),
h('div.confirm-screen-total-box__subtitle', [ 'Amount + Gas' ]), h('div.confirm-screen-total-box__subtitle', [ t('amountPlusGas') ]),
]), ]),
h('div.confirm-screen-section-column', [ h('div.confirm-screen-section-column', [
@ -274,7 +274,7 @@ ConfirmDeployContract.prototype.render = function () {
h('button.confirm-screen-back-button', { h('button.confirm-screen-back-button', {
onClick: () => backToAccountDetail(selectedAddress), onClick: () => backToAccountDetail(selectedAddress),
}, 'BACK'), }, 'BACK'),
h('div.confirm-screen-title', 'Confirm Contract'), h('div.confirm-screen-title', t('confirmContract')),
h('div.confirm-screen-header-tip'), h('div.confirm-screen-header-tip'),
]), ]),
h('div.flex-row.flex-center.confirm-screen-identicons', [ h('div.flex-row.flex-center.confirm-screen-identicons', [
@ -292,7 +292,7 @@ ConfirmDeployContract.prototype.render = function () {
h('i.fa.fa-arrow-right.fa-lg'), h('i.fa.fa-arrow-right.fa-lg'),
h('div.confirm-screen-account-wrapper', [ h('div.confirm-screen-account-wrapper', [
h('i.fa.fa-file-text-o'), h('i.fa.fa-file-text-o'),
h('span.confirm-screen-account-name', 'New Contract'), h('span.confirm-screen-account-name', t('newContract')),
h('span.confirm-screen-account-number', ' '), h('span.confirm-screen-account-number', ' '),
]), ]),
]), ]),
@ -310,7 +310,7 @@ ConfirmDeployContract.prototype.render = function () {
h('div.confirm-screen-rows', [ h('div.confirm-screen-rows', [
h('section.flex-row.flex-center.confirm-screen-row', [ h('section.flex-row.flex-center.confirm-screen-row', [
h('span.confirm-screen-label.confirm-screen-section-column', [ 'From' ]), h('span.confirm-screen-label.confirm-screen-section-column', [ t('from') ]),
h('div.confirm-screen-section-column', [ h('div.confirm-screen-section-column', [
h('div.confirm-screen-row-info', fromName), h('div.confirm-screen-row-info', fromName),
h('div.confirm-screen-row-detail', `...${fromAddress.slice(fromAddress.length - 4)}`), h('div.confirm-screen-row-detail', `...${fromAddress.slice(fromAddress.length - 4)}`),
@ -318,9 +318,9 @@ ConfirmDeployContract.prototype.render = function () {
]), ]),
h('section.flex-row.flex-center.confirm-screen-row', [ h('section.flex-row.flex-center.confirm-screen-row', [
h('span.confirm-screen-label.confirm-screen-section-column', [ 'To' ]), h('span.confirm-screen-label.confirm-screen-section-column', [ t('to') ]),
h('div.confirm-screen-section-column', [ h('div.confirm-screen-section-column', [
h('div.confirm-screen-row-info', 'New Contract'), h('div.confirm-screen-row-info', t('newContract')),
]), ]),
]), ]),
@ -337,10 +337,10 @@ ConfirmDeployContract.prototype.render = function () {
// Cancel Button // Cancel Button
h('div.cancel.btn-light.confirm-screen-cancel-button', { h('div.cancel.btn-light.confirm-screen-cancel-button', {
onClick: (event) => this.cancel(event, txMeta), onClick: (event) => this.cancel(event, txMeta),
}, 'CANCEL'), }, t('cancelCaps')),
// Accept Button // Accept Button
h('button.confirm-screen-confirm-button', ['CONFIRM']), h('button.confirm-screen-confirm-button', [t('confirmCaps')]),
]), ]),
]) ])

View File

@ -165,7 +165,7 @@ ConfirmSendEther.prototype.getData = function () {
}, },
to: { to: {
address: txParams.to, address: txParams.to,
name: identities[txParams.to] ? identities[txParams.to].name : 'New Recipient', name: identities[txParams.to] ? identities[txParams.to].name : t('newRecipient'),
}, },
memo: txParams.memo || '', memo: txParams.memo || '',
gasFeeInFIAT, gasFeeInFIAT,
@ -268,7 +268,7 @@ ConfirmSendEther.prototype.render = function () {
h('div.confirm-screen-rows', [ h('div.confirm-screen-rows', [
h('section.flex-row.flex-center.confirm-screen-row', [ h('section.flex-row.flex-center.confirm-screen-row', [
h('span.confirm-screen-label.confirm-screen-section-column', [ 'From' ]), h('span.confirm-screen-label.confirm-screen-section-column', [ t('from') ]),
h('div.confirm-screen-section-column', [ h('div.confirm-screen-section-column', [
h('div.confirm-screen-row-info', fromName), h('div.confirm-screen-row-info', fromName),
h('div.confirm-screen-row-detail', `...${fromAddress.slice(fromAddress.length - 4)}`), h('div.confirm-screen-row-detail', `...${fromAddress.slice(fromAddress.length - 4)}`),
@ -276,7 +276,7 @@ ConfirmSendEther.prototype.render = function () {
]), ]),
h('section.flex-row.flex-center.confirm-screen-row', [ h('section.flex-row.flex-center.confirm-screen-row', [
h('span.confirm-screen-label.confirm-screen-section-column', [ 'To' ]), h('span.confirm-screen-label.confirm-screen-section-column', [ t('to') ]),
h('div.confirm-screen-section-column', [ h('div.confirm-screen-section-column', [
h('div.confirm-screen-row-info', toName), h('div.confirm-screen-row-info', toName),
h('div.confirm-screen-row-detail', `...${toAddress.slice(toAddress.length - 4)}`), h('div.confirm-screen-row-detail', `...${toAddress.slice(toAddress.length - 4)}`),
@ -284,7 +284,7 @@ ConfirmSendEther.prototype.render = function () {
]), ]),
h('section.flex-row.flex-center.confirm-screen-row', [ h('section.flex-row.flex-center.confirm-screen-row', [
h('span.confirm-screen-label.confirm-screen-section-column', [ 'Gas Fee' ]), h('span.confirm-screen-label.confirm-screen-section-column', [ t('gasFee') ]),
h('div.confirm-screen-section-column', [ h('div.confirm-screen-section-column', [
h('div.confirm-screen-row-info', `${gasFeeInFIAT} ${currentCurrency.toUpperCase()}`), h('div.confirm-screen-row-info', `${gasFeeInFIAT} ${currentCurrency.toUpperCase()}`),
@ -295,8 +295,8 @@ ConfirmSendEther.prototype.render = function () {
h('section.flex-row.flex-center.confirm-screen-total-box ', [ h('section.flex-row.flex-center.confirm-screen-total-box ', [
h('div.confirm-screen-section-column', [ h('div.confirm-screen-section-column', [
h('span.confirm-screen-label', [ 'Total ' ]), h('span.confirm-screen-label', [ t('total') + ' ' ]),
h('div.confirm-screen-total-box__subtitle', [ 'Amount + Gas' ]), h('div.confirm-screen-total-box__subtitle', [ t('amountPlusGas') ]),
]), ]),
h('div.confirm-screen-section-column', [ h('div.confirm-screen-section-column', [
@ -396,10 +396,10 @@ ConfirmSendEther.prototype.render = function () {
clearSend() clearSend()
this.cancel(event, txMeta) this.cancel(event, txMeta)
}, },
}, 'CANCEL'), }, t('cancelCaps')),
// Accept Button // Accept Button
h('button.confirm-screen-confirm-button', ['CONFIRM']), h('button.confirm-screen-confirm-button', [t('confirmCaps')]),
]), ]),
]) ])
) )
@ -414,7 +414,7 @@ ConfirmSendEther.prototype.onSubmit = function (event) {
if (valid && this.verifyGasParams()) { if (valid && this.verifyGasParams()) {
this.props.sendTransaction(txMeta, event) this.props.sendTransaction(txMeta, event)
} else { } else {
this.props.dispatch(actions.displayWarning('Invalid Gas Parameters')) this.props.dispatch(actions.displayWarning(t('invalidGasParams')))
this.setState({ submitting: false }) this.setState({ submitting: false })
} }
} }

View File

@ -133,7 +133,7 @@ ConfirmSendToken.prototype.getAmount = function () {
? +(sendTokenAmount * tokenExchangeRate * conversionRate).toFixed(2) ? +(sendTokenAmount * tokenExchangeRate * conversionRate).toFixed(2)
: null, : null,
token: typeof value === 'undefined' token: typeof value === 'undefined'
? 'Unknown' ? t('unknown')
: +sendTokenAmount.toFixed(decimals), : +sendTokenAmount.toFixed(decimals),
} }
@ -204,7 +204,7 @@ ConfirmSendToken.prototype.getData = function () {
}, },
to: { to: {
address: value, address: value,
name: identities[value] ? identities[value].name : 'New Recipient', name: identities[value] ? identities[value].name : t('newRecipient'),
}, },
memo: txParams.memo || '', memo: txParams.memo || '',
} }
@ -244,7 +244,7 @@ ConfirmSendToken.prototype.renderGasFee = function () {
return ( return (
h('section.flex-row.flex-center.confirm-screen-row', [ h('section.flex-row.flex-center.confirm-screen-row', [
h('span.confirm-screen-label.confirm-screen-section-column', [ 'Gas Fee' ]), h('span.confirm-screen-label.confirm-screen-section-column', [ t('gasFee') ]),
h('div.confirm-screen-section-column', [ h('div.confirm-screen-section-column', [
h('div.confirm-screen-row-info', `${fiatGas} ${currentCurrency}`), h('div.confirm-screen-row-info', `${fiatGas} ${currentCurrency}`),
@ -266,8 +266,8 @@ ConfirmSendToken.prototype.renderTotalPlusGas = function () {
? ( ? (
h('section.flex-row.flex-center.confirm-screen-total-box ', [ h('section.flex-row.flex-center.confirm-screen-total-box ', [
h('div.confirm-screen-section-column', [ h('div.confirm-screen-section-column', [
h('span.confirm-screen-label', [ 'Total ' ]), h('span.confirm-screen-label', [ t('total') + ' ' ]),
h('div.confirm-screen-total-box__subtitle', [ 'Amount + Gas' ]), h('div.confirm-screen-total-box__subtitle', [ t('amountPlusGas') ]),
]), ]),
h('div.confirm-screen-section-column', [ h('div.confirm-screen-section-column', [
@ -279,8 +279,8 @@ ConfirmSendToken.prototype.renderTotalPlusGas = function () {
: ( : (
h('section.flex-row.flex-center.confirm-screen-total-box ', [ h('section.flex-row.flex-center.confirm-screen-total-box ', [
h('div.confirm-screen-section-column', [ h('div.confirm-screen-section-column', [
h('span.confirm-screen-label', [ 'Total ' ]), h('span.confirm-screen-label', [ t('total') + ' ' ]),
h('div.confirm-screen-total-box__subtitle', [ 'Amount + Gas' ]), h('div.confirm-screen-total-box__subtitle', [ t('amountPlusGas') ]),
]), ]),
h('div.confirm-screen-section-column', [ h('div.confirm-screen-section-column', [
@ -316,7 +316,7 @@ ConfirmSendToken.prototype.render = function () {
h('h3.flex-center.confirm-screen-header', [ h('h3.flex-center.confirm-screen-header', [
h('button.btn-clear.confirm-screen-back-button', { h('button.btn-clear.confirm-screen-back-button', {
onClick: () => editTransaction(txMeta), onClick: () => editTransaction(txMeta),
}, 'EDIT'), }, t('editCaps')),
h('div.confirm-screen-title', 'Confirm Transaction'), h('div.confirm-screen-title', 'Confirm Transaction'),
h('div.confirm-screen-header-tip'), h('div.confirm-screen-header-tip'),
]), ]),
@ -359,7 +359,7 @@ ConfirmSendToken.prototype.render = function () {
h('div.confirm-screen-rows', [ h('div.confirm-screen-rows', [
h('section.flex-row.flex-center.confirm-screen-row', [ h('section.flex-row.flex-center.confirm-screen-row', [
h('span.confirm-screen-label.confirm-screen-section-column', [ 'From' ]), h('span.confirm-screen-label.confirm-screen-section-column', [ t('from') ]),
h('div.confirm-screen-section-column', [ h('div.confirm-screen-section-column', [
h('div.confirm-screen-row-info', fromName), h('div.confirm-screen-row-info', fromName),
h('div.confirm-screen-row-detail', `...${fromAddress.slice(fromAddress.length - 4)}`), h('div.confirm-screen-row-detail', `...${fromAddress.slice(fromAddress.length - 4)}`),
@ -367,7 +367,7 @@ ConfirmSendToken.prototype.render = function () {
]), ]),
toAddress && h('section.flex-row.flex-center.confirm-screen-row', [ toAddress && h('section.flex-row.flex-center.confirm-screen-row', [
h('span.confirm-screen-label.confirm-screen-section-column', [ 'To' ]), h('span.confirm-screen-label.confirm-screen-section-column', [ t('to') ]),
h('div.confirm-screen-section-column', [ h('div.confirm-screen-section-column', [
h('div.confirm-screen-row-info', toName), h('div.confirm-screen-row-info', toName),
h('div.confirm-screen-row-detail', `...${toAddress.slice(toAddress.length - 4)}`), h('div.confirm-screen-row-detail', `...${toAddress.slice(toAddress.length - 4)}`),
@ -387,10 +387,10 @@ ConfirmSendToken.prototype.render = function () {
// Cancel Button // Cancel Button
h('div.cancel.btn-light.confirm-screen-cancel-button', { h('div.cancel.btn-light.confirm-screen-cancel-button', {
onClick: (event) => this.cancel(event, txMeta), onClick: (event) => this.cancel(event, txMeta),
}, 'CANCEL'), }, t('cancelCaps')),
// Accept Button // Accept Button
h('button.confirm-screen-confirm-button', ['CONFIRM']), h('button.confirm-screen-confirm-button', [t('confirmCaps')]),
]), ]),
@ -407,7 +407,7 @@ ConfirmSendToken.prototype.onSubmit = function (event) {
if (valid && this.verifyGasParams()) { if (valid && this.verifyGasParams()) {
this.props.sendTransaction(txMeta, event) this.props.sendTransaction(txMeta, event)
} else { } else {
this.props.dispatch(actions.displayWarning('Invalid Gas Parameters')) this.props.dispatch(actions.displayWarning(t('invalidGasParams')))
this.setState({ submitting: false }) this.setState({ submitting: false })
} }
} }

View File

@ -35,10 +35,10 @@ PendingMsg.prototype.render = function () {
h('.flex-row.flex-space-around', [ h('.flex-row.flex-space-around', [
h('button', { h('button', {
onClick: state.cancelTypedMessage, onClick: state.cancelTypedMessage,
}, t('cancelButton')), }, t('cancelCaps')),
h('button', { h('button', {
onClick: state.signTypedMessage, onClick: state.signTypedMessage,
}, t('signButton')), }, t('signCaps')),
]), ]),
]) ])

View File

@ -126,14 +126,14 @@ SendTokenScreen.prototype.validate = function () {
const amount = Number(stringAmount) const amount = Number(stringAmount)
const errors = { const errors = {
to: !to ? 'Required' : null, to: !to ? t('required') : null,
amount: !amount ? 'Required' : null, amount: !amount ? t('required') : null,
gasPrice: !gasPrice ? 'Gas Price Required' : null, gasPrice: !gasPrice ? t('gasPriceRequired') : null,
gasLimit: !gasLimit ? 'Gas Limit Required' : null, gasLimit: !gasLimit ? t('gasLimitRequired') : null,
} }
if (to && !isValidAddress(to)) { if (to && !isValidAddress(to)) {
errors.to = 'Invalid address' errors.to = t('invalidAddress')
} }
const isValid = Object.entries(errors).every(([key, value]) => value === null) const isValid = Object.entries(errors).every(([key, value]) => value === null)
@ -233,11 +233,11 @@ SendTokenScreen.prototype.renderToAddressInput = function () {
'send-screen-input-wrapper--error': errorMessage, 'send-screen-input-wrapper--error': errorMessage,
}), }),
}, [ }, [
h('div', ['To:']), h('div', [t('toSpecific')]),
h('input.large-input.send-screen-input', { h('input.large-input.send-screen-input', {
name: 'address', name: 'address',
list: 'addresses', list: 'addresses',
placeholder: 'Address', placeholder: t('address'),
value: to, value: to,
onChange: e => this.setState({ onChange: e => this.setState({
to: e.target.value, to: e.target.value,
@ -355,8 +355,8 @@ SendTokenScreen.prototype.renderGasInput = function () {
}), }),
h('div.send-screen-gas-labels', {}, [ h('div.send-screen-gas-labels', {}, [
h('span', [ h('i.fa.fa-bolt'), 'Gas fee:']), h('span', [ h('i.fa.fa-bolt'), t('gasFeeSpecific')]),
h('span', ['What\'s this?']), h('span', [t('whatsThis')]),
]), ]),
h('div.large-input.send-screen-gas-input', [ h('div.large-input.send-screen-gas-input', [
h(GasFeeDisplay, { h(GasFeeDisplay, {
@ -370,7 +370,7 @@ SendTokenScreen.prototype.renderGasInput = function () {
h( h(
'div.send-screen-gas-input-customize', 'div.send-screen-gas-input-customize',
{ onClick: () => this.setState({ isGasTooltipOpen: !isGasTooltipOpen }) }, { onClick: () => this.setState({ isGasTooltipOpen: !isGasTooltipOpen }) },
['Customize'] [t('customize')]
), ),
]), ]),
h('div.send-screen-input-wrapper__error-message', [ h('div.send-screen-input-wrapper__error-message', [
@ -381,7 +381,7 @@ SendTokenScreen.prototype.renderGasInput = function () {
SendTokenScreen.prototype.renderMemoInput = function () { SendTokenScreen.prototype.renderMemoInput = function () {
return h('div.send-screen-input-wrapper', [ return h('div.send-screen-input-wrapper', [
h('div', {}, ['Transaction memo (optional)']), h('div', {}, [t('transactionMemo')]),
h( h(
'input.large-input.send-screen-input', 'input.large-input.send-screen-input',
{ onChange: e => this.setState({ memo: e.target.value }) } { onChange: e => this.setState({ memo: e.target.value }) }
@ -397,10 +397,10 @@ SendTokenScreen.prototype.renderButtons = function () {
h('button.send-token__button-next.btn-secondary', { h('button.send-token__button-next.btn-secondary', {
className: !isValid && 'send-screen__send-button__disabled', className: !isValid && 'send-screen__send-button__disabled',
onClick: () => isValid && this.submit(), onClick: () => isValid && this.submit(),
}, ['Next']), }, [t('next')]),
h('button.send-token__button-cancel.btn-tertiary', { h('button.send-token__button-cancel.btn-tertiary', {
onClick: () => backToAccountDetail(selectedAddress), onClick: () => backToAccountDetail(selectedAddress),
}, ['Cancel']), }, [t('cancel')]),
]) ])
} }
@ -417,9 +417,9 @@ SendTokenScreen.prototype.render = function () {
diameter: 75, diameter: 75,
address: selectedTokenAddress, address: selectedTokenAddress,
}), }),
h('div.send-token__title', ['Send Tokens']), h('div.send-token__title', [t('sendTokens')]),
h('div.send-token__description', ['Send Tokens to anyone with an Ethereum account']), h('div.send-token__description', [t('sendTokensAnywhere')]),
h('div.send-token__balance-text', ['Your Token Balance is:']), h('div.send-token__balance-text', [t('tokenBalance')]),
h('div.send-token__token-balance', [ h('div.send-token__token-balance', [
h(TokenBalance, { token: selectedToken, balanceOnly: true }), h(TokenBalance, { token: selectedToken, balanceOnly: true }),
]), ]),

View File

@ -30,7 +30,7 @@ GasFeeDisplay.prototype.render = function () {
convertedPrefix: '$', convertedPrefix: '$',
readOnly: true, readOnly: true,
}) })
: h('div.currency-display', 'Loading...'), : h('div.currency-display', t('loading')),
h('button.send-v2__sliders-icon-container', { h('button.send-v2__sliders-icon-container', {
onClick, onClick,
@ -41,4 +41,3 @@ GasFeeDisplay.prototype.render = function () {
]) ])
} }

View File

@ -81,7 +81,7 @@ GasTooltip.prototype.render = function () {
'marginTop': '81px', 'marginTop': '81px',
}, },
}, [ }, [
h('span.gas-tooltip-label', {}, ['Gas Limit']), h('span.gas-tooltip-label', {}, [t('gasLimit')]),
h('i.fa.fa-info-circle'), h('i.fa.fa-info-circle'),
]), ]),
h(InputNumber, { h(InputNumber, {
@ -97,4 +97,3 @@ GasTooltip.prototype.render = function () {
]), ]),
]) ])
} }

View File

@ -92,7 +92,7 @@ ToAutoComplete.prototype.render = function () {
return h('div.send-v2__to-autocomplete', {}, [ return h('div.send-v2__to-autocomplete', {}, [
h('input.send-v2__to-autocomplete__input', { h('input.send-v2__to-autocomplete__input', {
placeholder: 'Recipient Address', placeholder: t('recipientAddress'),
className: inError ? `send-v2__error-border` : '', className: inError ? `send-v2__error-border` : '',
value: to, value: to,
onChange: event => onChange(event.target.value), onChange: event => onChange(event.target.value),
@ -111,4 +111,3 @@ ToAutoComplete.prototype.render = function () {
]) ])
} }

View File

@ -224,10 +224,10 @@ SignatureRequest.prototype.renderFooter = function () {
return h('div.request-signature__footer', [ return h('div.request-signature__footer', [
h('button.request-signature__footer__cancel-button', { h('button.request-signature__footer__cancel-button', {
onClick: cancel, onClick: cancel,
}, t('cancelButton')), }, t('cancelCaps')),
h('button.request-signature__footer__sign-button', { h('button.request-signature__footer__sign-button', {
onClick: sign, onClick: sign,
}, t('signButton')), }, t('signCaps')),
]) ])
} }