diff --git a/x-pack/plugins/ml/public/application/components/annotations/delete_annotation_modal/index.tsx b/x-pack/plugins/ml/public/application/components/annotations/delete_annotation_modal/index.tsx index 757cf71511ffb..58730179aafde 100644 --- a/x-pack/plugins/ml/public/application/components/annotations/delete_annotation_modal/index.tsx +++ b/x-pack/plugins/ml/public/application/components/annotations/delete_annotation_modal/index.tsx @@ -10,7 +10,7 @@ import React, { Fragment } from 'react'; import { EUI_MODAL_CONFIRM_BUTTON, EuiConfirmModal } from '@elastic/eui'; -import { FormattedMessage } from '@kbn/i18n-react'; +import { i18n } from '@kbn/i18n'; interface Props { cancelAction: () => void; @@ -27,26 +27,26 @@ export const DeleteAnnotationModal: React.FC = ({ {isVisible === true && ( - } + title={i18n.translate( + 'xpack.ml.timeSeriesExplorer.deleteAnnotationModal.deleteAnnotationTitle', + { + defaultMessage: 'Delete this annotation?', + } + )} onCancel={cancelAction} onConfirm={deleteAction} - cancelButtonText={ - - } - confirmButtonText={ - - } + cancelButtonText={i18n.translate( + 'xpack.ml.timeSeriesExplorer.deleteAnnotationModal.cancelButtonLabel', + { + defaultMessage: 'Cancel', + } + )} + confirmButtonText={i18n.translate( + 'xpack.ml.timeSeriesExplorer.deleteAnnotationModal.deleteButtonLabel', + { + defaultMessage: 'Delete', + } + )} buttonColor="danger" defaultFocusedButton={EUI_MODAL_CONFIRM_BUTTON} className="eui-textBreakWord" diff --git a/x-pack/plugins/ml/public/application/components/delete_space_aware_item_check_modal/delete_space_aware_item_check_modal.tsx b/x-pack/plugins/ml/public/application/components/delete_space_aware_item_check_modal/delete_space_aware_item_check_modal.tsx index 4b576695c981a..8ac2a22be5a93 100644 --- a/x-pack/plugins/ml/public/application/components/delete_space_aware_item_check_modal/delete_space_aware_item_check_modal.tsx +++ b/x-pack/plugins/ml/public/application/components/delete_space_aware_item_check_modal/delete_space_aware_item_check_modal.tsx @@ -339,10 +339,12 @@ export const DeleteSpaceAwareItemCheckModal: FC = ({ <> - +

+ +

diff --git a/x-pack/plugins/ml/public/application/components/rule_editor/select_rule_action/__snapshots__/delete_rule_modal.test.js.snap b/x-pack/plugins/ml/public/application/components/rule_editor/select_rule_action/__snapshots__/delete_rule_modal.test.js.snap index 3a11531f6c4bc..1d4889557002d 100644 --- a/x-pack/plugins/ml/public/application/components/rule_editor/select_rule_action/__snapshots__/delete_rule_modal.test.js.snap +++ b/x-pack/plugins/ml/public/application/components/rule_editor/select_rule_action/__snapshots__/delete_rule_modal.test.js.snap @@ -44,30 +44,12 @@ exports[`DeleteRuleModal renders modal after clicking delete rule link 1`] = ` - } - confirmButtonText={ - - } + cancelButtonText="Cancel" + confirmButtonText="Delete" defaultFocusedButton="confirm" onCancel={[Function]} onConfirm={[Function]} - title={ - - } + title="Delete rule?" />
`; diff --git a/x-pack/plugins/ml/public/application/components/rule_editor/select_rule_action/delete_rule_modal.js b/x-pack/plugins/ml/public/application/components/rule_editor/select_rule_action/delete_rule_modal.js index 1b62ab2907ff7..68221bbe58791 100644 --- a/x-pack/plugins/ml/public/application/components/rule_editor/select_rule_action/delete_rule_modal.js +++ b/x-pack/plugins/ml/public/application/components/rule_editor/select_rule_action/delete_rule_modal.js @@ -11,6 +11,7 @@ import PropTypes from 'prop-types'; import React, { Component } from 'react'; +import { i18n } from '@kbn/i18n'; import { EuiConfirmModal, EuiLink, EUI_MODAL_CONFIRM_BUTTON } from '@elastic/eui'; import { FormattedMessage } from '@kbn/i18n-react'; @@ -44,27 +45,20 @@ export class DeleteRuleModal extends Component { if (this.state.isModalVisible) { modal = ( - } + title={i18n.translate('xpack.ml.ruleEditor.deleteRuleModal.deleteRuleTitle', { + defaultMessage: 'Delete rule?', + })} onCancel={this.closeModal} onConfirm={this.deleteRule} buttonColor="danger" - cancelButtonText={ - - } - confirmButtonText={ - - } + cancelButtonText={i18n.translate( + 'xpack.ml.ruleEditor.deleteRuleModal.cancelButtonLabel', + { defaultMessage: 'Cancel' } + )} + confirmButtonText={i18n.translate( + 'xpack.ml.ruleEditor.deleteRuleModal.deleteButtonLabel', + { defaultMessage: 'Delete' } + )} defaultFocusedButton={EUI_MODAL_CONFIRM_BUTTON} /> ); diff --git a/x-pack/plugins/ml/public/application/components/validate_job/validate_job_view.js b/x-pack/plugins/ml/public/application/components/validate_job/validate_job_view.js index 64910f5abfd21..cc76a708fc77b 100644 --- a/x-pack/plugins/ml/public/application/components/validate_job/validate_job_view.js +++ b/x-pack/plugins/ml/public/application/components/validate_job/validate_job_view.js @@ -84,7 +84,9 @@ const LoadingSpinner = () => ( const Modal = ({ close, title, children }) => ( - {title} + +

{title}

+
{children} diff --git a/x-pack/plugins/ml/public/application/explorer/dashboard_controls/add_to_dashboard_controls.tsx b/x-pack/plugins/ml/public/application/explorer/dashboard_controls/add_to_dashboard_controls.tsx index d030cfc9b92b6..a5b24a2290d67 100644 --- a/x-pack/plugins/ml/public/application/explorer/dashboard_controls/add_to_dashboard_controls.tsx +++ b/x-pack/plugins/ml/public/application/explorer/dashboard_controls/add_to_dashboard_controls.tsx @@ -81,7 +81,9 @@ export const AddToDashboardControl: FC = ({ return ( - {title} + +

{title}

+
{children} diff --git a/x-pack/plugins/ml/public/application/jobs/jobs_list/components/confirm_modals/close_jobs_confirm_modal.tsx b/x-pack/plugins/ml/public/application/jobs/jobs_list/components/confirm_modals/close_jobs_confirm_modal.tsx index f0c78c3828aeb..e1ec74412990b 100644 --- a/x-pack/plugins/ml/public/application/jobs/jobs_list/components/confirm_modals/close_jobs_confirm_modal.tsx +++ b/x-pack/plugins/ml/public/application/jobs/jobs_list/components/confirm_modals/close_jobs_confirm_modal.tsx @@ -87,7 +87,9 @@ export const CloseJobsConfirmModal: FC = ({ return ( - {title} + +

{title}

+
= ({ return ( - {title} + +

{title}

+
= ({ setShowFunction, unsetShowFunction, - +

+ +

diff --git a/x-pack/plugins/ml/public/application/jobs/jobs_list/components/edit_job_flyout/edit_job_flyout.js b/x-pack/plugins/ml/public/application/jobs/jobs_list/components/edit_job_flyout/edit_job_flyout.js index 9100b7ffa03ab..0f97acdae5c3c 100644 --- a/x-pack/plugins/ml/public/application/jobs/jobs_list/components/edit_job_flyout/edit_job_flyout.js +++ b/x-pack/plugins/ml/public/application/jobs/jobs_list/components/edit_job_flyout/edit_job_flyout.js @@ -475,26 +475,19 @@ export class EditJobFlyoutUI extends Component { if (this.state.isConfirmationModalVisible) { confirmationModal = ( - } + title={i18n.translate('xpack.ml.jobsList.editJobFlyout.unsavedChangesDialogTitle', { + defaultMessage: 'Save changes before leaving?', + })} onCancel={() => this.closeFlyout(true)} onConfirm={() => this.save()} - cancelButtonText={ - - } - confirmButtonText={ - - } + cancelButtonText={i18n.translate( + 'xpack.ml.jobsList.editJobFlyout.leaveAnywayButtonLabel', + { defaultMessage: 'Leave anyway' } + )} + confirmButtonText={i18n.translate( + 'xpack.ml.jobsList.editJobFlyout.saveChangesButtonLabel', + { defaultMessage: 'Save changes' } + )} defaultFocusedButton="confirm" >

diff --git a/x-pack/plugins/ml/public/application/jobs/jobs_list/components/edit_job_flyout/tabs/custom_urls.tsx b/x-pack/plugins/ml/public/application/jobs/jobs_list/components/edit_job_flyout/tabs/custom_urls.tsx index 9a7508c634c6b..d77ed5c3bb2db 100644 --- a/x-pack/plugins/ml/public/application/jobs/jobs_list/components/edit_job_flyout/tabs/custom_urls.tsx +++ b/x-pack/plugins/ml/public/application/jobs/jobs_list/components/edit_job_flyout/tabs/custom_urls.tsx @@ -288,10 +288,12 @@ class CustomUrlsUI extends Component { > - +

+ +

diff --git a/x-pack/plugins/ml/public/application/jobs/jobs_list/components/reset_job_modal/reset_job_modal.tsx b/x-pack/plugins/ml/public/application/jobs/jobs_list/components/reset_job_modal/reset_job_modal.tsx index 335b19bd3a794..55891b3b3b579 100644 --- a/x-pack/plugins/ml/public/application/jobs/jobs_list/components/reset_job_modal/reset_job_modal.tsx +++ b/x-pack/plugins/ml/public/application/jobs/jobs_list/components/reset_job_modal/reset_job_modal.tsx @@ -87,14 +87,16 @@ export const ResetJobModal: FC = ({ setShowFunction, unsetShowFunction, r - +

+ +

diff --git a/x-pack/plugins/ml/public/application/jobs/jobs_list/components/start_datafeed_modal/start_datafeed_modal.js b/x-pack/plugins/ml/public/application/jobs/jobs_list/components/start_datafeed_modal/start_datafeed_modal.js index c4c53b00591f4..3a2728a810427 100644 --- a/x-pack/plugins/ml/public/application/jobs/jobs_list/components/start_datafeed_modal/start_datafeed_modal.js +++ b/x-pack/plugins/ml/public/application/jobs/jobs_list/components/start_datafeed_modal/start_datafeed_modal.js @@ -149,14 +149,16 @@ export class StartDatafeedModal extends Component { > - +

+ +

diff --git a/x-pack/plugins/ml/public/application/jobs/new_job/pages/components/datafeed_step/components/data_view/change_data_view.tsx b/x-pack/plugins/ml/public/application/jobs/new_job/pages/components/datafeed_step/components/data_view/change_data_view.tsx index cc3b20966935b..9617458c6e811 100644 --- a/x-pack/plugins/ml/public/application/jobs/new_job/pages/components/datafeed_step/components/data_view/change_data_view.tsx +++ b/x-pack/plugins/ml/public/application/jobs/new_job/pages/components/datafeed_step/components/data_view/change_data_view.tsx @@ -129,10 +129,12 @@ export const ChangeDataViewModal: FC = ({ onClose }) => { - +

+ +

diff --git a/x-pack/plugins/ml/public/application/jobs/new_job/pages/components/pick_fields_step/components/advanced_detector_modal/modal_wrapper.tsx b/x-pack/plugins/ml/public/application/jobs/new_job/pages/components/pick_fields_step/components/advanced_detector_modal/modal_wrapper.tsx index 12344c651bd11..3ab60cd8225cc 100644 --- a/x-pack/plugins/ml/public/application/jobs/new_job/pages/components/pick_fields_step/components/advanced_detector_modal/modal_wrapper.tsx +++ b/x-pack/plugins/ml/public/application/jobs/new_job/pages/components/pick_fields_step/components/advanced_detector_modal/modal_wrapper.tsx @@ -34,10 +34,12 @@ export const ModalWrapper: FC = ({ onCreateClick, closeModal, saveEnabled > - +

+ +

diff --git a/x-pack/plugins/ml/public/application/settings/calendars/edit/import_modal/__snapshots__/import_modal.test.js.snap b/x-pack/plugins/ml/public/application/settings/calendars/edit/import_modal/__snapshots__/import_modal.test.js.snap index 16074e3849d02..61449ab5168d9 100644 --- a/x-pack/plugins/ml/public/application/settings/calendars/edit/import_modal/__snapshots__/import_modal.test.js.snap +++ b/x-pack/plugins/ml/public/application/settings/calendars/edit/import_modal/__snapshots__/import_modal.test.js.snap @@ -15,11 +15,13 @@ exports[`ImportModal Renders import modal 1`] = ` grow={false} > - +

+ +

- +

+ +

diff --git a/x-pack/plugins/ml/public/application/settings/calendars/edit/new_event_modal/new_event_modal.js b/x-pack/plugins/ml/public/application/settings/calendars/edit/new_event_modal/new_event_modal.js index ae2815ebb5cd6..255405c8cd265 100644 --- a/x-pack/plugins/ml/public/application/settings/calendars/edit/new_event_modal/new_event_modal.js +++ b/x-pack/plugins/ml/public/application/settings/calendars/edit/new_event_modal/new_event_modal.js @@ -266,10 +266,12 @@ export class NewEventModal extends Component { > - +

+ +

diff --git a/x-pack/plugins/ml/public/application/settings/calendars/list/calendars_list.js b/x-pack/plugins/ml/public/application/settings/calendars/list/calendars_list.js index 9864078aff698..a3bb900ca1ce2 100644 --- a/x-pack/plugins/ml/public/application/settings/calendars/list/calendars_list.js +++ b/x-pack/plugins/ml/public/application/settings/calendars/list/calendars_list.js @@ -16,7 +16,6 @@ import { ml } from '../../../services/ml_api_service'; import { mlNodesAvailable } from '../../../ml_nodes_check/check_ml_nodes'; import { deleteCalendars } from './delete_calendars'; import { i18n } from '@kbn/i18n'; -import { FormattedMessage } from '@kbn/i18n-react'; import { withKibana } from '@kbn/kibana-react-plugin/public'; import { getDocLinks } from '../../../util/dependency_cache'; import { HelpMenu } from '../../../components/help_menu'; @@ -105,30 +104,27 @@ export class CalendarsListUI extends Component { destroyModal = ( c.calendar_id).join(', '), - }} - /> - } + }, + } + )} onCancel={this.closeDestroyModal} onConfirm={this.deleteCalendars} - cancelButtonText={ - - } - confirmButtonText={ - - } + cancelButtonText={i18n.translate( + 'xpack.ml.calendarsList.deleteCalendarsModal.cancelButtonLabel', + { defaultMessage: 'Cancel' } + )} + confirmButtonText={i18n.translate( + 'xpack.ml.calendarsList.deleteCalendarsModal.deleteButtonLabel', + { defaultMessage: 'Delete' } + )} buttonColor="danger" defaultFocusedButton={EUI_MODAL_CONFIRM_BUTTON} /> diff --git a/x-pack/plugins/ml/public/application/settings/filter_lists/components/delete_filter_list_modal/__snapshots__/delete_filter_list_modal.test.js.snap b/x-pack/plugins/ml/public/application/settings/filter_lists/components/delete_filter_list_modal/__snapshots__/delete_filter_list_modal.test.js.snap index d4ea0c49612a8..00072352c4f59 100644 --- a/x-pack/plugins/ml/public/application/settings/filter_lists/components/delete_filter_list_modal/__snapshots__/delete_filter_list_modal.test.js.snap +++ b/x-pack/plugins/ml/public/application/settings/filter_lists/components/delete_filter_list_modal/__snapshots__/delete_filter_list_modal.test.js.snap @@ -99,37 +99,14 @@ exports[`DeleteFilterListModal renders modal after clicking delete button 1`] = - } + cancelButtonText="Cancel" className="eui-textBreakWord" - confirmButtonText={ - - } + confirmButtonText="Delete" data-test-subj="mlFilterListDeleteConfirmation" defaultFocusedButton="confirm" onCancel={[Function]} onConfirm={[Function]} - title={ - - } + title="Delete 2 filter lists?" /> `; diff --git a/x-pack/plugins/ml/public/application/settings/filter_lists/components/delete_filter_list_modal/delete_filter_list_modal.js b/x-pack/plugins/ml/public/application/settings/filter_lists/components/delete_filter_list_modal/delete_filter_list_modal.js index 8f7fc02ffdb24..8540d6c803b78 100644 --- a/x-pack/plugins/ml/public/application/settings/filter_lists/components/delete_filter_list_modal/delete_filter_list_modal.js +++ b/x-pack/plugins/ml/public/application/settings/filter_lists/components/delete_filter_list_modal/delete_filter_list_modal.js @@ -8,6 +8,7 @@ import PropTypes from 'prop-types'; import React, { Component } from 'react'; import { FormattedMessage } from '@kbn/i18n-react'; +import { i18n } from '@kbn/i18n'; import { EuiButton, EuiConfirmModal, EUI_MODAL_CONFIRM_BUTTON } from '@elastic/eui'; @@ -56,34 +57,27 @@ export class DeleteFilterListModal extends Component { let modal; if (this.state.isModalVisible) { - const title = ( - - ); modal = ( - } - confirmButtonText={ - - } + cancelButtonText={i18n.translate( + 'xpack.ml.settings.filterLists.deleteFilterListModal.cancelButtonLabel', + { defaultMessage: 'Cancel' } + )} + confirmButtonText={i18n.translate( + 'xpack.ml.settings.filterLists.deleteFilterListModal.confirmButtonLabel', + { defaultMessage: 'Delete' } + )} buttonColor="danger" defaultFocusedButton={EUI_MODAL_CONFIRM_BUTTON} data-test-subj={'mlFilterListDeleteConfirmation'} diff --git a/x-pack/plugins/ml/public/application/timeseriesexplorer/components/forecasting_modal/modal.js b/x-pack/plugins/ml/public/application/timeseriesexplorer/components/forecasting_modal/modal.js index 9b7adcf2bce32..1ae5ee2b05604 100644 --- a/x-pack/plugins/ml/public/application/timeseriesexplorer/components/forecasting_modal/modal.js +++ b/x-pack/plugins/ml/public/application/timeseriesexplorer/components/forecasting_modal/modal.js @@ -33,10 +33,12 @@ export function Modal(props) { - +

+ +

diff --git a/x-pack/plugins/ml/public/application/trained_models/models_management/delete_models_modal.tsx b/x-pack/plugins/ml/public/application/trained_models/models_management/delete_models_modal.tsx index b4f0bc0ec505e..f6799469fd1e6 100644 --- a/x-pack/plugins/ml/public/application/trained_models/models_management/delete_models_modal.tsx +++ b/x-pack/plugins/ml/public/application/trained_models/models_management/delete_models_modal.tsx @@ -69,14 +69,16 @@ export const DeleteModelsModal: FC = ({ modelIds, onClos > - +

+ +

diff --git a/x-pack/plugins/ml/public/application/trained_models/models_management/deployment_setup.tsx b/x-pack/plugins/ml/public/application/trained_models/models_management/deployment_setup.tsx index f8082997a1c6e..c999376eebeaf 100644 --- a/x-pack/plugins/ml/public/application/trained_models/models_management/deployment_setup.tsx +++ b/x-pack/plugins/ml/public/application/trained_models/models_management/deployment_setup.tsx @@ -289,7 +289,7 @@ export const StartUpdateDeploymentModal: FC = ({ -

+

{isUpdate ? ( = ({ values={{ modelId }} /> )} -

+
diff --git a/x-pack/plugins/ml/public/application/trained_models/models_management/force_stop_dialog.tsx b/x-pack/plugins/ml/public/application/trained_models/models_management/force_stop_dialog.tsx index 6a97131723229..1800f9b13db03 100644 --- a/x-pack/plugins/ml/public/application/trained_models/models_management/force_stop_dialog.tsx +++ b/x-pack/plugins/ml/public/application/trained_models/models_management/force_stop_dialog.tsx @@ -8,6 +8,7 @@ import React, { FC } from 'react'; import { EuiConfirmModal } from '@elastic/eui'; import { FormattedMessage } from '@kbn/i18n-react'; +import { i18n } from '@kbn/i18n'; import type { OverlayStart, ThemeServiceStart } from '@kbn/core/public'; import { toMountPoint, wrapWithTheme } from '@kbn/kibana-react-plugin/public'; import type { ModelItem } from './models_list'; @@ -25,27 +26,20 @@ export const ForceStopModelConfirmDialog: FC = }) => { return ( - } + title={i18n.translate('xpack.ml.trainedModels.modelsList.forceStopDialog.title', { + defaultMessage: 'Stop model {modelId}?', + values: { modelId: model.model_id }, + })} onCancel={onCancel} onConfirm={onConfirm} - cancelButtonText={ - - } - confirmButtonText={ - - } + cancelButtonText={i18n.translate( + 'xpack.ml.trainedModels.modelsList.forceStopDialog.cancelText', + { defaultMessage: 'Cancel' } + )} + confirmButtonText={i18n.translate( + 'xpack.ml.trainedModels.modelsList.forceStopDialog.confirmText', + { defaultMessage: 'Stop' } + )} buttonColor="danger" > = ({ > -

+

-

+
diff --git a/x-pack/plugins/ml/public/embeddables/anomaly_swimlane/anomaly_swimlane_initializer.tsx b/x-pack/plugins/ml/public/embeddables/anomaly_swimlane/anomaly_swimlane_initializer.tsx index e5e2c2fd3b6be..c4c2fc7262eac 100644 --- a/x-pack/plugins/ml/public/embeddables/anomaly_swimlane/anomaly_swimlane_initializer.tsx +++ b/x-pack/plugins/ml/public/embeddables/anomaly_swimlane/anomaly_swimlane_initializer.tsx @@ -93,10 +93,12 @@ export const AnomalySwimlaneInitializer: FC = ( - +

+ +