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', {
|
||||
onClick: () => this.revert(),
|
||||
}, [t('revert')]),
|
||||
}, [t(this.props.localeMessages, 'revert')]),
|
||||
|
||||
h('div.send-v2__customize-gas__buttons', [
|
||||
h('div.send-v2__customize-gas__cancel.allcaps', {
|
||||
onClick: this.props.hideModal,
|
||||
}, [t('cancel')]),
|
||||
}, [t(this.props.localeMessages, 'cancel')]),
|
||||
|
||||
h(`div.send-v2__customize-gas__save${error ? '__error' : ''}.allcaps`, {
|
||||
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__title', [t('depositEther')]),
|
||||
h('div.page-container__title', [t(this.props.localeMessages, 'depositEther')]),
|
||||
|
||||
h('div.page-container__subtitle', [
|
||||
t(this.props.localeMessages, 'needEtherInWallet'),
|
||||
|
@ -51,7 +51,7 @@ EditAccountNameModal.prototype.render = function () {
|
||||
]),
|
||||
|
||||
h('div.edit-account-name-modal-title', {
|
||||
}, [t('editAccountName')]),
|
||||
}, [t(this.props.localeMessages, 'editAccountName')]),
|
||||
|
||||
h('input.edit-account-name-modal-input', {
|
||||
placeholder: identity.name,
|
||||
|
@ -1,7 +1,7 @@
|
||||
const { Component } = require('react')
|
||||
const PropTypes = require('prop-types')
|
||||
const h = require('react-hyperscript')
|
||||
const { connect } = require('react-redux')
|
||||
const connect = require('../../metamask-connect')
|
||||
const actions = require('../../actions')
|
||||
const t = require('../../../i18n-helper').getMessage
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
const { Component } = require('react')
|
||||
const PropTypes = require('prop-types')
|
||||
const h = require('react-hyperscript')
|
||||
const { connect } = require('react-redux')
|
||||
const connect = require('../../metamask-connect')
|
||||
const actions = require('../../actions')
|
||||
const t = require('../../../i18n-helper').getMessage
|
||||
|
||||
@ -23,12 +23,12 @@ class NotificationModal extends Component {
|
||||
}, [
|
||||
|
||||
h('div.notification-modal__header', {}, [
|
||||
t(header),
|
||||
t(this.props.localeMessages, header),
|
||||
]),
|
||||
|
||||
h('div.notification-modal__message-wrapper', {}, [
|
||||
h('div.notification-modal__message', {}, [
|
||||
t(message),
|
||||
t(this.props.localeMessages, message),
|
||||
]),
|
||||
]),
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
const { Component } = require('react')
|
||||
const PropTypes = require('prop-types')
|
||||
const h = require('react-hyperscript')
|
||||
const { connect } = require('react-redux')
|
||||
const connect = require('../../../metamask-connect')
|
||||
const actions = require('../../../actions')
|
||||
const NotifcationModal = require('../notification-modal')
|
||||
|
||||
|
@ -1,11 +1,12 @@
|
||||
const Component = require('react').Component
|
||||
const h = require('react-hyperscript')
|
||||
const connect = require('../metamask-connect')
|
||||
const classnames = require('classnames')
|
||||
const inherits = require('util').inherits
|
||||
const NetworkDropdownIcon = require('./dropdowns/components/network-dropdown-icon')
|
||||
const t = require('../../i18n-helper').getMessage
|
||||
|
||||
module.exports = Network
|
||||
module.exports = connect()(Network)
|
||||
|
||||
inherits(Network, Component)
|
||||
|
||||
@ -78,6 +79,8 @@ Network.prototype.render = function () {
|
||||
},
|
||||
}, [
|
||||
(function () {
|
||||
console.log(`12312312312312312 props.localeMessages`, props.localeMessages);
|
||||
console.log(`12312312312312312 t(props.localeMessages, 'mainnet')`, t(props.localeMessages, 'mainnet'));
|
||||
switch (iconName) {
|
||||
case 'ethereum-network':
|
||||
return h('.network-indicator', [
|
||||
|
@ -1,5 +1,5 @@
|
||||
const { Component } = require('react')
|
||||
const { connect } = require('react-redux')
|
||||
const connect = require('../../metamask-connect')
|
||||
const h = require('react-hyperscript')
|
||||
const PropTypes = require('prop-types')
|
||||
const actions = require('../../actions')
|
||||
|
@ -1,5 +1,5 @@
|
||||
const Component = require('react').Component
|
||||
const { connect } = require('react-redux')
|
||||
const connect = require('../../metamask-connect')
|
||||
const h = require('react-hyperscript')
|
||||
const inherits = require('util').inherits
|
||||
const actions = require('../../actions')
|
||||
|
@ -1,5 +1,5 @@
|
||||
const Component = require('react').Component
|
||||
const { connect } = require('react-redux')
|
||||
const connect = require('../../metamask-connect')
|
||||
const h = require('react-hyperscript')
|
||||
const inherits = require('util').inherits
|
||||
const tokenAbi = require('human-standard-token-abi')
|
||||
|
@ -1,5 +1,5 @@
|
||||
const Component = require('react').Component
|
||||
const { connect } = require('react-redux')
|
||||
const connect = require('../../metamask-connect')
|
||||
const h = require('react-hyperscript')
|
||||
const clone = require('clone')
|
||||
const abi = require('human-standard-token-abi')
|
||||
|
@ -82,7 +82,7 @@ GasTooltip.prototype.render = function () {
|
||||
'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(InputNumber, {
|
||||
|
@ -30,7 +30,7 @@ class SenderToRecipient extends Component {
|
||||
]),
|
||||
h('.sender-to-recipient__recipient', [
|
||||
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,
|
||||
disabled: !token,
|
||||
onClick: () => this.onBuyWithShapeShift(),
|
||||
}, [t('buy')]),
|
||||
}, [t(this.props.localeMessages, 'buy')]),
|
||||
|
||||
])
|
||||
}
|
||||
|
@ -76,7 +76,7 @@ SignatureRequest.prototype.renderAccountDropdown = function () {
|
||||
|
||||
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, {
|
||||
selectedAccount,
|
||||
@ -103,7 +103,7 @@ SignatureRequest.prototype.renderBalance = function () {
|
||||
|
||||
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`),
|
||||
|
||||
|
@ -8,8 +8,10 @@ const metamaskConnect = (mapStateToProps, mapDispatchToProps) => {
|
||||
}
|
||||
|
||||
const _higherOrderMapStateToProps = (mapStateToProps) => {
|
||||
return (state, ownProps) => {
|
||||
const stateProps = mapStateToProps(state, ownProps)
|
||||
return (state, ownProps = {}) => {
|
||||
const stateProps = mapStateToProps
|
||||
? mapStateToProps(state, ownProps)
|
||||
: ownProps
|
||||
stateProps.localeMessages = state.localeMessages || {}
|
||||
return stateProps
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
const { Component } = require('react')
|
||||
const PropTypes = require('prop-types')
|
||||
const h = require('react-hyperscript')
|
||||
const { connect } = require('react-redux')
|
||||
const connect = require('./metamask-connect')
|
||||
const actions = require('./actions')
|
||||
const infuraCurrencies = require('./infura-conversion.json')
|
||||
const validUrl = require('valid-url')
|
||||
|
@ -12,7 +12,7 @@ const getMessage = (locale, key, substitutions) => {
|
||||
const entry = locale[key]
|
||||
if (!entry) {
|
||||
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
|
||||
// perform substitutions
|
||||
|
Loading…
Reference in New Issue
Block a user