aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/components/buy-button-subview.js
diff options
context:
space:
mode:
authorDan <danjm.com@gmail.com>2018-03-22 08:41:47 +0800
committerDan <danjm.com@gmail.com>2018-03-22 08:41:47 +0800
commitd24a0590d363dbe88d383c8faec8eb28809242f0 (patch)
tree189e54ca9ea117804c96afa551cfca8158f36974 /ui/app/components/buy-button-subview.js
parent29cc2f8ab9628d21cc32962666879c71be4e69d1 (diff)
downloadtangerine-wallet-browser-d24a0590d363dbe88d383c8faec8eb28809242f0.tar.gz
tangerine-wallet-browser-d24a0590d363dbe88d383c8faec8eb28809242f0.tar.zst
tangerine-wallet-browser-d24a0590d363dbe88d383c8faec8eb28809242f0.zip
i18n redux solution doesn't require importing t() and passing state to each t() call; t is just available on props.
Diffstat (limited to 'ui/app/components/buy-button-subview.js')
-rw-r--r--ui/app/components/buy-button-subview.js11
1 files changed, 5 insertions, 6 deletions
diff --git a/ui/app/components/buy-button-subview.js b/ui/app/components/buy-button-subview.js
index b2b8cbbd5..2243ce38b 100644
--- a/ui/app/components/buy-button-subview.js
+++ b/ui/app/components/buy-button-subview.js
@@ -9,7 +9,6 @@ const Loading = require('./loading')
const AccountPanel = require('./account-panel')
const RadioList = require('./custom-radio-list')
const networkNames = require('../../../app/scripts/config.js').networkNames
-const t = require('../../i18n-helper.js').getMessage
module.exports = connect(mapStateToProps)(BuyButtonSubview)
@@ -77,7 +76,7 @@ BuyButtonSubview.prototype.headerSubview = function () {
paddingTop: '4px',
paddingBottom: '4px',
},
- }, t(this.props.localeMessages, 'depositEth')),
+ }, this.props.t('depositEth')),
]),
// loading indication
@@ -119,7 +118,7 @@ BuyButtonSubview.prototype.headerSubview = function () {
paddingTop: '4px',
paddingBottom: '4px',
},
- }, t(this.props.localeMessages, 'selectService')),
+ }, this.props.t('selectService')),
]),
])
@@ -165,14 +164,14 @@ BuyButtonSubview.prototype.primarySubview = function () {
style: {
marginTop: '15px',
},
- }, t(this.props.localeMessages, 'borrowDharma'))
+ }, this.props.t('borrowDharma'))
) : null,
])
)
default:
return (
- h('h2.error', t(this.props.localeMessages, 'unknownNetworkId'))
+ h('h2.error', this.props.t('unknownNetworkId'))
)
}
@@ -205,7 +204,7 @@ BuyButtonSubview.prototype.mainnetSubview = function () {
],
subtext: {
'Coinbase': `${t('crypto')}/${t('fiat')} (${t('usaOnly')})`,
- 'ShapeShift': t(this.props.localeMessages, 'crypto'),
+ 'ShapeShift': this.props.t('crypto'),
},
onClick: this.radioHandler.bind(this),
}),