diff options
author | kumavis <aaron@kumavis.me> | 2018-03-14 05:49:26 +0800 |
---|---|---|
committer | kumavis <aaron@kumavis.me> | 2018-03-14 05:49:26 +0800 |
commit | e48934dc04f94ef66ebb69a26105ce9bbf5f3842 (patch) | |
tree | ffc35395cfbb2b3dbbe254ec87dc6d1eff708ef7 /ui/app/components/signature-request.js | |
parent | a88e436b7d45d9a7f9f4d4a4be58aff5e58e9074 (diff) | |
parent | 239d7106abe39b3a16871442b30edeac54b1bef4 (diff) | |
download | tangerine-wallet-browser-e48934dc04f94ef66ebb69a26105ce9bbf5f3842.tar.gz tangerine-wallet-browser-e48934dc04f94ef66ebb69a26105ce9bbf5f3842.tar.zst tangerine-wallet-browser-e48934dc04f94ef66ebb69a26105ce9bbf5f3842.zip |
Merge branch 'master' of github.com:MetaMask/metamask-extension into i3076-UseStorageLocalInstead
Diffstat (limited to 'ui/app/components/signature-request.js')
-rw-r--r-- | ui/app/components/signature-request.js | 25 |
1 files changed, 11 insertions, 14 deletions
diff --git a/ui/app/components/signature-request.js b/ui/app/components/signature-request.js index c5cc23aa8..7bf34e7b6 100644 --- a/ui/app/components/signature-request.js +++ b/ui/app/components/signature-request.js @@ -9,6 +9,7 @@ const classnames = require('classnames') const AccountDropdownMini = require('./dropdowns/account-dropdown-mini') const actions = require('../actions') +const t = require('../../i18n') const { conversionUtil } = require('../conversion-util') const { @@ -54,7 +55,7 @@ SignatureRequest.prototype.renderHeader = function () { h('div.request-signature__header-background'), - h('div.request-signature__header__text', 'Signature Request'), + h('div.request-signature__header__text', t('sigRequest')), h('div.request-signature__header__tip-container', [ h('div.request-signature__header__tip'), @@ -75,7 +76,7 @@ SignatureRequest.prototype.renderAccountDropdown = function () { return h('div.request-signature__account', [ - h('div.request-signature__account-text', ['Account:']), + h('div.request-signature__account-text', [t('account') + ':']), h(AccountDropdownMini, { selectedAccount, @@ -102,7 +103,7 @@ SignatureRequest.prototype.renderBalance = function () { return h('div.request-signature__balance', [ - h('div.request-signature__balance-text', ['Balance:']), + h('div.request-signature__balance-text', [t('balance')]), h('div.request-signature__balance-value', `${balanceInEther} ETH`), @@ -136,7 +137,7 @@ SignatureRequest.prototype.renderRequestInfo = function () { return h('div.request-signature__request-info', [ h('div.request-signature__headline', [ - `Your signature is being requested`, + t('yourSigRequested'), ]), ]) @@ -154,21 +155,18 @@ SignatureRequest.prototype.msgHexToText = function (hex) { SignatureRequest.prototype.renderBody = function () { let rows - let notice = 'You are signing:' + let notice = t('youSign') + ':' const { txData } = this.props const { type, msgParams: { data } } = txData if (type === 'personal_sign') { - rows = [{ name: 'Message', value: this.msgHexToText(data) }] + rows = [{ name: t('message'), value: this.msgHexToText(data) }] } else if (type === 'eth_signTypedData') { rows = data } else if (type === 'eth_sign') { - rows = [{ name: 'Message', value: data }] - notice = `Signing this message can have - dangerous side effects. Only sign messages from - sites you fully trust with your entire account. - This dangerous method will be removed in a future version. ` + rows = [{ name: t('message'), value: data }] + notice = t('signNotice') } return h('div.request-signature__body', {}, [ @@ -227,10 +225,10 @@ SignatureRequest.prototype.renderFooter = function () { return h('div.request-signature__footer', [ h('button.request-signature__footer__cancel-button', { onClick: cancel, - }, 'CANCEL'), + }, t('cancel')), h('button.request-signature__footer__sign-button', { onClick: sign, - }, 'SIGN'), + }, t('sign')), ]) } @@ -250,4 +248,3 @@ SignatureRequest.prototype.render = function () { ) } - |