diff options
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/hex-as-decimal-input.js')
-rw-r--r-- | ui/app/components/hex-as-decimal-input.js | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/ui/app/components/hex-as-decimal-input.js b/ui/app/components/hex-as-decimal-input.js index 7e53ba2f0..be7ba4c9e 100644 --- a/ui/app/components/hex-as-decimal-input.js +++ b/ui/app/components/hex-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 = HexAsDecimalInput +module.exports = connect()(HexAsDecimalInput) inherits(HexAsDecimalInput, Component) function HexAsDecimalInput () { @@ -127,13 +127,13 @@ HexAsDecimalInput.prototype.constructWarning = function () { let message = name ? name + ' ' : '' if (min && max) { - message += t(this.props.localeMessages, 'betweenMinAndMax', [min, max]) + message += this.props.t('betweenMinAndMax', [min, max]) } else if (min) { - message += t(this.props.localeMessages, 'greaterThanMin', [min]) + message += this.props.t('greaterThanMin', [min]) } else if (max) { - message += t(this.props.localeMessages, 'lessThanMax', [max]) + message += this.props.t('lessThanMax', [max]) } else { - message += t(this.props.localeMessages, 'invalidInput') + message += this.props.t('invalidInput') } return message |