Skip to content

Commit

Permalink
i18n
Browse files Browse the repository at this point in the history
  • Loading branch information
clintandrewhall committed Mar 11, 2022
1 parent 0810159 commit 42f3b33
Show file tree
Hide file tree
Showing 8 changed files with 45 additions and 32 deletions.
1 change: 1 addition & 0 deletions .i18nrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"],
Expand Down
20 changes: 10 additions & 10 deletions packages/kbn-shared-ux-components/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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",
Expand All @@ -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(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export function DocumentationLink({ href }: Props) {
<EuiTitle size="xxs">
<dt className="eui-displayInline">
<FormattedMessage
id="sharedUX.noDataViews.learnMore"
id="sharedUXComponents.noDataViews.learnMore"
defaultMessage="Want to learn more?"
/>
</dt>
Expand All @@ -29,7 +29,7 @@ export function DocumentationLink({ href }: Props) {
<dd className="eui-displayInline">
<EuiLink href={href} target="_blank" external>
<FormattedMessage
id="sharedUX.noDataViews.readDocumentation"
id="sharedUXComponents.noDataViews.readDocumentation"
defaultMessage="Read the docs"
/>
</EuiLink>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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',
});

Expand Down Expand Up @@ -62,20 +62,20 @@ export const NoDataViews = ({
title={
<h2>
<FormattedMessage
id="sharedUX.noDataViews.youHaveData"
id="sharedUXComponents.noDataViews.youHaveData"
defaultMessage="You have data in Elasticsearch."
/>
<br />
<FormattedMessage
id="sharedUX.noDataViews.nowCreate"
id="sharedUXComponents.noDataViews.nowCreate"
defaultMessage="Now, create a data view."
/>
</h2>
}
body={
<p>
<FormattedMessage
id="sharedUX.noDataViews.dataViewExplanation"
id="sharedUXComponents.noDataViews.dataViewExplanation"
defaultMessage="Kibana requires a data view to identify which data streams,
indices, and index aliases you want to explore. A data view can point to a
specific index, for example, your log data from yesterday, or all indices
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,19 @@ import cx from 'classnames';

import './exit_full_screen_button.scss';

const text = i18n.translate('sharedUX.exitFullScreenButton.exitFullScreenModeButtonText', {
defaultMessage: 'Exit full screen',
});
const text = i18n.translate(
'sharedUXComponents.exitFullScreenButton.exitFullScreenModeButtonText',
{
defaultMessage: 'Exit full screen',
}
);

const description = i18n.translate('sharedUX.exitFullScreenButton.fullScreenModeDescription', {
defaultMessage: 'In full screen mode, press ESC to exit.',
});
const description = i18n.translate(
'sharedUXComponents.exitFullScreenButton.fullScreenModeDescription',
{
defaultMessage: 'In full screen mode, press ESC to exit.',
}
);

/**
* Props for the Exit Full Screen button component.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,19 @@ import React, { FunctionComponent } from 'react';
import { EuiButton, EuiCard } from '@elastic/eui';
import type { NoDataCardProps } from './types';

const recommendedLabel = i18n.translate('sharedUX.pageTemplate.noDataPage.recommendedLabel', {
defaultMessage: 'Recommended',
});
const recommendedLabel = i18n.translate(
'sharedUXComponents.pageTemplate.noDataPage.recommendedLabel',
{
defaultMessage: 'Recommended',
}
);

const defaultDescription = i18n.translate('sharedUX.pageTemplate.noDataCard.description', {
defaultMessage: `Proceed without collecting data`,
});
const defaultDescription = i18n.translate(
'sharedUXComponents.pageTemplate.noDataCard.description',
{
defaultMessage: `Proceed without collecting data`,
}
);

export const NoDataCard: FunctionComponent<NoDataCardProps> = ({
recommended,
Expand Down
4 changes: 2 additions & 2 deletions x-pack/plugins/translations/translations/ja-JP.json
Original file line number Diff line number Diff line change
Expand Up @@ -5100,8 +5100,8 @@
"share.urlService.redirect.RedirectManager.missingParamLocator": "ロケーターIDが指定されていません。URLで「l」検索パラメーターを指定します。これは既存のロケーターIDにしてください。",
"share.urlService.redirect.RedirectManager.missingParamParams": "ロケーターパラメーターが指定されていません。URLで「p」検索パラメーターを指定します。これはロケーターパラメーターのJSONシリアル化オブジェクトにしてください。",
"share.urlService.redirect.RedirectManager.missingParamVersion": "ロケーターパラメーターバージョンが指定されていません。URLで「v」検索パラメーターを指定します。これはロケーターパラメーターが生成されたときのKibanaのリリースバージョンです。",
"sharedUX.exitFullScreenButton.exitFullScreenModeButtonText": "全画面を終了",
"sharedUX.exitFullScreenButton.fullScreenModeDescription": "ESC キーで全画面モードを終了します。",
"sharedUXComponents.exitFullScreenButton.exitFullScreenModeButtonText": "全画面を終了",
"sharedUXComponents.exitFullScreenButton.fullScreenModeDescription": "ESC キーで全画面モードを終了します。",
"telemetry.callout.appliesSettingTitle": "この設定に加えた変更は {allOfKibanaText} に適用され、自動的に保存されます。",
"telemetry.callout.appliesSettingTitle.allOfKibanaText": "Kibana のすべて",
"telemetry.callout.clusterStatisticsDescription": "これは収集される基本的なクラスター統計の例です。インデックス、シャード、ノードの数が含まれます。監視がオンになっているかどうかなどのハイレベルの使用統計も含まれます。",
Expand Down
4 changes: 2 additions & 2 deletions x-pack/plugins/translations/translations/zh-CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -5109,8 +5109,8 @@
"share.urlService.redirect.RedirectManager.missingParamLocator": "未指定定位器 ID。在 URL 中指定“l”搜索参数,其应为现有定位器 ID。",
"share.urlService.redirect.RedirectManager.missingParamParams": "定位器参数未指定。在 URL 中指定“p”搜索参数,其应为定位器参数的 JSON 序列化对象。",
"share.urlService.redirect.RedirectManager.missingParamVersion": "定位器参数版本未指定。在 URL 中指定“v”搜索参数,其应为生成定位器参数时 Kibana 的版本。",
"sharedUX.exitFullScreenButton.exitFullScreenModeButtonText": "退出全屏",
"sharedUX.exitFullScreenButton.fullScreenModeDescription": "在全屏模式下,按 ESC 键可退出。",
"sharedUXComponents.exitFullScreenButton.exitFullScreenModeButtonText": "退出全屏",
"sharedUXComponents.exitFullScreenButton.fullScreenModeDescription": "在全屏模式下,按 ESC 键可退出。",
"telemetry.callout.appliesSettingTitle": "对此设置的更改将应用到{allOfKibanaText} 且会自动保存。",
"telemetry.callout.appliesSettingTitle.allOfKibanaText": "整个 Kibana",
"telemetry.callout.clusterStatisticsDescription": "这是我们将收集的基本集群统计信息的示例。其包括索引、分片和节点的数目。还包括概括性的使用情况统计信息,例如监测是否打开。",
Expand Down

0 comments on commit 42f3b33

Please sign in to comment.