From d24a0590d363dbe88d383c8faec8eb28809242f0 Mon Sep 17 00:00:00 2001 From: Dan Date: Wed, 21 Mar 2018 22:11:47 -0230 Subject: i18n redux solution doesn't require importing t() and passing state to each t() call; t is just available on props. --- ui/app/components/shift-list-item.js | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'ui/app/components/shift-list-item.js') diff --git a/ui/app/components/shift-list-item.js b/ui/app/components/shift-list-item.js index cc401bc34..d810eddc9 100644 --- a/ui/app/components/shift-list-item.js +++ b/ui/app/components/shift-list-item.js @@ -6,7 +6,6 @@ const vreme = new (require('vreme'))() const explorerLink = require('etherscan-link').createExplorerLink const actions = require('../actions') const addressSummary = require('../util').addressSummary -const t = require('../../i18n-helper').getMessage const CopyButton = require('./copyButton') const EthBalance = require('./eth-balance') @@ -76,7 +75,7 @@ ShiftListItem.prototype.renderUtilComponents = function () { value: this.props.depositAddress, }), h(Tooltip, { - title: t(this.props.localeMessages, 'qrCode'), + title: this.props.t('qrCode'), }, [ h('i.fa.fa-qrcode.pointer.pop-hover', { onClick: () => props.dispatch(actions.reshowQrCode(props.depositAddress, props.depositType)), @@ -136,8 +135,8 @@ ShiftListItem.prototype.renderInfo = function () { color: '#ABA9AA', width: '100%', }, - }, t(this.props.localeMessages, 'toETHviaShapeShift', [props.depositType])), - h('div', t(this.props.localeMessages, 'noDeposits')), + }, this.props.t('toETHviaShapeShift', [props.depositType])), + h('div', this.props.t('noDeposits')), h('div', { style: { fontSize: 'x-small', @@ -159,8 +158,8 @@ ShiftListItem.prototype.renderInfo = function () { color: '#ABA9AA', width: '100%', }, - }, t(this.props.localeMessages, 'toETHviaShapeShift', [props.depositType])), - h('div', t(this.props.localeMessages, 'conversionProgress')), + }, this.props.t('toETHviaShapeShift', [props.depositType])), + h('div', this.props.t('conversionProgress')), h('div', { style: { fontSize: 'x-small', @@ -185,7 +184,7 @@ ShiftListItem.prototype.renderInfo = function () { color: '#ABA9AA', width: '100%', }, - }, t(this.props.localeMessages, 'fromShapeShift')), + }, this.props.t('fromShapeShift')), h('div', formatDate(props.time)), h('div', { style: { @@ -197,7 +196,7 @@ ShiftListItem.prototype.renderInfo = function () { ]) case 'failed': - return h('span.error', '(' + t(this.props.localeMessages, 'failed') + ')') + return h('span.error', '(' + this.props.t('failed') + ')') default: return '' } -- cgit