aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/accounts/new-account
diff options
context:
space:
mode:
Diffstat (limited to 'ui/app/accounts/new-account')
-rw-r--r--ui/app/accounts/new-account/create-form.js15
-rw-r--r--ui/app/accounts/new-account/index.js10
2 files changed, 13 insertions, 12 deletions
diff --git a/ui/app/accounts/new-account/create-form.js b/ui/app/accounts/new-account/create-form.js
index 8ef842a2a..6eed0215c 100644
--- a/ui/app/accounts/new-account/create-form.js
+++ b/ui/app/accounts/new-account/create-form.js
@@ -1,9 +1,9 @@
const { Component } = require('react')
const PropTypes = require('prop-types')
const h = require('react-hyperscript')
-const { connect } = require('react-redux')
+const connect = require('../../metamask-connect')
const actions = require('../../actions')
-const t = require('../../../i18n')
+const t = require('../../../i18n-helper').getMessage
class NewAccountCreateForm extends Component {
constructor (props) {
@@ -14,18 +14,18 @@ class NewAccountCreateForm extends Component {
this.state = {
newAccountName: '',
- defaultAccountName: t('newAccountNumberName', [newAccountNumber]),
+ defaultAccountName: t(this.props.localeMessages, 'newAccountNumberName', [newAccountNumber]),
}
}
render () {
const { newAccountName, defaultAccountName } = this.state
-
+
return h('div.new-account-create-form', [
h('div.new-account-create-form__input-label', {}, [
- t('accountName'),
+ t(this.props.localeMessages, 'accountName'),
]),
h('div.new-account-create-form__input-wrapper', {}, [
@@ -41,13 +41,13 @@ class NewAccountCreateForm extends Component {
h('button.new-account-create-form__button-cancel.allcaps', {
onClick: () => this.props.goHome(),
}, [
- t('cancel'),
+ t(this.props.localeMessages, 'cancel'),
]),
h('button.new-account-create-form__button-create.allcaps', {
onClick: () => this.props.createAccount(newAccountName || defaultAccountName),
}, [
- t('create'),
+ t(this.props.localeMessages, 'create'),
]),
]),
@@ -62,6 +62,7 @@ NewAccountCreateForm.propTypes = {
createAccount: PropTypes.func,
goHome: PropTypes.func,
numberOfExistingAccounts: PropTypes.number,
+ localeMessages: PropTypes.object,
}
const mapStateToProps = state => {
diff --git a/ui/app/accounts/new-account/index.js b/ui/app/accounts/new-account/index.js
index 854568c77..8c305bfae 100644
--- a/ui/app/accounts/new-account/index.js
+++ b/ui/app/accounts/new-account/index.js
@@ -1,9 +1,9 @@
const Component = require('react').Component
const h = require('react-hyperscript')
const inherits = require('util').inherits
-const connect = require('react-redux').connect
+const connect = require('../../metamask-connect')
const actions = require('../../actions')
-const t = require('../../../i18n')
+const t = require('../../../i18n-helper').getMessage
const { getCurrentViewContext } = require('../../selectors')
const classnames = require('classnames')
@@ -46,7 +46,7 @@ AccountDetailsModal.prototype.render = function () {
h('div.new-account__header', [
- h('div.new-account__title', t('newAccount')),
+ h('div.new-account__title', t(this.props.localeMessages, 'newAccount')),
h('div.new-account__tabs', [
@@ -56,7 +56,7 @@ AccountDetailsModal.prototype.render = function () {
'new-account__tabs__unselected cursor-pointer': displayedForm !== 'CREATE',
}),
onClick: () => displayForm('CREATE'),
- }, t('createDen')),
+ }, t(this.props.localeMessages, 'createDen')),
h('div.new-account__tabs__tab', {
className: classnames('new-account__tabs__tab', {
@@ -64,7 +64,7 @@ AccountDetailsModal.prototype.render = function () {
'new-account__tabs__unselected cursor-pointer': displayedForm !== 'IMPORT',
}),
onClick: () => displayForm('IMPORT'),
- }, t('import')),
+ }, t(this.props.localeMessages, 'import')),
]),