[i18n] NPM publish i18ntokens.json#4771
Conversation
|
Preview documentation changes for this PR: https://eui.elastic.co/pr_4771/ |
thompsongl
left a comment
There was a problem hiding this comment.
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/ |
thompsongl
left a comment
There was a problem hiding this comment.
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 <thompson.glowe@gmail.com>
|
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 <thompson.glowe@gmail.com> Co-authored-by: Greg Thompson <thompson.glowe@gmail.com>
Summary
Publishing the
i18ntokens.jsonto 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.jsonto the root of the project instead ofsrc-docs/src/. It also movesi18ntokens_changelog.jsonbecause it kind of makes sense that they are together.Running the doc server locally,
http://0.0.0.0:8030/#/package/i18n-tokensit still works, andnpm publish --dry-runshows that the files are included in the NPM bundle now.Related to elastic/kibana#74657.
Checklist