From 428f4d2c77ef4204ce502a03e29b7bd09f6fce01 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 6 Jan 2023 02:38:26 +0000 Subject: [PATCH] [Vis Builder] Removed Hard Coded Strings and Used i18n to transalte (#2867) Signed-off-by: AbhishekReddy1127 Signed-off-by: AbhishekReddy1127 (cherry picked from commit b19c1717a29fffa1b40f8073c6dfb3fb4fe85972) Signed-off-by: github-actions[bot] --- .../application/components/data_tab/dropbox.tsx | 7 ++++++- .../public/application/components/workspace.tsx | 16 ++++++++++++++-- 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/src/plugins/vis_builder/public/application/components/data_tab/dropbox.tsx b/src/plugins/vis_builder/public/application/components/data_tab/dropbox.tsx index f6b7a6ca221b..70b43a2c6014 100644 --- a/src/plugins/vis_builder/public/application/components/data_tab/dropbox.tsx +++ b/src/plugins/vis_builder/public/application/components/data_tab/dropbox.tsx @@ -3,6 +3,7 @@ * SPDX-License-Identifier: Apache-2.0 */ +import { i18n } from '@osd/i18n'; import { EuiButtonIcon, EuiDragDropContext, @@ -127,7 +128,11 @@ const DropboxComponent = ({ } ${canDrop ? 'canDrop' : ''}`} {...(isValidDropTarget && dropProps)} > - Click or drop to add + + {i18n.translate('visBuilder.dropbox.addField.title', { + defaultMessage: 'Click or drop to add', + })} + { ) : ( Add a field to start} + title={ +

+ {i18n.translate('visBuilder.workSpace.empty.title', { + defaultMessage: 'Add a field to start', + })} +

+ } body={ <> -

Drag a field to the configuration panel to generate a visualization.

+

+ {i18n.translate('visBuilder.workSpace.empty.description', { + defaultMessage: + 'Drag a field to the configuration panel to generate a visualization.', + })} +