Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use localized messages for NotificationModal buttons #7558

Merged
merged 1 commit into from
Nov 25, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions ui/app/components/app/modals/notification-modal.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -14,6 +18,8 @@ class NotificationModal extends Component {
onConfirm,
} = this.props

const { t } = this.context

const showButtons = showCancelButton || showConfirmButton

return (
Expand All @@ -35,7 +41,7 @@ class NotificationModal extends Component {
className="btn-default notification-modal__buttons__btn"
onClick={hideModal}
>
Cancel
{t('cancel')}
</div>
)}
{showConfirmButton && (
Expand All @@ -46,7 +52,7 @@ class NotificationModal extends Component {
hideModal()
}}
>
Confirm
{t('confirm')}
</div>
)}
</div>
Expand Down