mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
Fixed t() calls where localeMessages is missing; and fix incorrect connect reference.
This commit is contained in:
parent
5733820024
commit
09260f9c5e
@ -280,16 +280,16 @@ CustomizeGasModal.prototype.render = function () {
|
|||||||
|
|
||||||
h('div.send-v2__customize-gas__revert', {
|
h('div.send-v2__customize-gas__revert', {
|
||||||
onClick: () => this.revert(),
|
onClick: () => this.revert(),
|
||||||
}, [t('revert')]),
|
}, [t(this.props.localeMessages, 'revert')]),
|
||||||
|
|
||||||
h('div.send-v2__customize-gas__buttons', [
|
h('div.send-v2__customize-gas__buttons', [
|
||||||
h('div.send-v2__customize-gas__cancel.allcaps', {
|
h('div.send-v2__customize-gas__cancel.allcaps', {
|
||||||
onClick: this.props.hideModal,
|
onClick: this.props.hideModal,
|
||||||
}, [t('cancel')]),
|
}, [t(this.props.localeMessages, 'cancel')]),
|
||||||
|
|
||||||
h(`div.send-v2__customize-gas__save${error ? '__error' : ''}.allcaps`, {
|
h(`div.send-v2__customize-gas__save${error ? '__error' : ''}.allcaps`, {
|
||||||
onClick: () => !error && this.save(gasPrice, gasLimit, gasTotal),
|
onClick: () => !error && this.save(gasPrice, gasLimit, gasTotal),
|
||||||
}, [t('save')]),
|
}, [t(this.props.localeMessages, 'save')]),
|
||||||
]),
|
]),
|
||||||
|
|
||||||
]),
|
]),
|
||||||
|
@ -123,7 +123,7 @@ DepositEtherModal.prototype.render = function () {
|
|||||||
|
|
||||||
h('div.page-container__header', [
|
h('div.page-container__header', [
|
||||||
|
|
||||||
h('div.page-container__title', [t('depositEther')]),
|
h('div.page-container__title', [t(this.props.localeMessages, 'depositEther')]),
|
||||||
|
|
||||||
h('div.page-container__subtitle', [
|
h('div.page-container__subtitle', [
|
||||||
t(this.props.localeMessages, 'needEtherInWallet'),
|
t(this.props.localeMessages, 'needEtherInWallet'),
|
||||||
|
@ -51,7 +51,7 @@ EditAccountNameModal.prototype.render = function () {
|
|||||||
]),
|
]),
|
||||||
|
|
||||||
h('div.edit-account-name-modal-title', {
|
h('div.edit-account-name-modal-title', {
|
||||||
}, [t('editAccountName')]),
|
}, [t(this.props.localeMessages, 'editAccountName')]),
|
||||||
|
|
||||||
h('input.edit-account-name-modal-input', {
|
h('input.edit-account-name-modal-input', {
|
||||||
placeholder: identity.name,
|
placeholder: identity.name,
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
const { Component } = require('react')
|
const { Component } = require('react')
|
||||||
const PropTypes = require('prop-types')
|
const PropTypes = require('prop-types')
|
||||||
const h = require('react-hyperscript')
|
const h = require('react-hyperscript')
|
||||||
const { connect } = require('react-redux')
|
const connect = require('../../metamask-connect')
|
||||||
const actions = require('../../actions')
|
const actions = require('../../actions')
|
||||||
const t = require('../../../i18n-helper').getMessage
|
const t = require('../../../i18n-helper').getMessage
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
const { Component } = require('react')
|
const { Component } = require('react')
|
||||||
const PropTypes = require('prop-types')
|
const PropTypes = require('prop-types')
|
||||||
const h = require('react-hyperscript')
|
const h = require('react-hyperscript')
|
||||||
const { connect } = require('react-redux')
|
const connect = require('../../metamask-connect')
|
||||||
const actions = require('../../actions')
|
const actions = require('../../actions')
|
||||||
const t = require('../../../i18n-helper').getMessage
|
const t = require('../../../i18n-helper').getMessage
|
||||||
|
|
||||||
@ -23,12 +23,12 @@ class NotificationModal extends Component {
|
|||||||
}, [
|
}, [
|
||||||
|
|
||||||
h('div.notification-modal__header', {}, [
|
h('div.notification-modal__header', {}, [
|
||||||
t(header),
|
t(this.props.localeMessages, header),
|
||||||
]),
|
]),
|
||||||
|
|
||||||
h('div.notification-modal__message-wrapper', {}, [
|
h('div.notification-modal__message-wrapper', {}, [
|
||||||
h('div.notification-modal__message', {}, [
|
h('div.notification-modal__message', {}, [
|
||||||
t(message),
|
t(this.props.localeMessages, message),
|
||||||
]),
|
]),
|
||||||
]),
|
]),
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
const { Component } = require('react')
|
const { Component } = require('react')
|
||||||
const PropTypes = require('prop-types')
|
const PropTypes = require('prop-types')
|
||||||
const h = require('react-hyperscript')
|
const h = require('react-hyperscript')
|
||||||
const { connect } = require('react-redux')
|
const connect = require('../../../metamask-connect')
|
||||||
const actions = require('../../../actions')
|
const actions = require('../../../actions')
|
||||||
const NotifcationModal = require('../notification-modal')
|
const NotifcationModal = require('../notification-modal')
|
||||||
|
|
||||||
|
@ -1,11 +1,12 @@
|
|||||||
const Component = require('react').Component
|
const Component = require('react').Component
|
||||||
const h = require('react-hyperscript')
|
const h = require('react-hyperscript')
|
||||||
|
const connect = require('../metamask-connect')
|
||||||
const classnames = require('classnames')
|
const classnames = require('classnames')
|
||||||
const inherits = require('util').inherits
|
const inherits = require('util').inherits
|
||||||
const NetworkDropdownIcon = require('./dropdowns/components/network-dropdown-icon')
|
const NetworkDropdownIcon = require('./dropdowns/components/network-dropdown-icon')
|
||||||
const t = require('../../i18n-helper').getMessage
|
const t = require('../../i18n-helper').getMessage
|
||||||
|
|
||||||
module.exports = Network
|
module.exports = connect()(Network)
|
||||||
|
|
||||||
inherits(Network, Component)
|
inherits(Network, Component)
|
||||||
|
|
||||||
@ -78,6 +79,8 @@ Network.prototype.render = function () {
|
|||||||
},
|
},
|
||||||
}, [
|
}, [
|
||||||
(function () {
|
(function () {
|
||||||
|
console.log(`12312312312312312 props.localeMessages`, props.localeMessages);
|
||||||
|
console.log(`12312312312312312 t(props.localeMessages, 'mainnet')`, t(props.localeMessages, 'mainnet'));
|
||||||
switch (iconName) {
|
switch (iconName) {
|
||||||
case 'ethereum-network':
|
case 'ethereum-network':
|
||||||
return h('.network-indicator', [
|
return h('.network-indicator', [
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
const { Component } = require('react')
|
const { Component } = require('react')
|
||||||
const { connect } = require('react-redux')
|
const connect = require('../../metamask-connect')
|
||||||
const h = require('react-hyperscript')
|
const h = require('react-hyperscript')
|
||||||
const PropTypes = require('prop-types')
|
const PropTypes = require('prop-types')
|
||||||
const actions = require('../../actions')
|
const actions = require('../../actions')
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
const Component = require('react').Component
|
const Component = require('react').Component
|
||||||
const { connect } = require('react-redux')
|
const connect = require('../../metamask-connect')
|
||||||
const h = require('react-hyperscript')
|
const h = require('react-hyperscript')
|
||||||
const inherits = require('util').inherits
|
const inherits = require('util').inherits
|
||||||
const actions = require('../../actions')
|
const actions = require('../../actions')
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
const Component = require('react').Component
|
const Component = require('react').Component
|
||||||
const { connect } = require('react-redux')
|
const connect = require('../../metamask-connect')
|
||||||
const h = require('react-hyperscript')
|
const h = require('react-hyperscript')
|
||||||
const inherits = require('util').inherits
|
const inherits = require('util').inherits
|
||||||
const tokenAbi = require('human-standard-token-abi')
|
const tokenAbi = require('human-standard-token-abi')
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
const Component = require('react').Component
|
const Component = require('react').Component
|
||||||
const { connect } = require('react-redux')
|
const connect = require('../../metamask-connect')
|
||||||
const h = require('react-hyperscript')
|
const h = require('react-hyperscript')
|
||||||
const clone = require('clone')
|
const clone = require('clone')
|
||||||
const abi = require('human-standard-token-abi')
|
const abi = require('human-standard-token-abi')
|
||||||
|
@ -82,7 +82,7 @@ GasTooltip.prototype.render = function () {
|
|||||||
'marginTop': '81px',
|
'marginTop': '81px',
|
||||||
},
|
},
|
||||||
}, [
|
}, [
|
||||||
h('span.gas-tooltip-label', {}, [t('gasLimit')]),
|
h('span.gas-tooltip-label', {}, [t(this.props.localeMessages, 'gasLimit')]),
|
||||||
h('i.fa.fa-info-circle'),
|
h('i.fa.fa-info-circle'),
|
||||||
]),
|
]),
|
||||||
h(InputNumber, {
|
h(InputNumber, {
|
||||||
|
@ -30,7 +30,7 @@ class SenderToRecipient extends Component {
|
|||||||
]),
|
]),
|
||||||
h('.sender-to-recipient__recipient', [
|
h('.sender-to-recipient__recipient', [
|
||||||
h('i.fa.fa-file-text-o'),
|
h('i.fa.fa-file-text-o'),
|
||||||
h('.sender-to-recipient__name.sender-to-recipient__recipient-name', t('newContract')),
|
h('.sender-to-recipient__name.sender-to-recipient__recipient-name', t(this.props.localeMessages, 'newContract')),
|
||||||
]),
|
]),
|
||||||
])
|
])
|
||||||
)
|
)
|
||||||
|
@ -240,7 +240,7 @@ ShapeshiftForm.prototype.render = function () {
|
|||||||
className: btnClass,
|
className: btnClass,
|
||||||
disabled: !token,
|
disabled: !token,
|
||||||
onClick: () => this.onBuyWithShapeShift(),
|
onClick: () => this.onBuyWithShapeShift(),
|
||||||
}, [t('buy')]),
|
}, [t(this.props.localeMessages, 'buy')]),
|
||||||
|
|
||||||
])
|
])
|
||||||
}
|
}
|
||||||
|
@ -76,7 +76,7 @@ SignatureRequest.prototype.renderAccountDropdown = function () {
|
|||||||
|
|
||||||
return h('div.request-signature__account', [
|
return h('div.request-signature__account', [
|
||||||
|
|
||||||
h('div.request-signature__account-text', [t('account') + ':']),
|
h('div.request-signature__account-text', [t(this.props.localeMessages, 'account') + ':']),
|
||||||
|
|
||||||
h(AccountDropdownMini, {
|
h(AccountDropdownMini, {
|
||||||
selectedAccount,
|
selectedAccount,
|
||||||
@ -103,7 +103,7 @@ SignatureRequest.prototype.renderBalance = function () {
|
|||||||
|
|
||||||
return h('div.request-signature__balance', [
|
return h('div.request-signature__balance', [
|
||||||
|
|
||||||
h('div.request-signature__balance-text', [t('balance')]),
|
h('div.request-signature__balance-text', [t(this.props.localeMessages, 'balance')]),
|
||||||
|
|
||||||
h('div.request-signature__balance-value', `${balanceInEther} ETH`),
|
h('div.request-signature__balance-value', `${balanceInEther} ETH`),
|
||||||
|
|
||||||
|
@ -8,8 +8,10 @@ const metamaskConnect = (mapStateToProps, mapDispatchToProps) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const _higherOrderMapStateToProps = (mapStateToProps) => {
|
const _higherOrderMapStateToProps = (mapStateToProps) => {
|
||||||
return (state, ownProps) => {
|
return (state, ownProps = {}) => {
|
||||||
const stateProps = mapStateToProps(state, ownProps)
|
const stateProps = mapStateToProps
|
||||||
|
? mapStateToProps(state, ownProps)
|
||||||
|
: ownProps
|
||||||
stateProps.localeMessages = state.localeMessages || {}
|
stateProps.localeMessages = state.localeMessages || {}
|
||||||
return stateProps
|
return stateProps
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
const { Component } = require('react')
|
const { Component } = require('react')
|
||||||
const PropTypes = require('prop-types')
|
const PropTypes = require('prop-types')
|
||||||
const h = require('react-hyperscript')
|
const h = require('react-hyperscript')
|
||||||
const { connect } = require('react-redux')
|
const connect = require('./metamask-connect')
|
||||||
const actions = require('./actions')
|
const actions = require('./actions')
|
||||||
const infuraCurrencies = require('./infura-conversion.json')
|
const infuraCurrencies = require('./infura-conversion.json')
|
||||||
const validUrl = require('valid-url')
|
const validUrl = require('valid-url')
|
||||||
|
@ -12,7 +12,7 @@ const getMessage = (locale, key, substitutions) => {
|
|||||||
const entry = locale[key]
|
const entry = locale[key]
|
||||||
if (!entry) {
|
if (!entry) {
|
||||||
log.error(`Translator - Unable to find value for "${key}"`)
|
log.error(`Translator - Unable to find value for "${key}"`)
|
||||||
throw new Error(`Translator - Unable to find value for "${key}"`)
|
// throw new Error(`Translator - Unable to find value for "${key}"`)
|
||||||
}
|
}
|
||||||
let phrase = entry.message
|
let phrase = entry.message
|
||||||
// perform substitutions
|
// perform substitutions
|
||||||
|
Loading…
Reference in New Issue
Block a user