Document the tag-before-pushing workflow in CLAUDE.md - #190
Closed
matenadasdi wants to merge 1 commit into
Closed
Conversation
This PR adds the whole translation pipeline without touching CLAUDE.md, so
nothing tells an author — human or agent — that a new page has to be tagged
before it ships. Untagged terms aren't flagged anywhere; they just get
machine-translated.
Records the intended loop: run scripts/add_notranslate_tags.py before pushing
a new or edited page and commit the tags with the content, with the weekly
refresh-ui-library.yml run as the sweep for whatever local runs miss.
Two behaviors worth writing down, both verified against the script:
- It fetches the live steplib spec.json for canonical Step titles (most of
its ~4s runtime) and degrades soft on failure, so an offline run tags
strictly less than an online one with only a stderr warning. The weekly
sweep is what repairs that, not just forgetfulness.
- It is idempotent and inserts its own NT import — verified: a second run
over a tagged page wraps 0 and leaves the tag count unchanged.
Also states the load-bearing fact that is easy to get backwards: the glossary
is the tagger's term source only. It is never read at translation time and its
term lists are never injected into the prompt, so a term with no <NT> around
it has no protection at all.
Placed next to the other procedural sections rather than in Authoring
mechanics, to stay clear of the .md/.mdx rewrite in #188.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
matenadasdi
requested review from
aorcsik,
ilanazholobovsky and
zoltan-baba
as code owners
August 18, 2026 15:08
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Suggestion for #140 — take it or leave it, it's a docs-only change.
#140 adds the whole translation pipeline but doesn't touch
CLAUDE.md, so nothing tells an author — human or agent — that a page needs tagging before it ships. There's no CI check for it either, and an untagged term isn't flagged anywhere: it just gets machine-translated into Japanese.This records the intended loop:
python3 scripts/add_notranslate_tags.pybefore pushing a new or edited page, and commit the tags with the content.refresh-ui-library.yml's weekly run is the sweep for whatever local runs miss.Two behaviors worth writing down
Both verified against the script rather than assumed:
spec.json, which is most of its ~4s runtime. On failure it still exits 0 but falls back to glossary-only Step coverage, with only a warning on stderr — so an offline run tags strictly less than an online one. That reframes the weekly sweep: it isn't only for people who forget, it's what repairs offline and stale-glossary runs. Worth an author knowing.import NT from '@site/src/components/NT';on its own; run 2 wrapped 0 and left the tag count unchanged. So "just run it again" is always safe advice.The fact that's easiest to get backwards
The section states plainly that the glossary is the tagger's term source only — never read at translation time, term lists never injected into the prompt.
translate_docs.pyopens it solely forprotect_patterns.That distinction is genuinely easy to miss: the glossary's own header (point 2) still claims its terms "are injected into the translation prompt as a hard rule", which describes the design this PR replaced. Reading that file top-down gives you the wrong model of how protection works. Worth correcting that comment in this PR too — separate from this change, but same root cause.
Placement
Added next to the other procedural sections (
Syncing MCP docs,Generating API reference docs) rather than under Authoring mechanics, to stay clear of the.md/.mdxrewrite in #188 and avoid a merge conflict between the two.Based on
ja-localization-fulland targeted at it, so it merges into #140 rather than racing it.🤖 Generated with Claude Code