mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-11-28 23:06:37 +01:00
Use localized messages for NotificationModal buttons (#7558)
This commit is contained in:
parent
cb472edfe4
commit
d605fa57ce
@ -5,6 +5,10 @@ const connect = require('react-redux').connect
|
|||||||
const actions = require('../../../store/actions')
|
const actions = require('../../../store/actions')
|
||||||
|
|
||||||
class NotificationModal extends Component {
|
class NotificationModal extends Component {
|
||||||
|
static contextProps = {
|
||||||
|
t: PropTypes.func.isRequired,
|
||||||
|
}
|
||||||
|
|
||||||
render () {
|
render () {
|
||||||
const {
|
const {
|
||||||
header,
|
header,
|
||||||
@ -15,6 +19,8 @@ class NotificationModal extends Component {
|
|||||||
onConfirm,
|
onConfirm,
|
||||||
} = this.props
|
} = this.props
|
||||||
|
|
||||||
|
const { t } = this.context
|
||||||
|
|
||||||
const showButtons = showCancelButton || showConfirmButton
|
const showButtons = showCancelButton || showConfirmButton
|
||||||
|
|
||||||
return h('div', [
|
return h('div', [
|
||||||
@ -39,14 +45,14 @@ class NotificationModal extends Component {
|
|||||||
|
|
||||||
showCancelButton && h('div.btn-default.notification-modal__buttons__btn', {
|
showCancelButton && h('div.btn-default.notification-modal__buttons__btn', {
|
||||||
onClick: hideModal,
|
onClick: hideModal,
|
||||||
}, 'Cancel'),
|
}, t('cancel')),
|
||||||
|
|
||||||
showConfirmButton && h('div.button.btn-secondary.notification-modal__buttons__btn', {
|
showConfirmButton && h('div.button.btn-secondary.notification-modal__buttons__btn', {
|
||||||
onClick: () => {
|
onClick: () => {
|
||||||
onConfirm()
|
onConfirm()
|
||||||
hideModal()
|
hideModal()
|
||||||
},
|
},
|
||||||
}, 'Confirm'),
|
}, t('confirm')),
|
||||||
|
|
||||||
]),
|
]),
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user