aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/accounts/import/json.js
diff options
context:
space:
mode:
authorDan <danjm.com@gmail.com>2018-03-16 08:29:45 +0800
committerDan <danjm.com@gmail.com>2018-03-16 08:29:45 +0800
commit5fe0be722b6514692a68e920ee8058c5d572237d (patch)
tree58da5c62f17cbd0160d24e44918aa34b4ee23300 /ui/app/accounts/import/json.js
parenteb5a84975b490664aa6238be6ceab3d4749167ee (diff)
downloadtangerine-wallet-browser-5fe0be722b6514692a68e920ee8058c5d572237d.tar.gz
tangerine-wallet-browser-5fe0be722b6514692a68e920ee8058c5d572237d.tar.zst
tangerine-wallet-browser-5fe0be722b6514692a68e920ee8058c5d572237d.zip
Handle i18n with redux.
Diffstat (limited to 'ui/app/accounts/import/json.js')
-rw-r--r--ui/app/accounts/import/json.js18
1 files changed, 9 insertions, 9 deletions
diff --git a/ui/app/accounts/import/json.js b/ui/app/accounts/import/json.js
index 187abcc6a..b3f412e98 100644
--- a/ui/app/accounts/import/json.js
+++ b/ui/app/accounts/import/json.js
@@ -1,10 +1,10 @@
const Component = require('react').Component
const PropTypes = require('prop-types')
const h = require('react-hyperscript')
-const connect = require('react-redux').connect
+const connect = require('../../metamask-connect')
const actions = require('../../actions')
const FileInput = require('react-simple-file-input').default
-const t = global.getMessage
+const t = require('../../../i18n-helper').getMessage
const HELP_LINK = 'https://support.metamask.io/kb/article/7-importing-accounts'
@@ -25,11 +25,11 @@ class JsonImportSubview extends Component {
return (
h('div.new-account-import-form__json', [
- h('p', t('usedByClients')),
+ h('p', t(this.props.localeMessages, 'usedByClients')),
h('a.warning', {
href: HELP_LINK,
target: '_blank',
- }, t('fileImportFail')),
+ }, t(this.props.localeMessages, 'fileImportFail')),
h(FileInput, {
readAs: 'text',
@@ -44,7 +44,7 @@ class JsonImportSubview extends Component {
h('input.new-account-import-form__input-password', {
type: 'password',
- placeholder: t('enterPassword'),
+ placeholder: t(this.props.localeMessages, 'enterPassword'),
id: 'json-password-box',
onKeyPress: this.createKeyringOnEnter.bind(this),
}),
@@ -54,13 +54,13 @@ class JsonImportSubview extends Component {
h('button.new-account-create-form__button-cancel', {
onClick: () => this.props.goHome(),
}, [
- t('cancel'),
+ t(this.props.localeMessages, 'cancel'),
]),
h('button.new-account-create-form__button-create', {
onClick: () => this.createNewKeychain(),
}, [
- t('import'),
+ t(this.props.localeMessages, 'import'),
]),
]),
@@ -92,7 +92,7 @@ class JsonImportSubview extends Component {
const { fileContents } = state
if (!fileContents) {
- const message = t('needImportFile')
+ const message = t(this.props.localeMessages, 'needImportFile')
return this.props.displayWarning(message)
}
@@ -100,7 +100,7 @@ class JsonImportSubview extends Component {
const password = passwordInput.value
if (!password) {
- const message = t('needImportPassword')
+ const message = t(this.props.localeMessages, 'needImportPassword')
return this.props.displayWarning(message)
}