aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/components/bn-as-decimal-input.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/bn-as-decimal-input.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/bn-as-decimal-input.js')
-rw-r--r--ui/app/components/bn-as-decimal-input.js12
1 files changed, 6 insertions, 6 deletions
diff --git a/ui/app/components/bn-as-decimal-input.js b/ui/app/components/bn-as-decimal-input.js
index 5b83b4332..0ace2b840 100644
--- a/ui/app/components/bn-as-decimal-input.js
+++ b/ui/app/components/bn-as-decimal-input.js
@@ -4,9 +4,9 @@ const inherits = require('util').inherits
const ethUtil = require('ethereumjs-util')
const BN = ethUtil.BN
const extend = require('xtend')
-const t = require('../../i18n-helper').getMessage
+const connect = require('../metamask-connect')
-module.exports = BnAsDecimalInput
+module.exports = connect()(BnAsDecimalInput)
inherits(BnAsDecimalInput, Component)
function BnAsDecimalInput () {
@@ -137,13 +137,13 @@ BnAsDecimalInput.prototype.constructWarning = function () {
let message = name ? name + ' ' : ''
if (min && max) {
- message += t(this.props.localeMessages, 'betweenMinAndMax', [`${newMin} ${suffix}`, `${newMax} ${suffix}`])
+ message += this.props.t('betweenMinAndMax', [`${newMin} ${suffix}`, `${newMax} ${suffix}`])
} else if (min) {
- message += t(this.props.localeMessages, 'greaterThanMin', [`${newMin} ${suffix}`])
+ message += this.props.t('greaterThanMin', [`${newMin} ${suffix}`])
} else if (max) {
- message += t(this.props.localeMessages, 'lessThanMax', [`${newMax} ${suffix}`])
+ message += this.props.t('lessThanMax', [`${newMax} ${suffix}`])
} else {
- message += t(this.props.localeMessages, 'invalidInput')
+ message += this.props.t('invalidInput')
}
return message