diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/analytics/constants.ts b/x-pack/plugins/enterprise_search/public/applications/app_search/components/analytics/constants.ts index 51ae11ad2ab8..1e25582e3d56 100644 --- a/x-pack/plugins/enterprise_search/public/applications/app_search/components/analytics/constants.ts +++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/analytics/constants.ts @@ -6,6 +6,11 @@ import { i18n } from '@kbn/i18n'; +export const ANALYTICS_TITLE = i18n.translate( + 'xpack.enterpriseSearch.appSearch.engine.analytics.title', + { defaultMessage: 'Analytics' } +); + export const TOTAL_DOCUMENTS = i18n.translate( 'xpack.enterpriseSearch.appSearch.engine.analytics.totalDocuments', { defaultMessage: 'Total documents' } diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/analytics/index.ts b/x-pack/plugins/enterprise_search/public/applications/app_search/components/analytics/index.ts new file mode 100644 index 000000000000..7cddef645e83 --- /dev/null +++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/analytics/index.ts @@ -0,0 +1,7 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License; + * you may not use this file except in compliance with the Elastic License. + */ + +export { ANALYTICS_TITLE } from './constants'; diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/api_logs/constants.ts b/x-pack/plugins/enterprise_search/public/applications/app_search/components/api_logs/constants.ts index 6fd60b7a34eb..0a12f872f18f 100644 --- a/x-pack/plugins/enterprise_search/public/applications/app_search/components/api_logs/constants.ts +++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/api_logs/constants.ts @@ -6,6 +6,11 @@ import { i18n } from '@kbn/i18n'; +export const API_LOGS_TITLE = i18n.translate( + 'xpack.enterpriseSearch.appSearch.engine.apiLogs.title', + { defaultMessage: 'API Logs' } +); + export const RECENT_API_EVENTS = i18n.translate( 'xpack.enterpriseSearch.appSearch.engine.apiLogs.recent', { defaultMessage: 'Recent API events' } diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/api_logs/index.ts b/x-pack/plugins/enterprise_search/public/applications/app_search/components/api_logs/index.ts new file mode 100644 index 000000000000..72cd9efa887c --- /dev/null +++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/api_logs/index.ts @@ -0,0 +1,7 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License; + * you may not use this file except in compliance with the Elastic License. + */ + +export { API_LOGS_TITLE } from './constants'; diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/crawler/constants.ts b/x-pack/plugins/enterprise_search/public/applications/app_search/components/crawler/constants.ts new file mode 100644 index 000000000000..777d75600a27 --- /dev/null +++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/crawler/constants.ts @@ -0,0 +1,12 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License; + * you may not use this file except in compliance with the Elastic License. + */ + +import { i18n } from '@kbn/i18n'; + +export const CRAWLER_TITLE = i18n.translate( + 'xpack.enterpriseSearch.appSearch.engine.crawler.title', + { defaultMessage: 'Crawler' } +); diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/crawler/index.ts b/x-pack/plugins/enterprise_search/public/applications/app_search/components/crawler/index.ts new file mode 100644 index 000000000000..f5b81c318ed5 --- /dev/null +++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/crawler/index.ts @@ -0,0 +1,7 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License; + * you may not use this file except in compliance with the Elastic License. + */ + +export { CRAWLER_TITLE } from './constants'; diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/curations/constants.ts b/x-pack/plugins/enterprise_search/public/applications/app_search/components/curations/constants.ts new file mode 100644 index 000000000000..3b88d2c4983d --- /dev/null +++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/curations/constants.ts @@ -0,0 +1,12 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License; + * you may not use this file except in compliance with the Elastic License. + */ + +import { i18n } from '@kbn/i18n'; + +export const CURATIONS_TITLE = i18n.translate( + 'xpack.enterpriseSearch.appSearch.engine.curations.title', + { defaultMessage: 'Curations' } +); diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/curations/index.ts b/x-pack/plugins/enterprise_search/public/applications/app_search/components/curations/index.ts new file mode 100644 index 000000000000..ecb9c223e4b6 --- /dev/null +++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/curations/index.ts @@ -0,0 +1,7 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License; + * you may not use this file except in compliance with the Elastic License. + */ + +export { CURATIONS_TITLE } from './constants'; diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/documents/index.ts b/x-pack/plugins/enterprise_search/public/applications/app_search/components/documents/index.ts index b67e444939c0..113259b7bd89 100644 --- a/x-pack/plugins/enterprise_search/public/applications/app_search/components/documents/index.ts +++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/documents/index.ts @@ -4,6 +4,7 @@ * you may not use this file except in compliance with the Elastic License. */ +export { DOCUMENTS_TITLE } from './constants'; export { DocumentDetailLogic } from './document_detail_logic'; export { DocumentsLogic } from './documents_logic'; export { Documents } from './documents'; diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/engine/constants.ts b/x-pack/plugins/enterprise_search/public/applications/app_search/components/engine/constants.ts deleted file mode 100644 index 9ce524038075..000000000000 --- a/x-pack/plugins/enterprise_search/public/applications/app_search/components/engine/constants.ts +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License; - * you may not use this file except in compliance with the Elastic License. - */ - -import { i18n } from '@kbn/i18n'; - -// TODO: It's very likely that we'll move these i18n constants to their respective component -// folders once those are migrated over. This is a temporary way of DRYing them out for now. - -export const ANALYTICS_TITLE = i18n.translate( - 'xpack.enterpriseSearch.appSearch.engine.analytics.title', - { defaultMessage: 'Analytics' } -); -export const DOCUMENTS_TITLE = i18n.translate( - 'xpack.enterpriseSearch.appSearch.engine.documents.title', - { defaultMessage: 'Documents' } -); -export const SCHEMA_TITLE = i18n.translate('xpack.enterpriseSearch.appSearch.engine.schema.title', { - defaultMessage: 'Schema', -}); -export const CRAWLER_TITLE = i18n.translate( - 'xpack.enterpriseSearch.appSearch.engine.crawler.title', - { defaultMessage: 'Crawler' } -); -export const RELEVANCE_TUNING_TITLE = i18n.translate( - 'xpack.enterpriseSearch.appSearch.engine.relevanceTuning.title', - { defaultMessage: 'Relevance Tuning' } -); -export const SYNONYMS_TITLE = i18n.translate( - 'xpack.enterpriseSearch.appSearch.engine.synonyms.title', - { defaultMessage: 'Synonyms' } -); -export const CURATIONS_TITLE = i18n.translate( - 'xpack.enterpriseSearch.appSearch.engine.curations.title', - { defaultMessage: 'Curations' } -); -export const RESULT_SETTINGS_TITLE = i18n.translate( - 'xpack.enterpriseSearch.appSearch.engine.resultSettings.title', - { defaultMessage: 'Result Settings' } -); -export const SEARCH_UI_TITLE = i18n.translate( - 'xpack.enterpriseSearch.appSearch.engine.searchUI.title', - { defaultMessage: 'Search UI' } -); -export const API_LOGS_TITLE = i18n.translate( - 'xpack.enterpriseSearch.appSearch.engine.apiLogs.title', - { defaultMessage: 'API Logs' } -); diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/engine/engine_nav.tsx b/x-pack/plugins/enterprise_search/public/applications/app_search/components/engine/engine_nav.tsx index 0fed7cd0fc8f..418ab33457d0 100644 --- a/x-pack/plugins/enterprise_search/public/applications/app_search/components/engine/engine_nav.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/engine/engine_nav.tsx @@ -29,18 +29,16 @@ import { import { getAppSearchUrl } from '../../../shared/enterprise_search_url'; import { ENGINES_TITLE } from '../engines'; import { OVERVIEW_TITLE } from '../engine_overview'; -import { - ANALYTICS_TITLE, - DOCUMENTS_TITLE, - SCHEMA_TITLE, - CRAWLER_TITLE, - RELEVANCE_TUNING_TITLE, - SYNONYMS_TITLE, - CURATIONS_TITLE, - RESULT_SETTINGS_TITLE, - SEARCH_UI_TITLE, - API_LOGS_TITLE, -} from './constants'; +import { ANALYTICS_TITLE } from '../analytics'; +import { DOCUMENTS_TITLE } from '../documents'; +import { SCHEMA_TITLE } from '../schema'; +import { CRAWLER_TITLE } from '../crawler'; +import { RELEVANCE_TUNING_TITLE } from '../relevance_tuning'; +import { SYNONYMS_TITLE } from '../synonyms'; +import { CURATIONS_TITLE } from '../curations'; +import { RESULT_SETTINGS_TITLE } from '../result_settings'; +import { SEARCH_UI_TITLE } from '../search_ui'; +import { API_LOGS_TITLE } from '../api_logs'; import { EngineLogic } from './'; import { EngineDetails } from './types'; diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/engine/engine_router.tsx b/x-pack/plugins/enterprise_search/public/applications/app_search/components/engine/engine_router.tsx index ce7675cef9bb..1d2f3f640f34 100644 --- a/x-pack/plugins/enterprise_search/public/applications/app_search/components/engine/engine_router.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/engine/engine_router.tsx @@ -33,18 +33,7 @@ import { } from '../../routes'; import { ENGINES_TITLE } from '../engines'; import { OVERVIEW_TITLE } from '../engine_overview'; -import { - ANALYTICS_TITLE, - // DOCUMENTS_TITLE, - // SCHEMA_TITLE, - // CRAWLER_TITLE, - // RELEVANCE_TUNING_TITLE, - // SYNONYMS_TITLE, - // CURATIONS_TITLE, - // RESULT_SETTINGS_TITLE, - // SEARCH_UI_TITLE, - // API_LOGS_TITLE, -} from './constants'; +import { ANALYTICS_TITLE } from '../analytics'; import { Loading } from '../../../shared/loading'; import { EngineOverview } from '../engine_overview'; diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/relevance_tuning/constants.ts b/x-pack/plugins/enterprise_search/public/applications/app_search/components/relevance_tuning/constants.ts new file mode 100644 index 000000000000..b993b017f7b3 --- /dev/null +++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/relevance_tuning/constants.ts @@ -0,0 +1,12 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License; + * you may not use this file except in compliance with the Elastic License. + */ + +import { i18n } from '@kbn/i18n'; + +export const RELEVANCE_TUNING_TITLE = i18n.translate( + 'xpack.enterpriseSearch.appSearch.engine.relevanceTuning.title', + { defaultMessage: 'Relevance Tuning' } +); diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/relevance_tuning/index.ts b/x-pack/plugins/enterprise_search/public/applications/app_search/components/relevance_tuning/index.ts new file mode 100644 index 000000000000..40f3ddbf2899 --- /dev/null +++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/relevance_tuning/index.ts @@ -0,0 +1,7 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License; + * you may not use this file except in compliance with the Elastic License. + */ + +export { RELEVANCE_TUNING_TITLE } from './constants'; diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/result_settings/constants.ts b/x-pack/plugins/enterprise_search/public/applications/app_search/components/result_settings/constants.ts new file mode 100644 index 000000000000..6609f2c69099 --- /dev/null +++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/result_settings/constants.ts @@ -0,0 +1,12 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License; + * you may not use this file except in compliance with the Elastic License. + */ + +import { i18n } from '@kbn/i18n'; + +export const RESULT_SETTINGS_TITLE = i18n.translate( + 'xpack.enterpriseSearch.appSearch.engine.resultSettings.title', + { defaultMessage: 'Result Settings' } +); diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/result_settings/index.ts b/x-pack/plugins/enterprise_search/public/applications/app_search/components/result_settings/index.ts new file mode 100644 index 000000000000..c9d8bacc39dd --- /dev/null +++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/result_settings/index.ts @@ -0,0 +1,7 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License; + * you may not use this file except in compliance with the Elastic License. + */ + +export { RESULT_SETTINGS_TITLE } from './constants'; diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/schema/constants.ts b/x-pack/plugins/enterprise_search/public/applications/app_search/components/schema/constants.ts new file mode 100644 index 000000000000..dfe87b396aac --- /dev/null +++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/schema/constants.ts @@ -0,0 +1,11 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License; + * you may not use this file except in compliance with the Elastic License. + */ + +import { i18n } from '@kbn/i18n'; + +export const SCHEMA_TITLE = i18n.translate('xpack.enterpriseSearch.appSearch.engine.schema.title', { + defaultMessage: 'Schema', +}); diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/schema/index.ts b/x-pack/plugins/enterprise_search/public/applications/app_search/components/schema/index.ts new file mode 100644 index 000000000000..02d534a9c37c --- /dev/null +++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/schema/index.ts @@ -0,0 +1,7 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License; + * you may not use this file except in compliance with the Elastic License. + */ + +export { SCHEMA_TITLE } from './constants'; diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/search_ui/constants.ts b/x-pack/plugins/enterprise_search/public/applications/app_search/components/search_ui/constants.ts new file mode 100644 index 000000000000..9d79924b5ffe --- /dev/null +++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/search_ui/constants.ts @@ -0,0 +1,12 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License; + * you may not use this file except in compliance with the Elastic License. + */ + +import { i18n } from '@kbn/i18n'; + +export const SEARCH_UI_TITLE = i18n.translate( + 'xpack.enterpriseSearch.appSearch.engine.searchUI.title', + { defaultMessage: 'Search UI' } +); diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/search_ui/index.ts b/x-pack/plugins/enterprise_search/public/applications/app_search/components/search_ui/index.ts new file mode 100644 index 000000000000..2c3c122e7c03 --- /dev/null +++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/search_ui/index.ts @@ -0,0 +1,7 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License; + * you may not use this file except in compliance with the Elastic License. + */ + +export { SEARCH_UI_TITLE } from './constants'; diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/synonyms/constants.ts b/x-pack/plugins/enterprise_search/public/applications/app_search/components/synonyms/constants.ts new file mode 100644 index 000000000000..ece979b8db00 --- /dev/null +++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/synonyms/constants.ts @@ -0,0 +1,12 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License; + * you may not use this file except in compliance with the Elastic License. + */ + +import { i18n } from '@kbn/i18n'; + +export const SYNONYMS_TITLE = i18n.translate( + 'xpack.enterpriseSearch.appSearch.engine.synonyms.title', + { defaultMessage: 'Synonyms' } +); diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/synonyms/index.ts b/x-pack/plugins/enterprise_search/public/applications/app_search/components/synonyms/index.ts new file mode 100644 index 000000000000..bc4388eb1fbc --- /dev/null +++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/synonyms/index.ts @@ -0,0 +1,7 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License; + * you may not use this file except in compliance with the Elastic License. + */ + +export { SYNONYMS_TITLE } from './constants'; diff --git a/x-pack/plugins/translations/translations/ja-JP.json b/x-pack/plugins/translations/translations/ja-JP.json index 06fa5f451bfe..de1e26580d87 100644 --- a/x-pack/plugins/translations/translations/ja-JP.json +++ b/x-pack/plugins/translations/translations/ja-JP.json @@ -7241,7 +7241,6 @@ "xpack.enterpriseSearch.appSearch.engine.apiLogs.title": "API ログ", "xpack.enterpriseSearch.appSearch.engine.crawler.title": "Crawler", "xpack.enterpriseSearch.appSearch.engine.curations.title": "キュレーション", - "xpack.enterpriseSearch.appSearch.engine.documents.title": "ドキュメント", "xpack.enterpriseSearch.appSearch.engine.metaEngineBadge": "メタエンジン", "xpack.enterpriseSearch.appSearch.engine.notFound": "名前「{engineName}」のエンジンが見つかりませんでした。", "xpack.enterpriseSearch.appSearch.engine.overview.analyticsLink": "分析を表示", diff --git a/x-pack/plugins/translations/translations/zh-CN.json b/x-pack/plugins/translations/translations/zh-CN.json index aec87aac8408..7169197a7628 100644 --- a/x-pack/plugins/translations/translations/zh-CN.json +++ b/x-pack/plugins/translations/translations/zh-CN.json @@ -7260,7 +7260,6 @@ "xpack.enterpriseSearch.appSearch.engine.apiLogs.title": "API 日志", "xpack.enterpriseSearch.appSearch.engine.crawler.title": "网络爬虫", "xpack.enterpriseSearch.appSearch.engine.curations.title": "策展", - "xpack.enterpriseSearch.appSearch.engine.documents.title": "文档", "xpack.enterpriseSearch.appSearch.engine.metaEngineBadge": "元引擎", "xpack.enterpriseSearch.appSearch.engine.notFound": "找不到名为“{engineName}”的引擎。", "xpack.enterpriseSearch.appSearch.engine.overview.analyticsLink": "查看分析",