diff --git a/x-pack/plugins/watcher/public/components/threshold_watch_expression/components/threshold_watch_agg_field/threshold_watch_agg_field.html b/x-pack/plugins/watcher/public/components/threshold_watch_expression/components/threshold_watch_agg_field/threshold_watch_agg_field.html index f220d73ac3e32f..a103fbecfc5881 100644 --- a/x-pack/plugins/watcher/public/components/threshold_watch_expression/components/threshold_watch_agg_field/threshold_watch_agg_field.html +++ b/x-pack/plugins/watcher/public/components/threshold_watch_expression/components/threshold_watch_agg_field/threshold_watch_agg_field.html @@ -16,9 +16,9 @@ xpack-aria-describes="{{thresholdWatchAggField.makeId('aggField')}}" class="kuiInputNote kuiInputNote--danger" ng-if="thresholdWatchAggField.isValidationMessageVisible('aggField', 'required')" - > - Please select a field. - + i18n-id="xpack.watcher.thresholdWatchExpression.aggType.fieldIsRequiredValidationMessage" + i18n-default-message="Please select a field." + > - Select a field... + diff --git a/x-pack/plugins/watcher/public/components/threshold_watch_expression/components/threshold_watch_agg_field/threshold_watch_agg_field.js b/x-pack/plugins/watcher/public/components/threshold_watch_expression/components/threshold_watch_agg_field/threshold_watch_agg_field.js index 6448027aa99987..756ca66f47fcd8 100644 --- a/x-pack/plugins/watcher/public/components/threshold_watch_expression/components/threshold_watch_agg_field/threshold_watch_agg_field.js +++ b/x-pack/plugins/watcher/public/components/threshold_watch_expression/components/threshold_watch_agg_field/threshold_watch_agg_field.js @@ -12,7 +12,7 @@ import 'plugins/watcher/components/xpack_aria_describes'; const app = uiModules.get('xpack/watcher'); -app.directive('thresholdWatchAggField', function ($injector) { +app.directive('thresholdWatchAggField', function ($injector, i18n) { const htmlIdGeneratorFactory = $injector.get('xpackWatcherHtmlIdGeneratorFactory'); return { @@ -51,11 +51,16 @@ app.directive('thresholdWatchAggField', function ($injector) { } }); - this.itemDescription = 'Of'; + this.itemDescription = i18n('xpack.watcher.thresholdWatchExpression.aggField.itemDescription', { + defaultMessage: 'Of', + }); } get itemValue() { - return this.aggField ? this.aggField.name : 'select a field'; + return this.aggField ? this.aggField.name : i18n( + 'xpack.watcher.thresholdWatchExpression.aggField.selectFieldTextMessage', { + defaultMessage: 'select a field', + }); } } }; diff --git a/x-pack/plugins/watcher/public/components/threshold_watch_expression/components/threshold_watch_agg_type/threshold_watch_agg_type.html b/x-pack/plugins/watcher/public/components/threshold_watch_expression/components/threshold_watch_agg_type/threshold_watch_agg_type.html index c41c4314f27041..981fcf12aa131c 100644 --- a/x-pack/plugins/watcher/public/components/threshold_watch_expression/components/threshold_watch_agg_type/threshold_watch_agg_type.html +++ b/x-pack/plugins/watcher/public/components/threshold_watch_expression/components/threshold_watch_agg_type/threshold_watch_agg_type.html @@ -16,9 +16,9 @@ xpack-aria-describes="{{thresholdWatchAggType.makeId('aggType')}}" class="kuiInputNote kuiInputNote--danger" ng-if="thresholdWatchAggType.isValidationMessageVisible('aggType', 'required')" - > - Please select an aggregation type. - + i18n-id="xpack.watcher.thresholdWatchExpression.aggType.requiredTypeValidationMessage" + i18n-default-message="Please select an aggregation type." + > - A value is required. - + i18n-id="xpack.watcher.thresholdWatchExpression.groupBy.requiredValueValidationMessage" + i18n-default-message="A value is required." + > - Value must be a valid number. - + i18n-id="xpack.watcher.thresholdWatchExpression.groupBy.valueMustBeValidNumberValidationMessage" + i18n-default-message="Value must be a valid number." + > - Value must be greater than 0. - + i18n-id="xpack.watcher.thresholdWatchExpression.groupBy.valueMustBeGraterThanZeroValidationMessage" + i18n-default-message="Value must be greater than 0." + > - Please select a field. - + i18n-id="xpack.watcher.thresholdWatchExpression.groupBy.requiredFieldValidationMessage" + i18n-default-message="Please select a field." + > - Select a field... + diff --git a/x-pack/plugins/watcher/public/components/threshold_watch_expression/components/threshold_watch_group_by/threshold_watch_group_by.js b/x-pack/plugins/watcher/public/components/threshold_watch_expression/components/threshold_watch_group_by/threshold_watch_group_by.js index 29048c1fe92849..e89a23070dd269 100644 --- a/x-pack/plugins/watcher/public/components/threshold_watch_expression/components/threshold_watch_group_by/threshold_watch_group_by.js +++ b/x-pack/plugins/watcher/public/components/threshold_watch_expression/components/threshold_watch_group_by/threshold_watch_group_by.js @@ -12,7 +12,7 @@ import 'plugins/watcher/components/xpack_aria_describes'; const app = uiModules.get('xpack/watcher'); -app.directive('thresholdWatchGroupBy', function ($injector) { +app.directive('thresholdWatchGroupBy', function ($injector, i18n) { const htmlIdGeneratorFactory = $injector.get('xpackWatcherHtmlIdGeneratorFactory'); return { @@ -57,7 +57,15 @@ app.directive('thresholdWatchGroupBy', function ($injector) { } get itemDescription() { - return (this.groupByType && this.groupByType.sizeRequired) ? 'Grouped over' : 'Over'; + const itemDescription = (this.groupByType && this.groupByType.sizeRequired) + ? i18n('xpack.watcher.thresholdWatchExpression.groupBy.groupedItemDescription', { + defaultMessage: 'Grouped over', + }) + : i18n('xpack.watcher.thresholdWatchExpression.groupBy.itemDescription', { + defaultMessage: 'Over', + }); + + return itemDescription; } get itemValue() { diff --git a/x-pack/plugins/watcher/public/components/threshold_watch_expression/components/threshold_watch_threshold_level/threshold_watch_threshold_level.html b/x-pack/plugins/watcher/public/components/threshold_watch_expression/components/threshold_watch_threshold_level/threshold_watch_threshold_level.html index 51aa630e6736d2..76be0699679e0e 100644 --- a/x-pack/plugins/watcher/public/components/threshold_watch_expression/components/threshold_watch_threshold_level/threshold_watch_threshold_level.html +++ b/x-pack/plugins/watcher/public/components/threshold_watch_expression/components/threshold_watch_threshold_level/threshold_watch_threshold_level.html @@ -16,17 +16,17 @@ xpack-aria-describes="{{thresholdWatchThresholdLevel.makeId('threshold')}}" class="kuiInputNote kuiInputNote--danger" ng-if="thresholdWatchThresholdLevel.isValidationMessageVisible('threshold', 'required')" - > - A value is required. - + i18n-id="xpack.watcher.thresholdWatchExpression.thresholdLevel.valueIsRequiredValidationMessage" + i18n-default-message="A value is required." + > - Value must be a valid number. - + i18n-id="xpack.watcher.thresholdWatchExpression.thresholdLevel.valueMustBeValidNumberValidationMessage" + i18n-default-message="Value must be a valid number." + > - Window duration size is required. - + i18n-id="xpack.watcher.thresholdWatchExpression.timeWindow.durationSizeIsRequiredValidationMessage" + i18n-default-message="Window duration size is required." + > - Window duration size can not be a negative number. - + i18n-id="xpack.watcher.thresholdWatchExpression.timeWindow.durationSizeMustBePositiveNumberValidationMessage" + i18n-default-message="Window duration size can not be a negative number." + > - Window duration size must be a valid number. - + i18n-id="xpack.watcher.thresholdWatchExpression.timeWindow.durationSizeMustBeValidNumberValidationMessage" + i18n-default-message="Window duration size must be a valid number." + > - Window duration unit is required. - + i18n-id="xpack.watcher.thresholdWatchExpression.timeWindow.durationUnitIsRequiredValidationMessage" + i18n-default-message="Window duration unit is required." + > - Window duration is too short. - The minimum allowed is {{thresholdWatchTimeWindow.timeWindowMinimumSize}}{{thresholdWatchTimeWindow.timeWindowMinimumUnit}}. - + i18n-id="xpack.watcher.thresholdWatchExpression.timeWindow.durationIsTooShortValidationMessage" + i18n-default-message="Window duration is too short. The minimum allowed is {minimumSize}{minimumUnit}." + i18n-values="{ minimumSize: thresholdWatchTimeWindow.timeWindowMinimumSize, minimumUnit: thresholdWatchTimeWindow.timeWindowMinimumUnit }" + > - Please fix the errors in the expression below. - + i18n-id="xpack.watcher.thresholdWatchExpression.fixErrorInExpressionBelowValidationMessage" + i18n-default-message="Please fix the errors in the expression below." + > - {{ toolBarSelectedCount.count }} {{ toolBarSelectedCount.count === 1 ? toolBarSelectedCount.singularName : toolBarSelectedCount.pluralName}} selected + {{ toolBarSelectedCount.count }} {{ toolBarSelectedCount.count === 1 ? toolBarSelectedCount.singularName : toolBarSelectedCount.pluralName}} + {{ 'xpack.watcher.toolBarSelectedCountText' | i18n: { defaultMessage: 'selected' } }} diff --git a/x-pack/plugins/watcher/public/components/watch_actions/components/watch_action/watch_action.html b/x-pack/plugins/watcher/public/components/watch_actions/components/watch_action/watch_action.html index 1ba90c9e156988..7c5c569f60f2be 100644 --- a/x-pack/plugins/watcher/public/components/watch_actions/components/watch_action/watch_action.html +++ b/x-pack/plugins/watcher/public/components/watch_actions/components/watch_action/watch_action.html @@ -23,9 +23,10 @@ - There are errors in this action that need to be addressed before you can save. - + ng-if="watchAction.isCollapsed && !watchAction.isValid" + i18n-id="xpack.watcher.watchActions.errorInActionValidationMessage" + i18n-default-message="There are errors in this action that need to be addressed before you can save." + > - Remove {{watchAction.action.typeName}} Action - + i18n-id="xpack.watcher.watchActions.removeActionButtonLabel" + i18n-default-message="Remove {actionTypeName} Action" + i18n-values="{ actionTypeName: watchAction.action.typeName }" + > diff --git a/x-pack/plugins/watcher/public/components/watch_actions/components/watch_email_action/watch_email_action.html b/x-pack/plugins/watcher/public/components/watch_actions/components/watch_email_action/watch_email_action.html index 8b1846ec4e5dc6..8d395448ecfde8 100644 --- a/x-pack/plugins/watcher/public/components/watch_actions/components/watch_email_action/watch_email_action.html +++ b/x-pack/plugins/watcher/public/components/watch_actions/components/watch_email_action/watch_email_action.html @@ -2,9 +2,9 @@ - To e-mail address - + i18n-id="xpack.watcher.watchActions.email.emailAddressLabel" + i18n-default-message="To e-mail address" + > - To e-mail address is required. - + i18n-id="xpack.watcher.watchActions.email.emailAddressIsRequiredValidationMessage" + i18n-default-message="To e-mail address is required." + > - Subject - + i18n-id="xpack.watcher.watchActions.email.subjectLabel" + i18n-default-message="Subject" + > - Subject is required. - + i18n-id="xpack.watcher.watchActions.email.subjectIsRequiredValidationMessage" + i18n-default-message="Subject is required." + > - Body - + i18n-id="xpack.watcher.watchActions.email.bodyLabel" + i18n-default-message="Body" + > - Body is required. - + i18n-id="xpack.watcher.watchActions.email.bodyIsRequiredValidationMessage" + i18n-default-message="Body is required." + > diff --git a/x-pack/plugins/watcher/public/components/watch_actions/components/watch_logging_action/watch_logging_action.html b/x-pack/plugins/watcher/public/components/watch_actions/components/watch_logging_action/watch_logging_action.html index e7b6ec610c375e..d2a29d733efaa6 100644 --- a/x-pack/plugins/watcher/public/components/watch_actions/components/watch_logging_action/watch_logging_action.html +++ b/x-pack/plugins/watcher/public/components/watch_actions/components/watch_logging_action/watch_logging_action.html @@ -2,9 +2,9 @@ - Log text - + i18n-id="xpack.watcher.watchActions.logging.logTextLabel" + i18n-default-message="Log text" + > - Log text is required. - + i18n-id="xpack.watcher.watchActions.logging.logTextIsRequiredValidationMessage" + i18n-default-message="Log text is required." + > diff --git a/x-pack/plugins/watcher/public/components/watch_actions/components/watch_slack_action/watch_slack_action.html b/x-pack/plugins/watcher/public/components/watch_actions/components/watch_slack_action/watch_slack_action.html index a3b7e2ce9b1fa2..6d6272a2f8e10f 100644 --- a/x-pack/plugins/watcher/public/components/watch_actions/components/watch_slack_action/watch_slack_action.html +++ b/x-pack/plugins/watcher/public/components/watch_actions/components/watch_slack_action/watch_slack_action.html @@ -2,9 +2,9 @@ - Recipient - + i18n-id="xpack.watcher.watchActions.slack.recipientLabel" + i18n-default-message="Recipient" + > - Recipient is required. - + i18n-id="xpack.watcher.watchActions.slack.recipientIsRequiredValidationMessage" + i18n-default-message="Recipient is required." + > - Message - + i18n-id="xpack.watcher.watchActions.slack.messageLabel" + i18n-default-message="Message" + > - Message is required. - + i18n-id="xpack.watcher.watchActions.slack.messageIsRequiredValidationMessage" + i18n-default-message="Message is required." + > diff --git a/x-pack/plugins/watcher/public/components/watch_actions/watch_actions.html b/x-pack/plugins/watcher/public/components/watch_actions/watch_actions.html index 652b8d18e69727..974d2b6a6843e7 100644 --- a/x-pack/plugins/watcher/public/components/watch_actions/watch_actions.html +++ b/x-pack/plugins/watcher/public/components/watch_actions/watch_actions.html @@ -1,8 +1,11 @@ - - Will perform {{watchActions.items.length}} action{{ watchActions.items.length === 1 ? '' : 's' }} once met - +