From c609daa97c2b0aa94aebc3fce76c9439e8a4d95c Mon Sep 17 00:00:00 2001 From: Gerard Soldevila Date: Tue, 10 Dec 2024 13:56:15 +0100 Subject: [PATCH] Sustainable Kibana Architecture: Move modules owned by `@elastic/kibana-localization` (#202725) ## Summary This PR aims at relocating some of the Kibana modules (plugins and packages) into a new folder structure, according to the _Sustainable Kibana Architecture_ initiative. > [!IMPORTANT] > * We kindly ask you to: > * Manually fix the errors in the error section below (if there are any). > * Search for the `packages[\/\\]` and `plugins[\/\\]` patterns in the source code (Babel and Eslint config files), and update them appropriately. > * Manually review `.buildkite/scripts/pipelines/pull_request/pipeline.ts` to ensure that any CI pipeline customizations continue to be correctly applied after the changed path names > * Review all of the updated files, specially the `.ts` and `.js` files listed in the sections below, as some of them contain relative paths that have been updated. > * Think of potential impact of the move, including tooling and configuration files that can be pointing to the relocated modules. E.g.: > * customised eslint rules > * docs pointing to source code > [!NOTE] > This PR has been auto-generated. > Do not attempt to push any changes unless you know what you are doing. > Please use [#sustainable_kibana_architecture](https://elastic.slack.com/archives/C07TCKTA22E) Slack channel for feedback. #### 1 plugin(s) are going to be relocated: | Id | Target folder | | -- | ------------- | | `@kbn/translations-plugin` | `x-pack/platform/plugins/private/translations` |
Updated references ``` ./docs/developer/plugin-list.asciidoc ./package.json ./packages/kbn-repo-packages/package-map.json ./packages/kbn-synthetic-package-map/synthetic-packages.json ./packages/kbn-ts-projects/config-paths.json ./src/dev/i18n_tools/README.md ./tsconfig.base.json ./tsconfig.refs.json ./yarn.lock ```
Updated relative paths ``` x-pack/platform/plugins/private/translations/tsconfig.json:2 ```
Script errors ``` ```
--- .github/CODEOWNERS | 2 +- docs/developer/plugin-list.asciidoc | 2 +- package.json | 2 +- src/dev/i18n_tools/README.md | 2 +- tsconfig.base.json | 4 ++-- .../plugins/private}/translations/README.asciidoc | 0 .../plugins/private}/translations/kibana.jsonc | 0 .../plugins/private}/translations/server/index.ts | 0 .../plugins/private}/translations/translations/en.json | 0 .../plugins/private}/translations/translations/fr-FR.json | 0 .../plugins/private}/translations/translations/ja-JP.json | 0 .../plugins/private}/translations/translations/zh-CN.json | 0 .../plugins/private}/translations/tsconfig.json | 2 +- yarn.lock | 2 +- 14 files changed, 8 insertions(+), 8 deletions(-) rename x-pack/{plugins => platform/plugins/private}/translations/README.asciidoc (100%) rename x-pack/{plugins => platform/plugins/private}/translations/kibana.jsonc (100%) rename x-pack/{plugins => platform/plugins/private}/translations/server/index.ts (100%) rename x-pack/{plugins => platform/plugins/private}/translations/translations/en.json (100%) rename x-pack/{plugins => platform/plugins/private}/translations/translations/fr-FR.json (100%) rename x-pack/{plugins => platform/plugins/private}/translations/translations/ja-JP.json (100%) rename x-pack/{plugins => platform/plugins/private}/translations/translations/zh-CN.json (100%) rename x-pack/{plugins => platform/plugins/private}/translations/tsconfig.json (80%) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 11035e0eb7dbd..4e1cb694a66cf 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -869,6 +869,7 @@ x-pack/platform/packages/shared/ml/runtime_field_utils @elastic/ml-ui x-pack/platform/packages/shared/ml/trained_models_utils @elastic/ml-ui x-pack/platform/plugins/private/data_visualizer @elastic/ml-ui x-pack/platform/plugins/private/transform @elastic/ml-ui +x-pack/platform/plugins/private/translations @elastic/kibana-localization x-pack/platform/plugins/shared/ai_infra/llm_tasks @elastic/appex-ai-infra x-pack/platform/plugins/shared/ai_infra/product_doc_base @elastic/appex-ai-infra x-pack/platform/plugins/shared/aiops @elastic/ml-ui @@ -991,7 +992,6 @@ x-pack/plugins/task_manager @elastic/response-ops x-pack/plugins/telemetry_collection_xpack @elastic/kibana-core x-pack/plugins/threat_intelligence @elastic/security-threat-hunting-investigations x-pack/plugins/timelines @elastic/security-threat-hunting-investigations -x-pack/plugins/translations @elastic/kibana-localization x-pack/plugins/triggers_actions_ui @elastic/response-ops x-pack/plugins/upgrade_assistant @elastic/kibana-management x-pack/plugins/watcher @elastic/kibana-management diff --git a/docs/developer/plugin-list.asciidoc b/docs/developer/plugin-list.asciidoc index 982c9c969122c..7de266985c6d6 100644 --- a/docs/developer/plugin-list.asciidoc +++ b/docs/developer/plugin-list.asciidoc @@ -988,4 +988,4 @@ include::{kibana-root}/src/plugins/expressions/README.asciidoc[leveloffset=+1] include::{kibana-root}/src/plugins/ui_actions/README.asciidoc[leveloffset=+1] include::{kibana-root}/x-pack/plugins/dashboard_enhanced/README.asciidoc[leveloffset=+1] include::{kibana-root}/x-pack/plugins/embeddable_enhanced/README.asciidoc[leveloffset=+1] -include::{kibana-root}/x-pack/plugins/translations/README.asciidoc[leveloffset=+1] +include::{kibana-root}/x-pack/platform/plugins/private/translations/README.asciidoc[leveloffset=+1] diff --git a/package.json b/package.json index 9e2bd09e7a0d1..47f098d33f40d 100644 --- a/package.json +++ b/package.json @@ -963,7 +963,7 @@ "@kbn/timerange": "link:packages/kbn-timerange", "@kbn/tinymath": "link:packages/kbn-tinymath", "@kbn/transform-plugin": "link:x-pack/platform/plugins/private/transform", - "@kbn/translations-plugin": "link:x-pack/plugins/translations", + "@kbn/translations-plugin": "link:x-pack/platform/plugins/private/translations", "@kbn/transpose-utils": "link:packages/kbn-transpose-utils", "@kbn/triggers-actions-ui-example-plugin": "link:x-pack/examples/triggers_actions_ui_example", "@kbn/triggers-actions-ui-plugin": "link:x-pack/plugins/triggers_actions_ui", diff --git a/src/dev/i18n_tools/README.md b/src/dev/i18n_tools/README.md index 6fc50a3a59b47..041d7215f00ef 100644 --- a/src/dev/i18n_tools/README.md +++ b/src/dev/i18n_tools/README.md @@ -134,7 +134,7 @@ The tool throws an exception if `formats` object is missing in locale file. ### Usage ```bash -node scripts/i18n_integrate --source path/to/locale.json --target x-pack/plugins/translations/translations/locale.json +node scripts/i18n_integrate --source path/to/locale.json --target x-pack/platform/plugins/private/translations/translations/locale.json ``` * `--source` path to the JSON file with translations that should be integrated. diff --git a/tsconfig.base.json b/tsconfig.base.json index 9fd96ede22e5c..bc77936f8d3b9 100644 --- a/tsconfig.base.json +++ b/tsconfig.base.json @@ -1932,8 +1932,8 @@ "@kbn/tooling-log/*": ["packages/kbn-tooling-log/*"], "@kbn/transform-plugin": ["x-pack/platform/plugins/private/transform"], "@kbn/transform-plugin/*": ["x-pack/platform/plugins/private/transform/*"], - "@kbn/translations-plugin": ["x-pack/plugins/translations"], - "@kbn/translations-plugin/*": ["x-pack/plugins/translations/*"], + "@kbn/translations-plugin": ["x-pack/platform/plugins/private/translations"], + "@kbn/translations-plugin/*": ["x-pack/platform/plugins/private/translations/*"], "@kbn/transpose-utils": ["packages/kbn-transpose-utils"], "@kbn/transpose-utils/*": ["packages/kbn-transpose-utils/*"], "@kbn/triggers-actions-ui-example-plugin": ["x-pack/examples/triggers_actions_ui_example"], diff --git a/x-pack/plugins/translations/README.asciidoc b/x-pack/platform/plugins/private/translations/README.asciidoc similarity index 100% rename from x-pack/plugins/translations/README.asciidoc rename to x-pack/platform/plugins/private/translations/README.asciidoc diff --git a/x-pack/plugins/translations/kibana.jsonc b/x-pack/platform/plugins/private/translations/kibana.jsonc similarity index 100% rename from x-pack/plugins/translations/kibana.jsonc rename to x-pack/platform/plugins/private/translations/kibana.jsonc diff --git a/x-pack/plugins/translations/server/index.ts b/x-pack/platform/plugins/private/translations/server/index.ts similarity index 100% rename from x-pack/plugins/translations/server/index.ts rename to x-pack/platform/plugins/private/translations/server/index.ts diff --git a/x-pack/plugins/translations/translations/en.json b/x-pack/platform/plugins/private/translations/translations/en.json similarity index 100% rename from x-pack/plugins/translations/translations/en.json rename to x-pack/platform/plugins/private/translations/translations/en.json diff --git a/x-pack/plugins/translations/translations/fr-FR.json b/x-pack/platform/plugins/private/translations/translations/fr-FR.json similarity index 100% rename from x-pack/plugins/translations/translations/fr-FR.json rename to x-pack/platform/plugins/private/translations/translations/fr-FR.json diff --git a/x-pack/plugins/translations/translations/ja-JP.json b/x-pack/platform/plugins/private/translations/translations/ja-JP.json similarity index 100% rename from x-pack/plugins/translations/translations/ja-JP.json rename to x-pack/platform/plugins/private/translations/translations/ja-JP.json diff --git a/x-pack/plugins/translations/translations/zh-CN.json b/x-pack/platform/plugins/private/translations/translations/zh-CN.json similarity index 100% rename from x-pack/plugins/translations/translations/zh-CN.json rename to x-pack/platform/plugins/private/translations/translations/zh-CN.json diff --git a/x-pack/plugins/translations/tsconfig.json b/x-pack/platform/plugins/private/translations/tsconfig.json similarity index 80% rename from x-pack/plugins/translations/tsconfig.json rename to x-pack/platform/plugins/private/translations/tsconfig.json index e48f8b0627a1b..a9784e9415491 100644 --- a/x-pack/plugins/translations/tsconfig.json +++ b/x-pack/platform/plugins/private/translations/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../../tsconfig.base.json", + "extends": "../../../../../tsconfig.base.json", "compilerOptions": { "outDir": "target/types", }, diff --git a/yarn.lock b/yarn.lock index 67571d31600ab..860efbbc2c5c2 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7680,7 +7680,7 @@ version "0.0.0" uid "" -"@kbn/translations-plugin@link:x-pack/plugins/translations": +"@kbn/translations-plugin@link:x-pack/platform/plugins/private/translations": version "0.0.0" uid ""