Skip to content

docs(languages): tag identity, shared cue defaults, alias map - #17

Merged
anthonyma94 merged 5 commits into
masterfrom
spec/languages
Dec 5, 2026
Merged

anthonyma94 merged 5 commits into
masterfrom
spec/languages

Conversation

@anthony-hermes

@anthony-hermes anthony-hermes Bot commented Dec 4, 2026 •

Copy link
Copy Markdown
Contributor

The contract for the language naming work, so #8's code has a lane to point at.

New lane 11 (docs/spec/11-languages.md). The profile filename is the identity: a canonical lowercase BCP 47 tag, case-folded on load, with a deprecated tag refused and its replacement named (jw to jv, zh-yue to yue). No ISO code is stored; it is the tag's language subtag. Three vocabularies are named and separated: the tag, the derived ISO code, and the Whisper token, which is the only code a profile may carry because faster-whisper accepts a fixed 100 and rejects tags. Container strings (kor, chi, zho) are [codes] aliases, inbound only, resolved through a registry built once at startup; a string claimed twice is ambiguous on purpose and pinned by a test. Eleven assertions, LG11.1 to LG11.11.

Cue numbers are settings, not a fixed policy. _defaults.toml and the target profile seed the four numbers. They enter the in-memory settings object at load, and the fit stage reads them there rather than from a module constant or directly from the profile. v1 has no screen for them, which is the only limitation: the value already lives where a screen would write it. max_lines stays refused because line count is a screen rule.

Lane 05: the cue policy is four numbers, not five, supplied by _defaults.toml and overridable per profile; the effective numbers enter the settings object and FT5.12 pins that source. Line counts are a screen rule and max_lines in a cue table is refused. FT5.2 now says "at most two dialogue lines and the target's characters per line".

Lane 06: the deliverables are <stem>.<tag>.srt and <stem>.<tag>.ass, lowercase, with the player-selection cost stated rather than implied. qa.json is the QA report the UI reads; segments.json, onscreen.json, glossary.tsv, translated.json and cues.json stay job state for resume and the cue table, never outputs. Output format is a settings value (both by default, srt, ass) with no v1 screen, on the same rule as cue numbers. OUT6.5 and OUT6.12 pin both.

Lane 01: the embedded-track match runs through the registry's alias map, never string equality, because containers write ISO 639-2.

Lane 08: language prompt overrides in settings, keyed by tag; prompt fragments are the only language setting a person edits by hand, since the screen renders none of them. Cue numbers and output format load from the same settings object without a control, and a cue key under [prompt] is refused because that table holds prompt fragments. UI8.18 and UI8.19.

AGENTS.md now carries the rule as well: a profile is named by its canonical lowercase tag, the tag is its identity, and the only stored codes are the ones that differ from it. The ownership table's languages row now covers the loader and registry, not just the TOML files.

Master's #12 and #15 are merged into the branch, so the pull request diff is docs only.

make check on forge at d0dbe74: ruff clean, mypy on 35 files clean, pytest 291 passed and 6 slow deselected, exit 0. CI is green on the same sha.

Adds lane 11 and the edits it forces. The profile file name is the
canonical lowercase BCP 47 tag; no ISO code is stored, the language
subtag is the ISO code; whisper tokens and container spellings live in
[codes]. Cue numbers move to _defaults.toml with the line counts staying
a screen rule, FT5.2 names two dialogue lines, OUTPUT keeps the tag
suffix, and the settings screen documents tag-keyed prompt overrides.
The tag is the identity and the only stored codes are the ones that
differ from it. The languages lane now covers the loader and registry,
not just the TOML files.
Cue numbers are settings seeded by the target profile, not a fixed policy:
the fit stage reads them from the in-memory settings object, and v1's only
limitation is that no screen renders them. The same goes for output format,
which defaults to both.

Raw working files stay job state for resume and the cue table. The
deliverables are the SRT and the ASS, plus the QA report the UI reads.
# Conflicts:
#	AGENTS.md
#	docs/spec/08-ui.md
@anthony-hermes

anthony-hermes Bot commented Dec 5, 2026

Copy link
Copy Markdown
Contributor Author

Both points from the thread are in d0dbe74, merged with master's #12 and #15, no second PR.

  • Cue numbers: the target profile seeds the four numbers into the in-memory settings object, and the fit stage reads them there. "Not user-configurable" and the schema-rejection line are gone. A cue key under [prompt] is still refused because that table holds prompt fragments only; the values belong at the language level. Master's new UI8.13 asserted the old rule, so the merge rewrote it.
  • Outputs: the SRT and ASS are the deliverables. The raw working files stay job state for resume and the cue table, never outputs. The format is a settings value, both by default, with srt and ass available and no v1 screen.
  • qa.json is kept as the QA report the UI reads, not a raw dump. If you want the report screen-only, that is one line to drop.

make check at d0dbe74: ruff clean, mypy 35 files, 291 passed, 6 slow deselected, exit 0. CI is green on d0dbe74. Merge state is BLOCKED on your CODEOWNERS review, which is expected.

@anthonyma94
anthonyma94 merged commit 298fa97 into master Dec 5, 2026
1 check passed
@anthonyma94
anthonyma94 deleted the spec/languages branch December 5, 2026 21:25
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