1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 09:52:26 +01:00

Add i18n back into JsonImportSubview

This commit is contained in:
Thomas 2018-03-12 08:07:12 -07:00
parent b7c7083a11
commit 208b3bc4c1

View File

@ -24,11 +24,11 @@ class JsonImportSubview extends Component {
return ( return (
h('div.new-account-import-form__json', [ h('div.new-account-import-form__json', [
h('p', 'Used by a variety of different clients'), h('p', t('usedByClients')),
h('a.warning', { h('a.warning', {
href: HELP_LINK, href: HELP_LINK,
target: '_blank', target: '_blank',
}, 'File import not working? Click here!'), }, t('fileImportFail')),
h(FileInput, { h(FileInput, {
readAs: 'text', readAs: 'text',
@ -43,7 +43,7 @@ class JsonImportSubview extends Component {
h('input.new-account-import-form__input-password', { h('input.new-account-import-form__input-password', {
type: 'password', type: 'password',
placeholder: 'Enter password', placeholder: t('enterPassword'),
id: 'json-password-box', id: 'json-password-box',
onKeyPress: this.createKeyringOnEnter.bind(this), onKeyPress: this.createKeyringOnEnter.bind(this),
}), }),
@ -53,13 +53,13 @@ class JsonImportSubview extends Component {
h('button.new-account-create-form__button-cancel', { h('button.new-account-create-form__button-cancel', {
onClick: () => this.props.goHome(), onClick: () => this.props.goHome(),
}, [ }, [
'CANCEL', t('cancel'),
]), ]),
h('button.new-account-create-form__button-create', { h('button.new-account-create-form__button-create', {
onClick: () => this.createNewKeychain(), onClick: () => this.createNewKeychain(),
}, [ }, [
'IMPORT', t('import'),
]), ]),
]), ]),
@ -91,7 +91,7 @@ class JsonImportSubview extends Component {
const { fileContents } = state const { fileContents } = state
if (!fileContents) { if (!fileContents) {
const message = 'You must select a file to import.' const message = t('needImportFile')
return this.props.displayWarning(message) return this.props.displayWarning(message)
} }
@ -99,7 +99,7 @@ class JsonImportSubview extends Component {
const password = passwordInput.value const password = passwordInput.value
if (!password) { if (!password) {
const message = 'You must enter a password for the selected file.' const message = t('needImportPassword')
return this.props.displayWarning(message) return this.props.displayWarning(message)
} }