From 5fe0be722b6514692a68e920ee8058c5d572237d Mon Sep 17 00:00:00 2001 From: Dan Date: Thu, 15 Mar 2018 21:59:45 -0230 Subject: Handle i18n with redux. --- ui/app/keychains/hd/recover-seed/confirmation.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ui/app/keychains/hd/recover-seed/confirmation.js') diff --git a/ui/app/keychains/hd/recover-seed/confirmation.js b/ui/app/keychains/hd/recover-seed/confirmation.js index 4335186a5..5f323f7a1 100644 --- a/ui/app/keychains/hd/recover-seed/confirmation.js +++ b/ui/app/keychains/hd/recover-seed/confirmation.js @@ -1,7 +1,7 @@ const inherits = require('util').inherits const Component = require('react').Component -const connect = require('react-redux').connect +const connect = require('../../../metamask-connect') const h = require('react-hyperscript') const actions = require('../../../actions') -- cgit From d24a0590d363dbe88d383c8faec8eb28809242f0 Mon Sep 17 00:00:00 2001 From: Dan Date: Wed, 21 Mar 2018 22:11:47 -0230 Subject: i18n redux solution doesn't require importing t() and passing state to each t() call; t is just available on props. --- ui/app/keychains/hd/recover-seed/confirmation.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'ui/app/keychains/hd/recover-seed/confirmation.js') diff --git a/ui/app/keychains/hd/recover-seed/confirmation.js b/ui/app/keychains/hd/recover-seed/confirmation.js index 4a62c8803..f97ac66fe 100644 --- a/ui/app/keychains/hd/recover-seed/confirmation.js +++ b/ui/app/keychains/hd/recover-seed/confirmation.js @@ -4,7 +4,6 @@ const Component = require('react').Component const connect = require('../../../metamask-connect') const h = require('react-hyperscript') const actions = require('../../../actions') -const t = require('../../../../i18n') module.exports = connect(mapStateToProps)(RevealSeedConfirmation) @@ -50,13 +49,13 @@ RevealSeedConfirmation.prototype.render = function () { }, }, [ - h('h4', t('revealSeedWordsWarning')), + h('h4', this.props.t('revealSeedWordsWarning')), // confirmation h('input.large-input.letter-spacey', { type: 'password', id: 'password-box', - placeholder: t('enterPasswordConfirm'), + placeholder: this.props.t('enterPasswordConfirm'), onKeyPress: this.checkConfirmation.bind(this), style: { width: 260, @@ -92,7 +91,7 @@ RevealSeedConfirmation.prototype.render = function () { ), props.inProgress && ( - h('span.in-progress-notification', t('generatingSeed')) + h('span.in-progress-notification', this.props.t('generatingSeed')) ), ]), ]) -- cgit