diff options
author | kumavis <kumavis@users.noreply.github.com> | 2018-03-28 09:41:45 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-03-28 09:41:45 +0800 |
commit | 0582fdb617a23cc56e9e08460f09d86769599fc1 (patch) | |
tree | 5daf844ac1fd0c9d1f683b479184509ebb96c850 /ui/app/components/buy-button-subview.js | |
parent | b6b18339e2de92afd2fb5364ec5bc4c29b4d10a3 (diff) | |
parent | b4ec68b2d4b6713e0a203df88eb4a8982c2cf2c6 (diff) | |
download | tangerine-wallet-browser-0582fdb617a23cc56e9e08460f09d86769599fc1.tar tangerine-wallet-browser-0582fdb617a23cc56e9e08460f09d86769599fc1.tar.gz tangerine-wallet-browser-0582fdb617a23cc56e9e08460f09d86769599fc1.tar.bz2 tangerine-wallet-browser-0582fdb617a23cc56e9e08460f09d86769599fc1.tar.lz tangerine-wallet-browser-0582fdb617a23cc56e9e08460f09d86769599fc1.tar.xz tangerine-wallet-browser-0582fdb617a23cc56e9e08460f09d86769599fc1.tar.zst tangerine-wallet-browser-0582fdb617a23cc56e9e08460f09d86769599fc1.zip |
Merge pull request #3609 from MetaMask/i18n-translator-redux
Handle i18n with redux.
Diffstat (limited to 'ui/app/components/buy-button-subview.js')
-rw-r--r-- | ui/app/components/buy-button-subview.js | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/ui/app/components/buy-button-subview.js b/ui/app/components/buy-button-subview.js index 1e277a94b..eafa2af91 100644 --- a/ui/app/components/buy-button-subview.js +++ b/ui/app/components/buy-button-subview.js @@ -1,7 +1,7 @@ const Component = require('react').Component const h = require('react-hyperscript') const inherits = require('util').inherits -const connect = require('react-redux').connect +const connect = require('../metamask-connect') const actions = require('../actions') const CoinbaseForm = require('./coinbase-form') const ShapeshiftForm = require('./shapeshift-form') @@ -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') module.exports = connect(mapStateToProps)(BuyButtonSubview) @@ -77,7 +76,7 @@ BuyButtonSubview.prototype.headerSubview = function () { paddingTop: '4px', paddingBottom: '4px', }, - }, t('depositEth')), + }, this.props.t('depositEth')), ]), // loading indication @@ -119,7 +118,7 @@ BuyButtonSubview.prototype.headerSubview = function () { paddingTop: '4px', paddingBottom: '4px', }, - }, t('selectService')), + }, this.props.t('selectService')), ]), ]) @@ -144,7 +143,7 @@ BuyButtonSubview.prototype.primarySubview = function () { case '4': case '42': const networkName = networkNames[network] - const label = `${networkName} ${t('testFaucet')}` + const label = `${networkName} ${this.props.t('testFaucet')}` return ( h('div.flex-column', { style: { @@ -165,14 +164,14 @@ BuyButtonSubview.prototype.primarySubview = function () { style: { marginTop: '15px', }, - }, t('borrowDharma')) + }, this.props.t('borrowDharma')) ) : null, ]) ) default: return ( - h('h2.error', t('unknownNetworkId')) + h('h2.error', this.props.t('unknownNetworkId')) ) } @@ -204,8 +203,8 @@ BuyButtonSubview.prototype.mainnetSubview = function () { 'ShapeShift', ], subtext: { - 'Coinbase': `${t('crypto')}/${t('fiat')} (${t('usaOnly')})`, - 'ShapeShift': t('crypto'), + 'Coinbase': `${this.props.t('crypto')}/${this.props.t('fiat')} (${this.props.t('usaOnly')})`, + 'ShapeShift': this.props.t('crypto'), }, onClick: this.radioHandler.bind(this), }), |