aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/components/signature-request.js
diff options
context:
space:
mode:
authorfrankiebee <frankie.diamond@gmail.com>2018-03-14 06:27:26 +0800
committerfrankiebee <frankie.diamond@gmail.com>2018-03-14 06:27:26 +0800
commita2c14ad02b6f080efe18535d64efe4acdaa5f310 (patch)
treea4f10bab758b35c5344557907c7c95a396e4fbb9 /ui/app/components/signature-request.js
parentc465d510b100fdf9926413751df04cbd59de68eb (diff)
parentc83a9ceb04a485149fe65fbb2b44f0adeda696b1 (diff)
downloadtangerine-wallet-browser-a2c14ad02b6f080efe18535d64efe4acdaa5f310.tar
tangerine-wallet-browser-a2c14ad02b6f080efe18535d64efe4acdaa5f310.tar.gz
tangerine-wallet-browser-a2c14ad02b6f080efe18535d64efe4acdaa5f310.tar.bz2
tangerine-wallet-browser-a2c14ad02b6f080efe18535d64efe4acdaa5f310.tar.lz
tangerine-wallet-browser-a2c14ad02b6f080efe18535d64efe4acdaa5f310.tar.xz
tangerine-wallet-browser-a2c14ad02b6f080efe18535d64efe4acdaa5f310.tar.zst
tangerine-wallet-browser-a2c14ad02b6f080efe18535d64efe4acdaa5f310.zip
Merge remote-tracking branch 'origin/i#3509' into i#3509
Diffstat (limited to 'ui/app/components/signature-request.js')
-rw-r--r--ui/app/components/signature-request.js25
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 () {
)
}
-