From 42f3b3375df123e989f972adf36ba0c1d9aaef59 Mon Sep 17 00:00:00 2001 From: Clint Andrew Hall Date: Thu, 10 Mar 2022 22:22:21 -0600 Subject: [PATCH] i18n --- .i18nrc.json | 1 + packages/kbn-shared-ux-components/BUILD.bazel | 20 +++++++++---------- .../no_data_views/documentation_link.tsx | 4 ++-- .../no_data_views/no_data_views.component.tsx | 8 ++++---- .../exit_full_screen_button.component.tsx | 18 +++++++++++------ .../no_data_card/no_data_card.tsx | 18 +++++++++++------ .../translations/translations/ja-JP.json | 4 ++-- .../translations/translations/zh-CN.json | 4 ++-- 8 files changed, 45 insertions(+), 32 deletions(-) diff --git a/.i18nrc.json b/.i18nrc.json index eeb2578ef3472..402932902f249 100644 --- a/.i18nrc.json +++ b/.i18nrc.json @@ -60,6 +60,7 @@ "server": "src/legacy/server", "share": "src/plugins/share", "sharedUX": "src/plugins/shared_ux", + "sharedUXComponents": "packages/kbn-shared-ux-components/src", "statusPage": "src/legacy/core_plugins/status_page", "telemetry": ["src/plugins/telemetry", "src/plugins/telemetry_management_section"], "timelion": ["src/plugins/vis_types/timelion"], diff --git a/packages/kbn-shared-ux-components/BUILD.bazel b/packages/kbn-shared-ux-components/BUILD.bazel index 5d404d17524c5..2f49ed78f2609 100644 --- a/packages/kbn-shared-ux-components/BUILD.bazel +++ b/packages/kbn-shared-ux-components/BUILD.bazel @@ -38,17 +38,17 @@ NPM_MODULE_EXTRA_FILES = [ # "@npm//name-of-package" # eg. "@npm//lodash" RUNTIME_DEPS = [ + "//packages/kbn-i18n", + "//packages/kbn-i18n-react", + "//packages/kbn-shared-ux-services", + "//packages/kbn-shared-ux-storybook", + "//packages/kbn-shared-ux-utility", "@npm//react", "@npm//@elastic/eui", "@npm//@emotion/react", "@npm//@emotion/css", "@npm//classnames", "@npm//@storybook/addon-actions", - "//packages/kbn-shared-ux-services", - "//packages/kbn-shared-ux-storybook", - "//packages/kbn-shared-ux-utility", - "//packages/kbn-i18n", - "//packages/kbn-i18n-react", ] # In this array place dependencies necessary to build the types, which will include the @@ -61,6 +61,11 @@ RUNTIME_DEPS = [ # # References to NPM packages work the same as RUNTIME_DEPS TYPES_DEPS = [ + "//packages/kbn-i18n:npm_module_types", + "//packages/kbn-i18n-react:npm_module_types", + "//packages/kbn-shared-ux-services:npm_module_types", + "//packages/kbn-shared-ux-storybook:npm_module_types", + "//packages/kbn-shared-ux-utility:npm_module_types", "@npm//@types/node", "@npm//@types/jest", "@npm//@types/react", @@ -69,11 +74,6 @@ TYPES_DEPS = [ "@npm//@emotion/css", "@npm//@storybook/addon-actions", "@npm//@types/classnames", - "//packages/kbn-shared-ux-services:npm_module_types", - "//packages/kbn-shared-ux-storybook:npm_module_types", - "//packages/kbn-shared-ux-utility:npm_module_types", - "//packages/kbn-i18n:npm_module_types", - "//packages/kbn-i18n-react:npm_module_types", ] jsts_transpiler( diff --git a/packages/kbn-shared-ux-components/src/empty_state/no_data_views/documentation_link.tsx b/packages/kbn-shared-ux-components/src/empty_state/no_data_views/documentation_link.tsx index 4ac07899fef5f..3b3e742ea74ce 100644 --- a/packages/kbn-shared-ux-components/src/empty_state/no_data_views/documentation_link.tsx +++ b/packages/kbn-shared-ux-components/src/empty_state/no_data_views/documentation_link.tsx @@ -20,7 +20,7 @@ export function DocumentationLink({ href }: Props) {
@@ -29,7 +29,7 @@ export function DocumentationLink({ href }: Props) {
diff --git a/packages/kbn-shared-ux-components/src/empty_state/no_data_views/no_data_views.component.tsx b/packages/kbn-shared-ux-components/src/empty_state/no_data_views/no_data_views.component.tsx index bfab91ef03b26..bffa7c2a5269c 100644 --- a/packages/kbn-shared-ux-components/src/empty_state/no_data_views/no_data_views.component.tsx +++ b/packages/kbn-shared-ux-components/src/empty_state/no_data_views/no_data_views.component.tsx @@ -23,7 +23,7 @@ export interface Props { emptyPromptColor?: EuiEmptyPromptProps['color']; } -const createDataViewText = i18n.translate('sharedUX.noDataViewsPage.addDataViewText', { +const createDataViewText = i18n.translate('sharedUXComponents.noDataViewsPage.addDataViewText', { defaultMessage: 'Create Data View', }); @@ -62,12 +62,12 @@ export const NoDataViews = ({ title={


@@ -75,7 +75,7 @@ export const NoDataViews = ({ body={