aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/components/modals/buy-options-modal.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/modals/buy-options-modal.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/modals/buy-options-modal.js')
-rw-r--r--ui/app/components/modals/buy-options-modal.js15
1 files changed, 7 insertions, 8 deletions
diff --git a/ui/app/components/modals/buy-options-modal.js b/ui/app/components/modals/buy-options-modal.js
index 0e93e9a2d..c0ee3632e 100644
--- a/ui/app/components/modals/buy-options-modal.js
+++ b/ui/app/components/modals/buy-options-modal.js
@@ -4,7 +4,6 @@ const inherits = require('util').inherits
const connect = require('../../metamask-connect')
const actions = require('../../actions')
const networkNames = require('../../../../app/scripts/config.js').networkNames
-const t = require('../../../i18n-helper').getMessage
function mapStateToProps (state) {
return {
@@ -57,15 +56,15 @@ BuyOptions.prototype.render = function () {
}, [
h('div.buy-modal-content-title', {
style: {},
- }, t(this.props.localeMessages, 'transfers')),
- h('div', {}, t(this.props.localeMessages, 'howToDeposit')),
+ }, this.props.t('transfers')),
+ h('div', {}, this.props.t('howToDeposit')),
]),
h('div.buy-modal-content-options.flex-column.flex-center', {}, [
isTestNetwork
- ? this.renderModalContentOption(networkName, t(this.props.localeMessages, 'testFaucet'), () => toFaucet(network))
- : this.renderModalContentOption('Coinbase', t(this.props.localeMessages, 'depositFiat'), () => toCoinbase(address)),
+ ? this.renderModalContentOption(networkName, this.props.t('testFaucet'), () => toFaucet(network))
+ : this.renderModalContentOption('Coinbase', this.props.t('depositFiat'), () => toCoinbase(address)),
// h('div.buy-modal-content-option', {}, [
// h('div.buy-modal-content-option-title', {}, 'Shapeshift'),
@@ -73,8 +72,8 @@ BuyOptions.prototype.render = function () {
// ]),,
this.renderModalContentOption(
- t(this.props.localeMessages, 'directDeposit'),
- t(this.props.localeMessages, 'depositFromAccount'),
+ this.props.t('directDeposit'),
+ this.props.t('depositFromAccount'),
() => this.goToAccountDetailsModal()
),
@@ -85,7 +84,7 @@ BuyOptions.prototype.render = function () {
background: 'white',
},
onClick: () => { this.props.hideModal() },
- }, h('div.buy-modal-content-footer#buy-modal-content-footer-text', {}, t(this.props.localeMessages, 'cancel'))),
+ }, h('div.buy-modal-content-footer#buy-modal-content-footer-text', {}, this.props.t('cancel'))),
]),
])
}