aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/components/modals/deposit-ether-modal.js
diff options
context:
space:
mode:
Diffstat (limited to 'ui/app/components/modals/deposit-ether-modal.js')
-rw-r--r--ui/app/components/modals/deposit-ether-modal.js34
1 files changed, 22 insertions, 12 deletions
diff --git a/ui/app/components/modals/deposit-ether-modal.js b/ui/app/components/modals/deposit-ether-modal.js
index 26ff3ea03..03304207e 100644
--- a/ui/app/components/modals/deposit-ether-modal.js
+++ b/ui/app/components/modals/deposit-ether-modal.js
@@ -5,15 +5,16 @@ const connect = require('react-redux').connect
const actions = require('../../actions')
const networkNames = require('../../../../app/scripts/config.js').networkNames
const ShapeshiftForm = require('../shapeshift-form')
-const t = require('../../../i18n')
-
-const DIRECT_DEPOSIT_ROW_TITLE = t('directDepositEther')
-const DIRECT_DEPOSIT_ROW_TEXT = t('directDepositEtherExplainer')
-const COINBASE_ROW_TITLE = t('buyCoinbase')
-const COINBASE_ROW_TEXT = t('buyCoinbaseExplainer')
-const SHAPESHIFT_ROW_TITLE = t('depositShapeShift')
-const SHAPESHIFT_ROW_TEXT = t('depositShapeShiftExplainer')
-const FAUCET_ROW_TITLE = t('testFaucet')
+const t = global.getMessage
+
+let DIRECT_DEPOSIT_ROW_TITLE
+let DIRECT_DEPOSIT_ROW_TEXT
+let COINBASE_ROW_TITLE
+let COINBASE_ROW_TEXT
+let SHAPESHIFT_ROW_TITLE
+let SHAPESHIFT_ROW_TEXT
+let FAUCET_ROW_TITLE
+
const facuetRowText = (networkName) => {
return t('getEtherFromFaucet', [networkName])
}
@@ -47,6 +48,15 @@ inherits(DepositEtherModal, Component)
function DepositEtherModal () {
Component.call(this)
+ // need to set after i18n locale has loaded
+ DIRECT_DEPOSIT_ROW_TITLE = t('directDepositEther')
+ DIRECT_DEPOSIT_ROW_TEXT = t('directDepositEtherExplainer')
+ COINBASE_ROW_TITLE = t('buyCoinbase')
+ COINBASE_ROW_TEXT = t('buyCoinbaseExplainer')
+ SHAPESHIFT_ROW_TITLE = t('depositShapeShift')
+ SHAPESHIFT_ROW_TEXT = t('depositShapeShiftExplainer')
+ FAUCET_ROW_TITLE = t('testFaucet')
+
this.state = {
buyingWithShapeshift: false,
}
@@ -128,9 +138,9 @@ DepositEtherModal.prototype.render = function () {
}),
]),
-
+
h('.page-container__content', {}, [
-
+
h('div.deposit-ether-modal__buy-rows', [
this.renderRow({
@@ -164,7 +174,7 @@ DepositEtherModal.prototype.render = function () {
onButtonClick: () => toCoinbase(address),
hide: isTestNetwork || buyingWithShapeshift,
}),
-
+
this.renderRow({
logo: h('div.deposit-ether-modal__logo', {
style: {