Skip to content

[i18n] Report translation coverage during integrate#264124

Merged
jesuswr merged 6 commits into
elastic:mainfrom
jesuswr:i18n-track-coverage
May 5, 2026
Merged

[i18n] Report translation coverage during integrate#264124
jesuswr merged 6 commits into
elastic:mainfrom
jesuswr:i18n-track-coverage

Conversation

@jesuswr
Copy link
Copy Markdown
Member

@jesuswr jesuswr commented Apr 17, 2026

Summary

Adds a new Listr step to scripts/i18n_integrate that diffs the extracted English messages against the --source translation file and reports coverage:

  • Always logs a one-line summary: total / translated / missing / %.
  • Optional --coverage-report <path> flag writes a per-namespace JSON report, including the sorted list of missing ids.
  • Never fails the script — informational only.

Closes #174920

Test plan

  • node scripts/i18n_integrate.js --source x-pack/platform/plugins/private/translations/translations/fr-FR.json --target /tmp/out.json --coverage-report /tmp/coverage.json --dry-run prints a coverage summary and writes the JSON report.
  • Running without --coverage-report still prints the summary and does not write a report.
  • --coverage-report with no value or passed twice fails fast with a clear error.
  • Validating translation files step still runs clean after the new step.

🤖 Generated with Claude Code

Adds a new Listr step to `scripts/i18n_integrate` that diffs the
extracted English messages against the `--source` translation file,
logs overall coverage (total / translated / missing / %), and
optionally writes a per-namespace JSON report via
`--coverage-report <path>`.

Closes elastic#174920

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@jesuswr jesuswr requested a review from a team as a code owner April 17, 2026 15:18
@jesuswr jesuswr self-assigned this Apr 17, 2026
@jesuswr jesuswr added Team:Core Platform Core services: plugins, logging, config, saved objects, http, ES client, i18n, etc t// Project:i18n release_note:skip Skip the PR/issue when compiling release notes backport:skip This PR does not require backporting labels Apr 17, 2026
@elasticmachine
Copy link
Copy Markdown
Contributor

Pinging @elastic/kibana-core (Team:Core)

@jesuswr jesuswr requested a review from Bamieh April 17, 2026 15:21
@delanni delanni added the reviewer:macroscope PR review with Macroscope label Apr 27, 2026
@delanni
Copy link
Copy Markdown
Member

delanni commented Apr 27, 2026

@jesuswr - do you think we could hand over the ownership for these files? We seem to be the owners, but features/fixes and effective ownership is really with core, so I think it makes sense that CODEOWNERS reflects this.

@jesuswr
Copy link
Copy Markdown
Member Author

jesuswr commented Apr 27, 2026

It makes sense to me but I'll let @Bamieh confirm just in case!

@Bamieh
Copy link
Copy Markdown
Contributor

Bamieh commented Apr 28, 2026

do you think we could hand over the ownership for these files?

yes makes sense for us to be the owners for those for sure. it was at some point i think with folder/files movement this was an unexpected sideeffect

Comment thread src/dev/i18n_tools/tasks/report_translation_coverage/task.ts Outdated
Comment thread src/dev/i18n_tools/tasks/report_translation_coverage/task.ts Outdated
Comment thread src/dev/i18n_tools/bin/run_i18n_integrate.ts Outdated
Comment thread src/dev/i18n_tools/tasks/report_translation_coverage/task.ts Outdated
Comment thread src/dev/i18n_tools/tasks/report_translation_coverage/task.ts Outdated
Comment thread src/dev/i18n_tools/tasks/report_translation_coverage/task.ts Outdated
Comment thread .github/CODEOWNERS
/.coderabbit.yml @elastic/kibana-operations

# Kibana Localization
/src/dev/i18n_tools/ @elastic/kibana-localization @elastic/kibana-core
Copy link
Copy Markdown
Member Author

@jesuswr jesuswr Apr 29, 2026

Choose a reason for hiding this comment

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

We were already marked as owners but the /src/dev/ @.../kibana-operations line above was overwriting it. Fixing it here.

Could you approve? @delanni

@jesuswr
Copy link
Copy Markdown
Member Author

jesuswr commented Apr 29, 2026

Thanks for the suggestions @Bamieh ! Could you review again? 😆 Last commit applied those suggestions and fixed the codeowners

@jesuswr jesuswr requested a review from Bamieh May 4, 2026 09:37
Copy link
Copy Markdown
Contributor

@Bamieh Bamieh left a comment

Choose a reason for hiding this comment

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

LGTM ty

@jesuswr jesuswr enabled auto-merge (squash) May 5, 2026 05:41
@kibanamachine
Copy link
Copy Markdown
Contributor

💚 Build Succeeded

Metrics [docs]

✅ unchanged

History

cc @jesuswr

@jesuswr jesuswr merged commit aead175 into elastic:main May 5, 2026
25 checks passed
mbondyra added a commit to mbondyra/kibana that referenced this pull request May 5, 2026
…ilder_new_vis_attachment

* commit '6fd683609eb6dee81f242f8ff6951edbe3bfd66c': (226 commits)
  Remove Model Author group-by option from external inference endpoints (elastic#264761)
  [Streams][Streamlang] Align ES|QL condition transpiler with Painless on null propagation (elastic#264751)
  chore(axios,workflows-eng): remove axios from workflows connector utils (elastic#267512)
  [failed-test-reporter] avoid opening issues for scout env failures (elastic#267649)
  [kbn-api-contracts] Detect request-body additionalProperties:false tightening (elastic#267546)
  [main] Sync bundled packages with Package Storage (elastic#267644)
  Centralize phase colors and descriptions (elastic#266680)
  [Unified Waterfall] Add "Scroll to origin" button  (elastic#266594)
  [APM] Add alert and SLO badges to the service map embeddable (elastic#266360)
  [CI] Speed up telemetry_check by pre-filtering to collector files (elastic#265978)
  [Discover] Address flaky large CSV test (elastic#266642)
  avoid passing unrelated props within integration card icon component conditional render (elastic#266569)
  [Cases][Templates] Extend cases search by template field label (elastic#266414)
  [Background search] Migrate custom SplitButton to EuiSplitButton (elastic#267447)
  [i18n] Report translation coverage during integrate (elastic#264124)
  [api-docs] 2026-05-05 Daily api_docs build (elastic#267639)
  [Scout] Update test config manifests (elastic#267636)
  [content list] Add saved object provider services (elastic#266428)
  [Fleet] Otel UI add health and implement it in OTelComponentDetail (elastic#267292)
  Update dependency msw to v2.13.4 (main) (elastic#266770)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:skip This PR does not require backporting Project:i18n release_note:skip Skip the PR/issue when compiling release notes reviewer:macroscope PR review with Macroscope Team:Core Platform Core services: plugins, logging, config, saved objects, http, ES client, i18n, etc t// v9.5.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[I18n] Track coverage of translated i18n strings from original english internationalized english

5 participants