diff --git a/.i18nrc.json b/.i18nrc.json
index e0c06323b7ebf..cba5a18f6c959 100644
--- a/.i18nrc.json
+++ b/.i18nrc.json
@@ -7,6 +7,7 @@
"markdownVis": "src/core_plugins/markdown_vis",
"metricVis": "src/core_plugins/metric_vis",
"statusPage": "src/core_plugins/status_page",
+ "tagCloud": "src/core_plugins/tagcloud",
"xpack.idxMgmt": "x-pack/plugins/index_management"
},
"exclude": [
diff --git a/src/core_plugins/tagcloud/public/feedback_message.js b/src/core_plugins/tagcloud/public/feedback_message.js
index f3c726c5a8f76..ee27af3ec2cb0 100644
--- a/src/core_plugins/tagcloud/public/feedback_message.js
+++ b/src/core_plugins/tagcloud/public/feedback_message.js
@@ -18,6 +18,7 @@
*/
import React, { Component } from 'react';
+import { FormattedMessage } from '@kbn/i18n/react';
export class FeedbackMessage extends Component {
@@ -30,10 +31,16 @@ export class FeedbackMessage extends Component {
return (
- The number of tags has been truncated to avoid long draw times.
+
- The container is too small to display the entire cloud. Tags might be cropped or omitted.
+
);
diff --git a/src/core_plugins/tagcloud/public/tag_cloud_vis.js b/src/core_plugins/tagcloud/public/tag_cloud_vis.js
index d4245bc114efa..3eb9548911097 100644
--- a/src/core_plugins/tagcloud/public/tag_cloud_vis.js
+++ b/src/core_plugins/tagcloud/public/tag_cloud_vis.js
@@ -26,15 +26,17 @@ import { TagCloudVisualization } from './tag_cloud_visualization';
import { VisTypesRegistryProvider } from 'ui/registry/vis_types';
import { Status } from 'ui/vis/update_status';
-VisTypesRegistryProvider.register(function (Private) {
+VisTypesRegistryProvider.register(function (Private, i18n) {
const VisFactory = Private(VisFactoryProvider);
return VisFactory.createBaseVisualization({
name: 'tagcloud',
- title: 'Tag Cloud',
+ title: i18n('tagCloud.vis.tagCloudTitle', { defaultMessage: 'Tag Cloud' }),
icon: 'visTagCloud',
- description: 'A group of words, sized according to their importance',
+ description: i18n('tagCloud.vis.tagCloudDescription', {
+ defaultMessage: 'A group of words, sized according to their importance'
+ }),
category: CATEGORY.OTHER,
visConfig: {
defaults: {
@@ -57,7 +59,7 @@ VisTypesRegistryProvider.register(function (Private) {
{
group: 'metrics',
name: 'metric',
- title: 'Tag Size',
+ title: i18n('tagCloud.vis.schemas.metricTitle', { defaultMessage: 'Tag Size' }),
min: 1,
max: 1,
aggFilter: ['!std_dev', '!percentiles', '!percentile_ranks', '!derivative', '!geo_bounds', '!geo_centroid'],
@@ -69,7 +71,7 @@ VisTypesRegistryProvider.register(function (Private) {
group: 'buckets',
name: 'segment',
icon: 'fa fa-cloud',
- title: 'Tags',
+ title: i18n('tagCloud.vis.schemas.segmentTitle', { defaultMessage: 'Tags' }),
min: 1,
max: 1,
aggFilter: ['terms', 'significant_terms']
diff --git a/src/core_plugins/tagcloud/public/tag_cloud_vis_params.html b/src/core_plugins/tagcloud/public/tag_cloud_vis_params.html
index c089c96de7c4a..65c2a369a20fd 100644
--- a/src/core_plugins/tagcloud/public/tag_cloud_vis_params.html
+++ b/src/core_plugins/tagcloud/public/tag_cloud_vis_params.html
@@ -1,15 +1,15 @@
diff --git a/src/core_plugins/tagcloud/public/tag_cloud_visualization.js b/src/core_plugins/tagcloud/public/tag_cloud_visualization.js
index 251673ca30cae..1fc16b3b1c9f4 100644
--- a/src/core_plugins/tagcloud/public/tag_cloud_visualization.js
+++ b/src/core_plugins/tagcloud/public/tag_cloud_visualization.js
@@ -23,7 +23,7 @@ import { take } from 'rxjs/operators';
import { render, unmountComponentAtNode } from 'react-dom';
import React from 'react';
-
+import { I18nProvider } from '@kbn/i18n/react';
import { Label } from './label';
import { FeedbackMessage } from './feedback_message';
@@ -57,7 +57,7 @@ export class TagCloudVisualization {
this._feedbackNode = document.createElement('div');
this._containerNode.appendChild(this._feedbackNode);
this._feedbackMessage = React.createRef();
- render(, this._feedbackNode);
+ render(, this._feedbackNode);
this._labelNode = document.createElement('div');
this._containerNode.appendChild(this._labelNode);