aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/components/account-export.js
diff options
context:
space:
mode:
authornyatla <nyatla39@gmail.com>2018-04-10 16:14:28 +0800
committernyatla <nyatla39@gmail.com>2018-04-10 16:14:28 +0800
commitcc246528b509b80e560715f3b315acf0764e99e7 (patch)
treea04cc12e6c11345bf751726f15fa9d3dd6be4733 /ui/app/components/account-export.js
parentbc0487006c623f1c81c186ba5b2a7137efb940ec (diff)
parentb91bd818c7c2aec2952036a2f69ab05e0690a06e (diff)
downloadtangerine-wallet-browser-cc246528b509b80e560715f3b315acf0764e99e7.tar
tangerine-wallet-browser-cc246528b509b80e560715f3b315acf0764e99e7.tar.gz
tangerine-wallet-browser-cc246528b509b80e560715f3b315acf0764e99e7.tar.bz2
tangerine-wallet-browser-cc246528b509b80e560715f3b315acf0764e99e7.tar.lz
tangerine-wallet-browser-cc246528b509b80e560715f3b315acf0764e99e7.tar.xz
tangerine-wallet-browser-cc246528b509b80e560715f3b315acf0764e99e7.tar.zst
tangerine-wallet-browser-cc246528b509b80e560715f3b315acf0764e99e7.zip
Merge tag 'v4.5.5'
# Conflicts: # app/_locales/ja/messages.json # package-lock.json messages.jsonのローカライズ
Diffstat (limited to 'ui/app/components/account-export.js')
-rw-r--r--ui/app/components/account-export.js21
1 files changed, 13 insertions, 8 deletions
diff --git a/ui/app/components/account-export.js b/ui/app/components/account-export.js
index 5637bc8d0..865207487 100644
--- a/ui/app/components/account-export.js
+++ b/ui/app/components/account-export.js
@@ -1,15 +1,20 @@
const Component = require('react').Component
const h = require('react-hyperscript')
+const PropTypes = require('prop-types')
const inherits = require('util').inherits
const exportAsFile = require('../util').exportAsFile
const copyToClipboard = require('copy-to-clipboard')
const actions = require('../actions')
const ethUtil = require('ethereumjs-util')
const connect = require('react-redux').connect
-const t = require('../../i18n')
+
+ExportAccountView.contextTypes = {
+ t: PropTypes.func,
+}
module.exports = connect(mapStateToProps)(ExportAccountView)
+
inherits(ExportAccountView, Component)
function ExportAccountView () {
Component.call(this)
@@ -36,7 +41,7 @@ ExportAccountView.prototype.render = function () {
if (notExporting) return h('div')
if (exportRequested) {
- const warning = t('exportPrivateKeyWarning')
+ const warning = this.context.t('exportPrivateKeyWarning')
return (
h('div', {
style: {
@@ -54,7 +59,7 @@ ExportAccountView.prototype.render = function () {
h('p.error', warning),
h('input#exportAccount.sizing-input', {
type: 'password',
- placeholder: t('confirmPassword').toLowerCase(),
+ placeholder: this.context.t('confirmPassword').toLowerCase(),
onKeyPress: this.onExportKeyPress.bind(this),
style: {
position: 'relative',
@@ -75,10 +80,10 @@ ExportAccountView.prototype.render = function () {
style: {
marginRight: '10px',
},
- }, t('submit')),
+ }, this.context.t('submit')),
h('button', {
onClick: () => this.props.dispatch(actions.backToAccountDetail(this.props.address)),
- }, t('cancel')),
+ }, this.context.t('cancel')),
]),
(this.props.warning) && (
h('span.error', {
@@ -99,7 +104,7 @@ ExportAccountView.prototype.render = function () {
margin: '0 20px',
},
}, [
- h('label', t('copyPrivateKey') + ':'),
+ h('label', this.context.t('copyPrivateKey') + ':'),
h('p.error.cursor-pointer', {
style: {
textOverflow: 'ellipsis',
@@ -113,13 +118,13 @@ ExportAccountView.prototype.render = function () {
}, plainKey),
h('button', {
onClick: () => this.props.dispatch(actions.backToAccountDetail(this.props.address)),
- }, t('done')),
+ }, this.context.t('done')),
h('button', {
style: {
marginLeft: '10px',
},
onClick: () => exportAsFile(`MetaMask ${nickname} Private Key`, plainKey),
- }, t('saveAsFile')),
+ }, this.context.t('saveAsFile')),
])
}
}