mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
Use localized messages for NotificationModal buttons (#7558)
This commit is contained in:
parent
5f89988671
commit
caefda5f47
@ -4,6 +4,10 @@ import {connect} from 'react-redux'
|
|||||||
import { hideModal } from '../../../store/actions'
|
import { hideModal } from '../../../store/actions'
|
||||||
|
|
||||||
class NotificationModal extends Component {
|
class NotificationModal extends Component {
|
||||||
|
static contextProps = {
|
||||||
|
t: PropTypes.func.isRequired,
|
||||||
|
}
|
||||||
|
|
||||||
render () {
|
render () {
|
||||||
const {
|
const {
|
||||||
header,
|
header,
|
||||||
@ -14,6 +18,8 @@ class NotificationModal extends Component {
|
|||||||
onConfirm,
|
onConfirm,
|
||||||
} = this.props
|
} = this.props
|
||||||
|
|
||||||
|
const { t } = this.context
|
||||||
|
|
||||||
const showButtons = showCancelButton || showConfirmButton
|
const showButtons = showCancelButton || showConfirmButton
|
||||||
|
|
||||||
return (
|
return (
|
||||||
@ -35,7 +41,7 @@ class NotificationModal extends Component {
|
|||||||
className="btn-default notification-modal__buttons__btn"
|
className="btn-default notification-modal__buttons__btn"
|
||||||
onClick={hideModal}
|
onClick={hideModal}
|
||||||
>
|
>
|
||||||
Cancel
|
{t('cancel')}
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
{showConfirmButton && (
|
{showConfirmButton && (
|
||||||
@ -46,7 +52,7 @@ class NotificationModal extends Component {
|
|||||||
hideModal()
|
hideModal()
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
Confirm
|
{t('confirm')}
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user