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/components/modals/new-account-modal.js | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'ui/app/components/modals/new-account-modal.js') diff --git a/ui/app/components/modals/new-account-modal.js b/ui/app/components/modals/new-account-modal.js index 23613ec9c..c46980855 100644 --- a/ui/app/components/modals/new-account-modal.js +++ b/ui/app/components/modals/new-account-modal.js @@ -3,7 +3,6 @@ const PropTypes = require('prop-types') const h = require('react-hyperscript') const connect = require('../../metamask-connect') const actions = require('../../actions') -const t = require('../../../i18n-helper').getMessage class NewAccountModal extends Component { constructor (props) { @@ -23,7 +22,7 @@ class NewAccountModal extends Component { h('div.new-account-modal-wrapper', { }, [ h('div.new-account-modal-header', {}, [ - t(this.props.localeMessages, 'newAccount'), + this.props.t('newAccount'), ]), h('div.modal-close-x', { @@ -31,19 +30,19 @@ class NewAccountModal extends Component { }), h('div.new-account-modal-content', {}, [ - t(this.props.localeMessages, 'accountName'), + this.props.t('accountName'), ]), h('div.new-account-input-wrapper', {}, [ h('input.new-account-input', { value: this.state.newAccountName, - placeholder: t(this.props.localeMessages, 'sampleAccountName'), + placeholder: this.props.t('sampleAccountName'), onChange: event => this.setState({ newAccountName: event.target.value }), }, []), ]), h('div.new-account-modal-content.after-input', {}, [ - t(this.props.localeMessages, 'or'), + this.props.t('or'), ]), h('div.new-account-modal-content.after-input.pointer', { @@ -51,13 +50,13 @@ class NewAccountModal extends Component { this.props.hideModal() this.props.showImportPage() }, - }, t(this.props.localeMessages, 'importAnAccount')), + }, this.props.t('importAnAccount')), h('div.new-account-modal-content.button.allcaps', {}, [ h('button.btn-clear', { onClick: () => this.props.createAccount(newAccountName), }, [ - t(this.props.localeMessages, 'save'), + this.props.t('save'), ]), ]), ]), -- cgit