aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/components/pending-tx/confirm-deploy-contract.js
diff options
context:
space:
mode:
authorDan <danjm.com@gmail.com>2018-03-16 08:29:45 +0800
committerDan <danjm.com@gmail.com>2018-03-16 08:29:45 +0800
commit5fe0be722b6514692a68e920ee8058c5d572237d (patch)
tree58da5c62f17cbd0160d24e44918aa34b4ee23300 /ui/app/components/pending-tx/confirm-deploy-contract.js
parenteb5a84975b490664aa6238be6ceab3d4749167ee (diff)
downloadtangerine-wallet-browser-5fe0be722b6514692a68e920ee8058c5d572237d.tar.gz
tangerine-wallet-browser-5fe0be722b6514692a68e920ee8058c5d572237d.tar.zst
tangerine-wallet-browser-5fe0be722b6514692a68e920ee8058c5d572237d.zip
Handle i18n with redux.
Diffstat (limited to 'ui/app/components/pending-tx/confirm-deploy-contract.js')
-rw-r--r--ui/app/components/pending-tx/confirm-deploy-contract.js24
1 files changed, 12 insertions, 12 deletions
diff --git a/ui/app/components/pending-tx/confirm-deploy-contract.js b/ui/app/components/pending-tx/confirm-deploy-contract.js
index b6bfb9afe..483574094 100644
--- a/ui/app/components/pending-tx/confirm-deploy-contract.js
+++ b/ui/app/components/pending-tx/confirm-deploy-contract.js
@@ -9,7 +9,7 @@ const ethUtil = require('ethereumjs-util')
const BN = ethUtil.BN
const hexToBn = require('../../../../app/scripts/lib/hex-to-bn')
const { conversionUtil } = require('../../conversion-util')
-const t = global.getMessage
+const t = require('../../../i18n-helper').getMessage
const { MIN_GAS_PRICE_HEX } = require('../send/send-constants')
@@ -56,7 +56,7 @@ ConfirmDeployContract.prototype.onSubmit = function (event) {
if (valid && this.verifyGasParams()) {
this.props.sendTransaction(txMeta, event)
} else {
- this.props.dispatch(actions.displayWarning(t('invalidGasParams')))
+ this.props.dispatch(actions.displayWarning(t(this.props.localeMessages, 'invalidGasParams')))
this.setState({ submitting: false })
}
}
@@ -201,7 +201,7 @@ ConfirmDeployContract.prototype.renderGasFee = function () {
return (
h('section.flex-row.flex-center.confirm-screen-row', [
- h('span.confirm-screen-label.confirm-screen-section-column', [ t('gasFee') ]),
+ h('span.confirm-screen-label.confirm-screen-section-column', [ t(this.props.localeMessages, 'gasFee') ]),
h('div.confirm-screen-section-column', [
h('div.confirm-screen-row-info', `${fiatGas} ${currentCurrency.toUpperCase()}`),
@@ -240,8 +240,8 @@ ConfirmDeployContract.prototype.renderTotalPlusGas = function () {
return (
h('section.flex-row.flex-center.confirm-screen-total-box ', [
h('div.confirm-screen-section-column', [
- h('span.confirm-screen-label', [ t('total') + ' ' ]),
- h('div.confirm-screen-total-box__subtitle', [ t('amountPlusGas') ]),
+ h('span.confirm-screen-label', [ t(this.props.localeMessages, 'total') + ' ' ]),
+ h('div.confirm-screen-total-box__subtitle', [ t(this.props.localeMessages, 'amountPlusGas') ]),
]),
h('div.confirm-screen-section-column', [
@@ -274,8 +274,8 @@ ConfirmDeployContract.prototype.render = function () {
h('h3.flex-center.confirm-screen-header', [
h('button.confirm-screen-back-button.allcaps', {
onClick: () => backToAccountDetail(selectedAddress),
- }, t('back')),
- h('div.confirm-screen-title', t('confirmContract')),
+ }, t(this.props.localeMessages, 'back')),
+ h('div.confirm-screen-title', t(this.props.localeMessages, 'confirmContract')),
h('div.confirm-screen-header-tip'),
]),
h('div.flex-row.flex-center.confirm-screen-identicons', [
@@ -293,7 +293,7 @@ ConfirmDeployContract.prototype.render = function () {
h('i.fa.fa-arrow-right.fa-lg'),
h('div.confirm-screen-account-wrapper', [
h('i.fa.fa-file-text-o'),
- h('span.confirm-screen-account-name', t('newContract')),
+ h('span.confirm-screen-account-name', t(this.props.localeMessages, 'newContract')),
h('span.confirm-screen-account-number', ' '),
]),
]),
@@ -311,7 +311,7 @@ ConfirmDeployContract.prototype.render = function () {
h('div.confirm-screen-rows', [
h('section.flex-row.flex-center.confirm-screen-row', [
- h('span.confirm-screen-label.confirm-screen-section-column', [ t('from') ]),
+ h('span.confirm-screen-label.confirm-screen-section-column', [ t(this.props.localeMessages, 'from') ]),
h('div.confirm-screen-section-column', [
h('div.confirm-screen-row-info', fromName),
h('div.confirm-screen-row-detail', `...${fromAddress.slice(fromAddress.length - 4)}`),
@@ -319,9 +319,9 @@ ConfirmDeployContract.prototype.render = function () {
]),
h('section.flex-row.flex-center.confirm-screen-row', [
- h('span.confirm-screen-label.confirm-screen-section-column', [ t('to') ]),
+ h('span.confirm-screen-label.confirm-screen-section-column', [ t(this.props.localeMessages, 'to') ]),
h('div.confirm-screen-section-column', [
- h('div.confirm-screen-row-info', t('newContract')),
+ h('div.confirm-screen-row-info', t(this.props.localeMessages, 'newContract')),
]),
]),
@@ -338,7 +338,7 @@ ConfirmDeployContract.prototype.render = function () {
// Cancel Button
h('div.cancel.btn-light.confirm-screen-cancel-button.allcaps', {
onClick: (event) => this.cancel(event, txMeta),
- }, t('cancel')),
+ }, t(this.props.localeMessages, 'cancel')),
// Accept Button
h('button.confirm-screen-confirm-button.allcaps', [t('confirm')]),