1
0
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:
Whymarrh Whitby 2019-11-25 10:02:51 -03:30 committed by GitHub
parent 5f89988671
commit caefda5f47
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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>