diff --git a/src/ui/public/fancy_forms/kbn_form_controller.js b/src/ui/public/fancy_forms/kbn_form_controller.js index f376d8dfe3460..8d51b0712c6cd 100644 --- a/src/ui/public/fancy_forms/kbn_form_controller.js +++ b/src/ui/public/fancy_forms/kbn_form_controller.js @@ -17,7 +17,7 @@ * under the License. */ -export function decorateFormController($delegate, $injector) { +export function decorateFormController($delegate, $injector, i18n) { const [directive] = $delegate; const FormController = directive.controller; @@ -52,7 +52,11 @@ export function decorateFormController($delegate, $injector) { describeErrors() { const count = this.softErrorCount(); - return `${count} Error${count === 1 ? '' : 's'}`; + return i18n('common.ui.fancyForm.errorDescription', + { + defaultMessage: '{count, plural, one {# Error} other {# Errors}}', + values: { count } + }); } $setTouched() { diff --git a/src/ui/public/vis/agg_config.js b/src/ui/public/vis/agg_config.js index 881a3457905a8..6832d3d694fdc 100644 --- a/src/ui/public/vis/agg_config.js +++ b/src/ui/public/vis/agg_config.js @@ -26,6 +26,7 @@ import _ from 'lodash'; import { fieldFormats } from '../registry/field_formats'; +import { i18n } from '@kbn/i18n'; class AggConfig { @@ -265,8 +266,11 @@ class AggConfig { } if (!this.type) return ''; - let pre = percentageMode ? 'Percentage of ' : ''; - return pre += this.type.makeLabel(this); + return percentageMode ? + i18n.translate('common.ui.vis.aggConfig.percentageOfLabel', { + defaultMessage: 'Percentage of {label}', + values: { label: this.type.makeLabel(this) }, + }) : `${this.type.makeLabel(this)}`; } getIndexPattern() { diff --git a/src/ui/public/vis/default_feedback_message.js b/src/ui/public/vis/default_feedback_message.js index 90e309b161b28..f840ba961b9c3 100644 --- a/src/ui/public/vis/default_feedback_message.js +++ b/src/ui/public/vis/default_feedback_message.js @@ -17,5 +17,11 @@ * under the License. */ -export const defaultFeedbackMessage = `Have feedback? Please create an issue in -GitHub.`; +import { i18n } from '@kbn/i18n'; + +export const defaultFeedbackMessage = i18n.translate('common.ui.vis.defaultFeedbackMessage', + { + defaultMessage: 'Have feedback? Please create an issue in {link}.', + values: { link: 'GitHub' } + } +); diff --git a/src/ui/public/vis/editors/default/advanced_toggle.html b/src/ui/public/vis/editors/default/advanced_toggle.html index d5d7a7ea24057..cd4ca036906c5 100644 --- a/src/ui/public/vis/editors/default/advanced_toggle.html +++ b/src/ui/public/vis/editors/default/advanced_toggle.html @@ -1,6 +1,10 @@
diff --git a/src/ui/public/vis/editors/default/agg.html b/src/ui/public/vis/editors/default/agg.html index baba3554a9c3b..a303a19aeaab7 100644 --- a/src/ui/public/vis/editors/default/agg.html +++ b/src/ui/public/vis/editors/default/agg.html @@ -3,7 +3,7 @@