Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add translation files to CDN assets #181650

Merged
merged 6 commits into from
Apr 26, 2024

Conversation

pgayvallet
Copy link
Contributor

@pgayvallet pgayvallet commented Apr 25, 2024

Summary

Part of #72880

  • Generate translation files for all locales (including all internal plugins) during the CDN asset generation task
  • Adapt the rendering service to use the translation files from the CDN if configured/enabled

How to test

Connect to the serverless project that was created for the PR, and confirm the translation file is being loaded from the CDN

Screenshot 2024-04-25 at 15 55 23

@pgayvallet
Copy link
Contributor Author

/ci

1 similar comment
@pgayvallet
Copy link
Contributor Author

/ci

@pgayvallet pgayvallet added the ci:project-deploy-elasticsearch Create an Elasticsearch Serverless project label Apr 25, 2024
@pgayvallet pgayvallet force-pushed the kbn-xxx-translations-files-in-cdn branch from d3adff7 to cd7026b Compare April 25, 2024 07:24
@pgayvallet
Copy link
Contributor Author

/ci

@pgayvallet
Copy link
Contributor Author

/ci

@pgayvallet pgayvallet added release_note:skip Skip the PR/issue when compiling release notes v8.15.0 ci:build-cdn-assets labels Apr 25, 2024
@pgayvallet
Copy link
Contributor Author

/ci

@pgayvallet pgayvallet added ci:project-deploy-security Create a Security Project and removed ci:project-deploy-elasticsearch Create an Elasticsearch Serverless project labels Apr 25, 2024
@pgayvallet
Copy link
Contributor Author

@elasticmachine merge upstream

@pgayvallet
Copy link
Contributor Author

/ci

@kibana-ci
Copy link
Collaborator

kibana-ci commented Apr 25, 2024

💚 Build Succeeded

Metrics [docs]

Public APIs missing comments

Total count of every public API that lacks a comment. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats comments for more detailed information.

id before after diff
@kbn/core-http-server-internal 77 78 +1
@kbn/core-i18n-server-internal 10 13 +3
total +4

Canvas Sharable Runtime

The Canvas "shareable runtime" is an bundle produced to enable running Canvas workpads outside of Kibana. This bundle is included in third-party webpages that embed canvas and therefor should be as slim as possible.

id before after diff
module count - 5870 +5870
total size - 6.7MB +6.7MB
Unknown metric groups

API count

id before after diff
@kbn/core-http-server-internal 89 91 +2
@kbn/core-i18n-server-internal 10 14 +4
total +6

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@pgayvallet pgayvallet marked this pull request as ready for review April 25, 2024 13:56
@pgayvallet pgayvallet requested review from a team as code owners April 25, 2024 13:56
// translation files
const pluginPaths = plugins.map((plugin) => resolve(dirname(plugin)));
for (const locale of supportedLocale) {
const translationFileContent = await generateTranslationFile(locale, pluginPaths);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this deterministic? Any reason not to copy over the files from node_modules/@kbn/translations-plugin/translations?

Copy link
Contributor Author

@pgayvallet pgayvallet Apr 25, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the actual translation files sent to the server aren't following the exact same format than the ones in node_modules/@kbn/translations-plugin/translations (even if in practice, the files from the translations plugin is the only "source" to generate those final ones).

Copy link
Contributor

@TinaHeiligers TinaHeiligers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@pgayvallet pgayvallet merged commit 2911f59 into elastic:main Apr 26, 2024
17 checks passed
@kibanamachine kibanamachine added the backport:skip This commit does not require backporting label Apr 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:skip This commit does not require backporting ci:build-cdn-assets ci:project-deploy-security Create a Security Project release_note:skip Skip the PR/issue when compiling release notes v8.15.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants