diff --git a/.i18nrc.json b/.i18nrc.json index 2b15e16458650..8c8673eced61a 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", + "tileMap": "src/core_plugins/tile_map", "tagCloud": "src/core_plugins/tagcloud", "xpack.idxMgmt": "x-pack/plugins/index_management", "xpack.watcher": "x-pack/plugins/watcher" diff --git a/src/core_plugins/tile_map/public/base_maps_visualization.js b/src/core_plugins/tile_map/public/base_maps_visualization.js index c812061d9d9e1..d17ee05247dbe 100644 --- a/src/core_plugins/tile_map/public/base_maps_visualization.js +++ b/src/core_plugins/tile_map/public/base_maps_visualization.js @@ -27,7 +27,7 @@ import { toastNotifications } from 'ui/notify'; const MINZOOM = 0; const MAXZOOM = 22;//increase this to 22. Better for WMS -export function BaseMapsVisualizationProvider(serviceSettings) { +export function BaseMapsVisualizationProvider(serviceSettings, i18n) { /** * Abstract base class for a visualization consisting of a map with a single baselayer. @@ -195,7 +195,9 @@ export function BaseMapsVisualizationProvider(serviceSettings) { } async _updateData() { - throw new Error('Child should implement this method to respond to data-update'); + throw new Error(i18n('tileMap.baseMapsVisualization.childShouldImplementMethodErrorMessage', { + defaultMessage: 'Child should implement this method to respond to data-update', + })); } _hasESResponseChanged(data) { diff --git a/src/core_plugins/tile_map/public/coordinate_maps_visualization.js b/src/core_plugins/tile_map/public/coordinate_maps_visualization.js index 44e25f538dc1e..fef5d5cbfab97 100644 --- a/src/core_plugins/tile_map/public/coordinate_maps_visualization.js +++ b/src/core_plugins/tile_map/public/coordinate_maps_visualization.js @@ -18,6 +18,7 @@ */ import _ from 'lodash'; +import { i18n } from '@kbn/i18n'; import { GeohashLayer } from './geohash_layer'; import { BaseMapsVisualizationProvider } from './base_maps_visualization'; import { AggConfig } from 'ui/vis/agg_config'; @@ -219,7 +220,9 @@ export function CoordinateMapsVisualizationProvider(Notifier, Private) { esResp = await searchSource.fetch(); } catch(error) { toastNotifications.addDanger({ - title: `Unable to get bounds`, + title: i18n.translate('tileMap.coordinateMapsVisualization.unableToGetBoundErrorTitle', { + defaultMessage: 'Unable to get bounds', + }), text: `${error.message}`, }); return; diff --git a/src/core_plugins/tile_map/public/editors/_tooltip_formatter.js b/src/core_plugins/tile_map/public/editors/_tooltip_formatter.js index 4cc73a518f44d..105bc510d8b2e 100644 --- a/src/core_plugins/tile_map/public/editors/_tooltip_formatter.js +++ b/src/core_plugins/tile_map/public/editors/_tooltip_formatter.js @@ -19,7 +19,7 @@ import $ from 'jquery'; -export function TileMapTooltipFormatterProvider($compile, $rootScope) { +export function TileMapTooltipFormatterProvider($compile, $rootScope, i18n) { const $tooltipScope = $rootScope.$new(); const $el = $('