Repository navigation
HUD previews: the long-title corpus covers Catalan - #1253
Merged
Merged
Conversation
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]>
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.
Cause
Catalan shipped in #1230 (
locales/ca/,locales/languages.json) without an entry inLONG_TITLESintools/hud_preview.py.plan()compares the simulator's language list with the keys of that table and raisesupdate the authored long-title corpus for the shipped language list, so the HUD preview matrix cannot be planned onmain. 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()intests/test_hud_preview.pybuilt its fake language list fromLONG_TITLESitself, soplan()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 fromlocales/languages.json(the file that generatesi18n::SHIPPED), and a new test,test_every_shipped_language_has_its_authored_long_title, asserts the corpus keys equal that list and thatplan()yields along-title-<lang>scene for each. The next language PR fails this CI step at once.tools/ortests/is keyed by the UI languages (SUB_SEARCH_LANGSintests/mock_pms.pyis the subtitle-search set, andpkg/fonts/subs/manifest.jsonalready listsca).Tests
python3 tests/test_hud_preview.py(theci/check-python-steps.txtstep), tests first, before the corpus entry:After the entry:
tests/test_hud_capture.py,test_hud_bundle.pyandtest_hud_release.pyalso pass.🤖 Generated with Claude Code