aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/app.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/app.js
parentbc0487006c623f1c81c186ba5b2a7137efb940ec (diff)
parentb91bd818c7c2aec2952036a2f69ab05e0690a06e (diff)
downloadtangerine-wallet-browser-cc246528b509b80e560715f3b315acf0764e99e7.tar.gz
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/app.js')
-rw-r--r--ui/app/app.js33
1 files changed, 19 insertions, 14 deletions
diff --git a/ui/app/app.js b/ui/app/app.js
index d1b17ab5d..0b7a7a1e0 100644
--- a/ui/app/app.js
+++ b/ui/app/app.js
@@ -2,9 +2,9 @@ const inherits = require('util').inherits
const Component = require('react').Component
const connect = require('react-redux').connect
const h = require('react-hyperscript')
+const PropTypes = require('prop-types')
const actions = require('./actions')
const classnames = require('classnames')
-const t = require('../i18n')
// mascara
const MascaraFirstTime = require('../../mascara/src/app/first-time').default
@@ -46,8 +46,13 @@ const QrView = require('./components/qr-code')
// Global Modals
const Modal = require('./components/modals/index').Modal
+App.contextTypes = {
+ t: PropTypes.func,
+}
+
module.exports = connect(mapStateToProps, mapDispatchToProps)(App)
+
inherits(App, Component)
function App () { Component.call(this) }
@@ -289,13 +294,13 @@ App.prototype.renderAppBar = function () {
h('img.metafox-icon', {
height: 42,
width: 42,
- src: '/images/metamask-fox.svg',
+ src: './images/metamask-fox.svg',
}),
// metamask name
h('.flex-row', [
- h('h1', t('appName')),
- h('div.beta-label', t('beta')),
+ h('h1', this.context.t('appName')),
+ h('div.beta-label', this.context.t('beta')),
]),
]),
@@ -557,15 +562,15 @@ App.prototype.getConnectingLabel = function () {
let name
if (providerName === 'mainnet') {
- name = t('connectingToMainnet')
+ name = this.context.t('connectingToMainnet')
} else if (providerName === 'ropsten') {
- name = t('connectingToRopsten')
+ name = this.context.t('connectingToRopsten')
} else if (providerName === 'kovan') {
- name = t('connectingToRopsten')
+ name = this.context.t('connectingToRopsten')
} else if (providerName === 'rinkeby') {
- name = t('connectingToRinkeby')
+ name = this.context.t('connectingToRinkeby')
} else {
- name = t('connectingToUnknown')
+ name = this.context.t('connectingToUnknown')
}
return name
@@ -578,15 +583,15 @@ App.prototype.getNetworkName = function () {
let name
if (providerName === 'mainnet') {
- name = t('mainnet')
+ name = this.context.t('mainnet')
} else if (providerName === 'ropsten') {
- name = t('ropsten')
+ name = this.context.t('ropsten')
} else if (providerName === 'kovan') {
- name = t('kovan')
+ name = this.context.t('kovan')
} else if (providerName === 'rinkeby') {
- name = t('rinkeby')
+ name = this.context.t('rinkeby')
} else {
- name = t('unknownNetwork')
+ name = this.context.t('unknownNetwork')
}
return name