Translations, drafts & revisions
Three related concepts describe how one ScriptPub document relates to
another. Translations and drafts are separate documents;
revisions are tracked changes within a document. All three are bound in
meta or config, not in filenames.
Translations
A translation is another work — one complete, standalone ScriptPub file
with its own title, format, filename, and URL. A relationship may be recorded
only as metadata: the translation carries meta.translationOf (a reference
to the original) and its own meta.language. That relationship never nests
the work or chooses its address. Interleaving languages in one file is
deliberately not supported.
- Config is document-owned. No format, stylesheet, or content is inherited from the referenced work. Shared choices must be present in each document.
- Alignment is optional and block-level, via
origin. A translated block may carry anoriginattr — a block ref (^id) into the original. This reuses the on-demand id rule: anchoring to a source block is a targeting, so that block’s id gets persisted in the original by the ordinary mechanism.originRevbeside it lets an editor track staleness when the source block changes. - Fallback alignment is structural — same division, same ordinal position — for unanchored translations. They lose block-precise pairing, nothing else.
- Everything downstream derives. Parallel two-column reading pairs
blocks by
origin; cross-language cue-name mapping falls out oforiginon cue blocks (each document’s character index is in its own language, the anchors tie them together);lang/dirblock attrs cover inline foreign snippets within a document.
Drafts
A draft is a separate document too: a complete standalone file bound by
meta. draftOf references the main document, and draft labels the pass
(“Second draft”, “Producer polish”). Its config remains document-owned.
Diff and merge between drafts operate on the canonical model at the block level. That is tooling, not part of the format — the format’s job is only to bind the sibling and carry the label.
Revisions
Production-style tracked changes — Final Draft’s native turf (revision passes, colored pages, revised-asterisk margins). Unlike translations and drafts, revisions live within one document.
-
config.revisionsdeclares the named passes:Field Type Required Description idstring✓ Unique revision id. labelstringDisplay label (“Pink”). colorstringPage / mark color. datestringDate of the pass. -
The
revattr on a block or mark references a pass — “touched in this pass.” Combined with theins/delmarks it gives full tracked changes:ins+rev= added in that pass;del+rev= removed but retained. -
Tiered support. The file stores
revnatively (data-rev); FDX keeps it natively too. Content-derived syntaxes (plain text, Fountain, most of Markdown) have nowhere to putrevwithout polluting the text, so they don’t carry it.
Margin asterisks and colored-page output are a print concern (parked in
this revision); the data they need is exactly rev.