Skip to content

HUD previews: the long-title corpus covers Catalan - #1253

Merged
GLinnik21 merged 1 commit into
mainfrom
hud-preview-catalan-long-title
Nov 6, 2026
Merged

GLinnik21 merged 1 commit into
mainfrom
hud-preview-catalan-long-title

Conversation

@GLinnik21

Copy link
Copy Markdown
Collaborator

Cause

Catalan shipped in #1230 (locales/ca/, locales/languages.json) without an entry in LONG_TITLES in tools/hud_preview.py. plan() compares the simulator's language list with the keys of that table and raises update the authored long-title corpus for the shipped language list, so the HUD preview matrix cannot be planned on main. The HUD registry renders previews with a pinned older simulator, so it breaks the day that pin moves past #1230.

The tests could not see it: inspection() in tests/test_hud_preview.py built its fake language list from LONG_TITLES itself, so plan() always agreed with the table.

Fix

  • tools/hud_preview.py: add the Catalan entry, "El capítol extraordinàriament llarg en què l’últim drac torna a través de les muntanyes gelades" (95 characters, against 96 French and 100 Italian, so it elides in a chapter card like the others; typographic apostrophe as in the Italian entry).
  • tests/test_hud_preview.py: inspection() now takes its languages from locales/languages.json (the file that generates i18n::SHIPPED), and a new test, test_every_shipped_language_has_its_authored_long_title, asserts the corpus keys equal that list and that plan() yields a long-title-<lang> scene for each. The next language PR fails this CI step at once.
  • No other per-language table in tools/ or tests/ is keyed by the UI languages (SUB_SEARCH_LANGS in tests/mock_pms.py is the subtitle-search set, and pkg/fonts/subs/manifest.json already lists ca).

Tests

python3 tests/test_hud_preview.py (the ci/check-python-steps.txt step), tests first, before the corpus entry:

AssertionError: Items in the second set but not the first:
'ca'
FAILED (failures=1, errors=2)

After the entry:

Ran 9 tests in 0.007s
OK

tests/test_hud_capture.py, test_hud_bundle.py and test_hud_release.py also pass.

🤖 Generated with Claude Code

Catalan shipped in #1230 without an entry in hud_preview.LONG_TITLES, so plan()
raised "update the authored long-title corpus for the shipped language list" and
the preview matrix could not be planned. Add the Catalan sentence.

The tests built their fake inspection from LONG_TITLES itself, so they could
never see a shipped language missing from it. They now take the language list
from locales/languages.json (which generates i18n::SHIPPED), and a new test
asserts the corpus keys equal that list, so the next language PR fails at once.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@GLinnik21
GLinnik21 merged commit c01b513 into main Nov 6, 2026
18 checks passed
@GLinnik21
GLinnik21 deleted the hud-preview-catalan-long-title branch November 6, 2026 01:20
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