Skip to content

Translations keep no English link text, alt text or table cell, and a page that still differs no longer stops the run - #636

Merged
zlareb1 merged 5 commits into
mainfrom
i18n/stricter-labels
Nov 13, 2026
Merged

zlareb1 merged 5 commits into
mainfrom
i18n/stricter-labels

Conversation

@zlareb1

@zlareb1 zlareb1 commented Nov 13, 2026 •

Copy link
Copy Markdown
Member

Changelog category (leave one):

  • Documentation (changelog entry is not required)

Changelog entry (one or two sentences a user of Loom can read without the diff; the release pull request collects these into the release notes):

...

Why

Regenerated translations kept English text the checker did not look at: link texts that point at English-only pages (the Japanese README's navigation, the Spanish models-and-keys links), image alt texts (the Korean badges) and table cells (the Russian benchmark table). Measured on the committed pages, 34 of 72 kept such labels. The README translations are also stale since the README's documentation links moved to the site, so the translations workflow on main fails.

scripts/i18n/translate.py:

  • labels() now checks every Markdown link text (links to English-only pages included), HTML link texts (other markup inside them read as text, <code> left out), Markdown and HTML image alt texts, and table cells with at least two words to translate, besides headings; code spans are removed first, so a link or alt attribute shown as code is not a label. Names stay as they are (KEPT_WORDS gains hyperdx). The prompt says to translate every link text and alt text, including links to English pages. Two fixed terms join the Japanese (the NOTICE file) and Korean (recording a conversation) glossaries.
  • A section can borrow an English label from another part of the page (the Chinese quickstart did), which a per-section check cannot see; translate_page now holds the assembled page to the same rule as check before writing it.
  • A page whose translation still differs after its retry (TranslationDiffers) is not written and is named, by its path, when the run ends; the other pages go on. Only the cap, an API error or a bug stops every worker, and its message also names the pages skipped by then. Before, one such page stopped the whole run, and with the stricter check almost every full run stopped.

Every page under i18n/ is regenerated with the new prompt and check; python -m scripts.i18n.translate check passes on all 72.

Scope and risk

What the check does not cover: running prose. A fixed glossary term is a prompt instruction there, not a check; the Spanish README, for example, still writes "dashboard" in some paragraphs where the glossary says "panel".

The generator, its tests and the generated pages. The English pages are unchanged. Cost of this regeneration: $10.36 over eleven runs, each under LOOM_I18N_MAX_USD (5).

Compatibility, rollout and rollback

  • Wire: none.
  • Operator steps: none.
  • Rollback: revert; the translations go back to the previous run's, stale against the README.

Tests

  • tests/unit/test_i18n.py (66): new tests for alt texts, HTML link texts and table cells; links and alt texts shown as code, and <code> inside an HTML link, are not labels; a link to an English-only page must be translated; a label borrowed from another section keeps the page unwritten; a page that still differs lets the others finish and is named by path; a fatal error after it still names it.
  • test_i18n.py, test_doc_links.py, test_public_copy.py, test_agent_instructions.py, test_install_script.py: 704 passed. make format-check, make lint: pass.

AI assistance in the code (leave one; writing this description with AI is fine):

  • AI-generated (an agent wrote most of the diff): Claude Code. I measured the stricter check on the committed pages before regenerating and read the flagged labels to set the name list.

  • I can explain every line of this diff and how it interacts with the rest of Loom.

Checklist

  • make format-check and make lint pass, and the unit tests named above; make typecheck and the full make test-unit run in CI (the generator is not under mypy).
  • Generated files are regenerated in this PR, not by hand.
  • Docs under docs/ describe the system as it now is, and this description names any operator steps and wire changes.

🤖 Generated with Claude Code

zlareb1 and others added 5 commits November 13, 2026 14:30
…e that still differs is reported without stopping the run, and every page is regenerated

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
… link markup is read; four READMEs regenerated with same-page link and term rules

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
…label; skip messages name the page once; fatal errors list every skipped page

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
…says it is about a fatal error

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
@zlareb1
zlareb1 merged commit 3e24d65 into main Nov 13, 2026
76 of 77 checks passed
@zlareb1
zlareb1 deleted the i18n/stricter-labels branch November 13, 2026 16:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant