Repository navigation
Description
Description
breeze ui check-translation-completeness computes the canonical translation status for the 20 non-English UI locales — per-file required/missing/unused keys, TODO-aware coverage, plural-suffix handling — but renders it only as rich tables for a human terminal. I propose adding a --json flag that prints the same report as machine-readable JSON, following the pattern breeze ci verify --json established in #73241: a boolean flag, console narration suppressed (or sent to stderr), nothing but the JSON document on stdout, so piping to jq is always safe.
Illustrative shape, from a real run on main (2026-10-27); exact fields open to discussion:
{
"languages": {
"ko": {
"files": {
"dag.json": {
"required": 253, "translated": 235, "missing": 18, "todos": 0, "unused": 13,
"coverage": 92.9,
"missing_keys": ["allMapIndexes", "callbacks.callback_one", "..."],
"unused_keys": ["execution.title", "loop.iteration", "..."]
},
"hitl.json": { "required": 37, "translated": 37, "missing": 0, "coverage": 100.0 }
},
"totals": { "required": 1296, "translated": 1258, "missing": 38, "todos": 0, "coverage": 97.1 }
}
},
"complete": false
}What this intentionally does not change:
- The default output — with no flag, rendering stays byte-identical to today.
- Exit-code semantics — per the original design in Check if plural forms are correct for languages. #55327, missing translations deliberately do not fail the command;
--jsonis pure output formatting, and CI gating is out of scope here. - The existing flags —
--language,--add-missing,--remove-unusedall keep working and compose with--json(e.g. report the post-modification state as JSON). - No new checks or policy — the flag only re-serializes data the command already computes.
The implementation is small: extract the aggregation that currently lives inside the table-rendering loop into a build_completeness_report() function, and feed either the existing rich renderer or json.dumps from the same dict (roughly 120–180 lines including tests). I plan to open the PR shortly after feedback on the field shape — working on it.
Acceptance criteria
-
--jsonprints a single JSON document on stdout and nothing else (narration suppressed or sent to stderr), so piping tojqis safe. - With no flag, output stays byte-identical to today; exit-code semantics unchanged.
- Composes with
--language,--add-missing,--remove-unused(reports the post-modification state). - Tests cover the report builder (missing/unused/TODO/plural cases) and JSON-mode stdout purity.
Use case/motivation
The repository already has three consumers of this report, and all of them consume it as hand-copied or screen-scraped terminal text:
-
The release process.
dev/README_RELEASE_AIRFLOW.mdhas release managers run this check before each RC and paste its console output into dev@ emails (the<OUTPUT_OF_I18N_COMPLETENESS_SCRIPT>placeholder appears in two templates), and the below-90%-for-two-consecutive-releases locale policy (Simplify i18n policy #65630) is applied by reading that pasted table. With--json, producing those emails and checking the policy becomes scriptable. -
The CI job.
basic-tests.ymlruns the check on every PR (jobcheck-translation-completness) asbreeze ui check-translation-completeness || true, so the per-PR report the job was added for in Check if plural forms are correct for languages. #55327 is only visible by opening the step log, and nothing consumes it. With JSON output, the job could render a compact per-language summary to$GITHUB_STEP_SUMMARY, making the report visible right on the job page — happy to wire that up in the same PR or as a follow-up, whichever is preferred. (Side observation: Fix breeze ui check-translation-completeness verification in ci #61885 showed the step can break silently for months precisely because its output has no consumer.) -
Agent and locale-team tooling. The in-repo translation skill (
.agents/skills/airflow-translations/SKILL.md) has agents run this command repeatedly and parse the tables from terminal output, and locale-team tooling outside the repo tends to re-implement key diffing against the raw locale files — diverging from the checker on plural forms, TODO stubs and unused keys. (The ESLintcheck-translations-completenessrule also only checks key presence, with none of the coverage/TODO/unused semantics.) This mirrors the accepted motivation forbreeze ci verify --jsonin Add breeze verify to list local checks for changed files #73241: structured output is cheaper and less fragile for agents and scripts than scraping tables.
Related issues
#55327 (origin and design intent of the CI job), #58637 (script → breeze command conversion), #61885 (silent CI step failure), #73241 (breeze ci verify --json precedent), #62982 (recent checker-accuracy improvements)
Are you willing to submit a PR?
- Yes I am willing to submit a PR!
Code of Conduct
- I agree to follow this project's Code of Conduct
Activity
SuryaNarayana-C-K commentedon Oct 27, 2026
Hi @aaiss0927! I'd like to contribute to this issue. I can help implement and test the
--jsonoutput, particularly ensuring stdout contains only valid JSON and that existing flags continue to work correctly. Are you open to contributions from others on this issue? I'd be happy to coordinate to avoid duplicating your work.aaiss0927 commentedon Oct 28, 2026
Hi @SuryaNarayana-C-K — thanks a lot for asking first and offering to coordinate, much appreciated!
As mentioned in the description, I had already started on this; my implementation is now up as #75831. It covers exactly the two points you called out — stdout carrying only valid JSON (including when the computation aborts mid-way) and composition with the existing flags — each pinned by tests.
Heads-up that there is also a parallel implementation in #75809. Per the project's parallel-work policy that's perfectly fine — the best implementation gets merged — so if you feel like digging in, reviewing either PR is a genuinely useful way to contribute here.
If you'd rather build something: the follow-up I sketched in the use-case section — rendering this JSON into
$GITHUB_STEP_SUMMARYin the CI completeness job — is still open, and I'd be glad to review it. (No assignments in this repo by convention: if you want it, just drop a "working on it" and go.)aruadecarvalho commentedon Oct 28, 2026
Hi @aaiss0927, I’d like to work on the CI-summary follow-up: rendering the JSON report as a compact per-language table in $GITHUB_STEP_SUMMARY. I’ll coordinate around whichever JSON-output PR lands. Is there a preferred layout, or should I propose one?
SuryaNarayana-C-K commentedon Oct 28, 2026
Thanks for the update @aaiss0927!
I'll dive into both #75831 and #75809 to review the implementations, run some tests locally, and leave feedback there. Looking forward to seeing this land!
aaiss0927 commentedon Oct 28, 2026
Hi @aruadecarvalho — great, it's yours!
No fixed layout on my side — please propose one. A few pointers that might save you time:
.github/workflows/basic-tests.yml(job idcheck-translation-completness); today the step isbreeze ui check-translation-completeness || true, i.e. log-only. Whatever the summary looks like, please keep the step non-gating — never failing the build on incomplete translations is intentional design (Check if plural forms are correct for languages. #55327).completeverdict — and keep the per-key lists out of the summary or behind<details>:$GITHUB_STEP_SUMMARYis capped at 1 MiB per step and the missing-key lists can get large.Happy to review when you open the PR!
SuryaNarayana-C-K commentedon Oct 28, 2026
Hi @aaiss0927! I'd like to work on the GitHub Actions step-summary follow-up you mentioned. Could you please let me take this up? I'll implement the feature to display the translation-completeness report directly in
$GITHUB_STEP_SUMMARYand submit a PR. Thank you!aaiss0927 commentedon Oct 28, 2026
@SuryaNarayana-C-K
I think our comments crossed: @aruadecarvalho picked this exact follow-up up a few comments above and I've already confirmed with them, so the
$GITHUB_STEP_SUMMARYone is taken. Sorry for the confusion!A few other ways to plug in, all genuinely useful:
<OUTPUT_OF_I18N_COMPLETENESS_SCRIPT>indev/README_RELEASE_AIRFLOW.md), and a small helper rendering the JSON into that snippet would be a nice self-contained follow-up. Best started after one of the--jsonPRs lands (so the schema is settled) — and per repo convention no permission needed: just drop a "working on it" where you start.Add --json output to breeze ui check-translation-completeness
Add --json output to breeze ui check-translation-completeness (apache…