-
Notifications
You must be signed in to change notification settings - Fork 841
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
[i18n] NPM publish i18ntokens.json
#4771
[i18n] NPM publish i18ntokens.json
#4771
Conversation
Preview documentation changes for this PR: https://eui.elastic.co/pr_4771/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, @afharo!
I checked out this branch and ran update_token_changelog
, and the result doesn't look correct. Basically, it looks like every token was seen as "added" and as a result is duplicated in the latest version.
oops! Good catch! Let me double-check that, and I'll get back to you! |
@thompsongl the fix is in this commit: |
Preview documentation changes for this PR: https://eui.elastic.co/pr_4771/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Confirmed that both i18n token files are included in the npm package, the update_token script works as expected, and that the files are accessible from @elastic/eui/[file]
Co-authored-by: Greg Thompson <[email protected]>
Preview documentation changes for this PR: https://eui.elastic.co/pr_4771/ |
* [i18n] NPM publish `i18ntokens.json` * Add entry in changelog * Fix missing await * Update CHANGELOG.md Co-authored-by: Greg Thompson <[email protected]> Co-authored-by: Greg Thompson <[email protected]>
Summary
Publishing the
i18ntokens.json
to NPM will help any downstream users to identify all the keys they need to translate in their projects and, potentially, create tests in their CI to ensure that all tokens are covered before any release.To achieve that, this PR moves the generation of
i18ntokens.json
to the root of the project instead ofsrc-docs/src/
. It also movesi18ntokens_changelog.json
because it kind of makes sense that they are together.Running the doc server locally,
http://0.0.0.0:8030/#/package/i18n-tokens
it still works, andnpm publish --dry-run
shows that the files are included in the NPM bundle now.Related to elastic/kibana#74657.
Checklist