aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/first-time/init-menu.js
diff options
context:
space:
mode:
Diffstat (limited to 'ui/app/first-time/init-menu.js')
-rw-r--r--ui/app/first-time/init-menu.js25
1 files changed, 16 insertions, 9 deletions
diff --git a/ui/app/first-time/init-menu.js b/ui/app/first-time/init-menu.js
index b4587f1ee..c496690a7 100644
--- a/ui/app/first-time/init-menu.js
+++ b/ui/app/first-time/init-menu.js
@@ -10,6 +10,13 @@ const getCaretCoordinates = require('textarea-caret')
let isSubmitting = false
+let t = chrome.i18n.getMessage || (function() {
+ let msg = require('../../../app/_locales/en/messages.json');
+ return (function(key) {
+ return msg[key].message;
+ });
+})();
+
module.exports = connect(mapStateToProps)(InitializeMenuScreen)
inherits(InitializeMenuScreen, Component)
@@ -57,7 +64,7 @@ InitializeMenuScreen.prototype.renderMenu = function (state) {
color: '#7F8082',
marginBottom: 10,
},
- }, 'MetaMask'),
+ }, t('appName')),
h('div', [
@@ -67,10 +74,10 @@ InitializeMenuScreen.prototype.renderMenu = function (state) {
color: '#7F8082',
display: 'inline',
},
- }, 'Encrypt your new DEN'),
+ }, t('encryptNewDen')),
h(Tooltip, {
- title: 'Your DEN is your password-encrypted storage within MetaMask.',
+ title: t('denExplainer'),
}, [
h('i.fa.fa-question-circle.pointer', {
style: {
@@ -90,7 +97,7 @@ InitializeMenuScreen.prototype.renderMenu = function (state) {
h('input.large-input.letter-spacey', {
type: 'password',
id: 'password-box',
- placeholder: 'New Password (min 8 chars)',
+ placeholder: t('newPassword'),
onInput: this.inputChanged.bind(this),
style: {
width: 260,
@@ -102,7 +109,7 @@ InitializeMenuScreen.prototype.renderMenu = function (state) {
h('input.large-input.letter-spacey', {
type: 'password',
id: 'password-box-confirm',
- placeholder: 'Confirm Password',
+ placeholder: t('confirmPassword'),
onKeyPress: this.createVaultOnEnter.bind(this),
onInput: this.inputChanged.bind(this),
style: {
@@ -117,7 +124,7 @@ InitializeMenuScreen.prototype.renderMenu = function (state) {
style: {
margin: 12,
},
- }, 'Create'),
+ }, t('createDen')),
h('.flex-row.flex-center.flex-grow', [
h('p.pointer', {
@@ -127,7 +134,7 @@ InitializeMenuScreen.prototype.renderMenu = function (state) {
color: 'rgb(247, 134, 28)',
textDecoration: 'underline',
},
- }, 'Import Existing DEN'),
+ }, t('importDen')),
]),
])
@@ -156,12 +163,12 @@ InitializeMenuScreen.prototype.createNewVaultAndKeychain = function () {
var passwordConfirm = passwordConfirmBox.value
if (password.length < 8) {
- this.warning = 'password not long enough'
+ this.warning = t('passwordShort')
this.props.dispatch(actions.displayWarning(this.warning))
return
}
if (password !== passwordConfirm) {
- this.warning = 'passwords don\'t match'
+ this.warning = t('passwordMismatch')
this.props.dispatch(actions.displayWarning(this.warning))
return
}