Skip to content

[Nightly] EUI i18n tokens in nightly Kibana PR - #9876

Draft
weronikaolejniczak wants to merge 2 commits into
elastic:mainfrom
weronikaolejniczak:worktree-feat-automate-kibana-i18n-sync
Draft

[Nightly] EUI i18n tokens in nightly Kibana PR#9876
weronikaolejniczak wants to merge 2 commits into
elastic:mainfrom
weronikaolejniczak:worktree-feat-automate-kibana-i18n-sync

Conversation

@weronikaolejniczak

@weronikaolejniczak weronikaolejniczak commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Summary

Closes https://github.com/elastic/eui-private/issues/750

Fixes the recurring nightly build failure caused by EUI i18n token changes not being propagated to Kibana's i18n_eui_mapping.tsx: elastic/kibana#279387

  • Adds scripts/sync_kibana_i18n.mjs - a Node.js script that diffs two i18ntokens.json files and patches Kibana's mapping file:
    • adds missing entries (plain or arrow-function depending on interpolation),
    • removes deleted entries,
    • and updates changed defaultMessage values,
  • adds two steps to the update_kibana_dependencies__prepare_changes.yml workflow:
    • "save current EUI i18n tokens" (before dep update): fetches i18ntokens.json from EUI GitHub at the version currently installed in Kibana; falls back to eui_last_release for snapshot versions;
    • "sync EUI i18n tokens" (after bootstrap): fetches the script from EUI at eui_ref, runs it and if the mapping changed - runs jest --updateSnapshot and commits the result as a separate chore: sync EUI i18n tokens commit.

Test plan

  • Trigger nightly workflow manually with workflow_dispatch against a ref where tokens changed
  • Verify chore: sync EUI i18n tokens commit appears in the Kibana PR when tokens differ
  • (optional) Verify no extra commit when tokens are unchanged
  • Verify the Kibana i18n lint check passes in CI after the sync commit

馃 Generated with Claude Code

@weronikaolejniczak weronikaolejniczak changed the title feat(ci): auto-sync EUI i18n tokens in nightly Kibana PR [Nightly] EUI i18n tokens in nightly Kibana PR Aug 7, 2026
@weronikaolejniczak weronikaolejniczak self-assigned this Aug 7, 2026
When the nightly build updates @elastic/eui in Kibana, the i18n mapping
file (i18n_eui_mapping.tsx) must be kept in sync with the new token list
or the Kibana linting CI fails.

- Add `scripts/sync_kibana_i18n.mjs`: a Node.js script that diffs old vs
  new `i18ntokens.json` and surgically patches `i18n_eui_mapping.tsx`
  (adds/removes/modifies entries, handles plain strings and interpolated
  arrow-function forms).
- Add two steps to `update_kibana_dependencies__prepare_changes.yml`:
  - "Save current EUI i18n tokens": fetches `i18ntokens.json` from the
    EUI GitHub repo at the version currently installed in Kibana, before
    the dependency update runs.
  - "Sync EUI i18n tokens": after bootstrap, fetches the sync script from
    EUI at `eui_ref`, runs it against old/new tokens, then runs
    `jest --updateSnapshot` and commits any changes as a separate
    `chore: sync EUI i18n tokens` commit.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@weronikaolejniczak
weronikaolejniczak force-pushed the worktree-feat-automate-kibana-i18n-sync branch from 6506116 to 0d6b7f6 Compare August 7, 2026 11:15
@infra-vault-gh-plugin-prod

Copy link
Copy Markdown

馃挌 Build Succeeded

cc @weronikaolejniczak

@infra-vault-gh-plugin-prod

Copy link
Copy Markdown

馃挌 Build Succeeded

cc @weronikaolejniczak

When the nightly build updates @elastic/eui in Kibana, the i18n mapping
file (i18n_eui_mapping.tsx) must be kept in sync with the new token list
or the Kibana linting CI fails.

- Add two steps to `update_kibana_dependencies__prepare_changes.yml`:
  - "Save current EUI i18n tokens": fetches `i18ntokens.json` from the
    EUI GitHub repo at the version currently installed in Kibana, before
    the dependency update runs.
  - "Sync EUI i18n tokens": after bootstrap, runs an inline Node.js
    script that diffs old vs new tokens, patches `i18n_eui_mapping.tsx`
    (adds/removes/modifies entries, handles plain strings and interpolated
    arrow-function forms), then runs `jest --updateSnapshot` and commits
    any changes as a separate `chore: sync EUI i18n tokens` commit.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant