From b338a1336d5c1d2ea69c468366f1c9726c8a7459 Mon Sep 17 00:00:00 2001 From: Whymarrh Whitby Date: Sun, 24 Nov 2019 19:07:47 -0330 Subject: [PATCH] Use localized messages for NotificationModal buttons --- ui/app/components/app/modals/notification-modal.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/ui/app/components/app/modals/notification-modal.js b/ui/app/components/app/modals/notification-modal.js index 9cec3ed826c1..800cd4f2f8bb 100644 --- a/ui/app/components/app/modals/notification-modal.js +++ b/ui/app/components/app/modals/notification-modal.js @@ -4,6 +4,10 @@ import {connect} from 'react-redux' import { hideModal } from '../../../store/actions' class NotificationModal extends Component { + static contextProps = { + t: PropTypes.func.isRequired, + } + render () { const { header, @@ -14,6 +18,8 @@ class NotificationModal extends Component { onConfirm, } = this.props + const { t } = this.context + const showButtons = showCancelButton || showConfirmButton return ( @@ -35,7 +41,7 @@ class NotificationModal extends Component { className="btn-default notification-modal__buttons__btn" onClick={hideModal} > - Cancel + {t('cancel')} )} {showConfirmButton && ( @@ -46,7 +52,7 @@ class NotificationModal extends Component { hideModal() }} > - Confirm + {t('confirm')} )}