Decide whether a document can carry prose in more than one language #7
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
A doc comment holds one piece of prose in one language, and the renderer emits
one page per source file. A repository that documents itself in two languages
has nowhere to put the second.
natsukium/dotfiles does exactly this today, in the workflow gloss would
replace:
configuration.organdconfiguration.ja.orgkept in step by po4aagainst
po/ja.po.Whether this belongs in gloss at all is the question. A doc comment is part of
the source file, so a second language means either two comments per node or an
external catalogue keyed by node — and the second reintroduces the drift
between prose and code that being code-first exists to remove. Worth a design
note before any implementation.
Decision: gloss stays monolingual per source file. A second doc comment per node or a catalogue keyed by node would reintroduce the drift that being code-first exists to remove.
What it will support instead, as a late step: a gettext catalogue at the render layer, keyed by the prose segment's own text (msgid). The renderer, given a
.po, substitutes translated prose per segment and emits a second page (*.ja.html). Because the key is the English text, a changed comment surfaces as fuzzy/untranslated in the usual gettext way instead of drifting silently. This is the same mechanism as the current po4a workflow, applied to prose segments rather than whole files. No implementation until the rest of the pipeline has settled; the requirement for now is only that prose segments remain addressable as text.