Skip to content

proposal: a render's language governs its data, not only its template - #59

Open
delchev wants to merge 1 commit into
mainfrom
spec/render-language-governs-data
Open

proposal: a render's language governs its data, not only its template#59
delchev wants to merge 1 commit into
mainfrom
spec/render-language-governs-data

Conversation

@delchev

@delchev delchev commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

Adds proposals/0029-render-language-governs-its-data.md. No versions/ change, per the proposal-first process.

The gap

Two rules the specification already states never meet:

  • Multilingual data — "every read of a translatable property of a multilingual: true entity is served in the caller's requested language".
  • A render's languagelanguage: / languageFrom: on a notify block, the language a versioned copy is minted in, the language a reader picks in the print action — "names one of the document's print-template languages".

A render is not a read by a caller, and nothing joins the two clauses. So an implementation is free to answer "which language is the data in?" differently at every render — and does:

  • the interactive print runs as a caller, so values resolve in the language the reader happens to be browsing in, not the one they just chose in the print dialog;
  • a minted copy and a mailed attachment are produced by a workflow step, a schedule or an event handler. There is no caller to ask, so the translated read has no requested language and falls back to the stored values.

A Bulgarian sales invoice comes out with ФАКТУРА / ПАДЕЖ over Bank transfer, E-mail, ISSUED. Everything the author wrote by hand is in the right language and every value the model supplies is in the wrong one — and it is worst in the two renders nobody re-reads before they leave: the archived immutable copy an audit is answered from, and the copy the counterparty receives with no application around it.

What the proposal states

No new key — every one of these renders already names a language. The rule is that the language a render declares is the requested language for every read performed to produce that render, so the template and the data are one decision made once.

Unchanged and stated explicitly: the per-property fallback (a property untranslated in the render language reads its stored value, so a render language with no translations is not an error), and that what a render selects — a print template's row filter, an attached report's filter: / scope: — stays evaluated against the stored values, the rule reports already follow.

This is also what makes the existing normative sentence true, that an attachment "comes from the record's own data through the same path the interactive print takes, so a document mailed and a document printed are the same document". Today the two paths differ in exactly the language of their data.

Deliberately left open

Whether a notify block's language: also governs the translatable values interpolated into its own subject and body. That has a different answer: an attachment is a contractual document and belongs in the document's language, while the covering message belongs in the recipient's. Settling it by accident inside this proposal would be the wrong way to decide it.

Sections

Specification text carries two anchors — a normative paragraph after the existing block in Multilingual data > Data, and an author-facing paragraph in Printable documents after the add-a-language line. No DSL index row: the proposal adds no construct. All four cross-reference anchors resolve against versions/1.5.md.

Reference implementation

Eclipse Dirigible, both halves of the same defect on two code paths: #6945 (interactive print dialog, fixed in #6946) and #6947 (server-side snapshot and notify renders, fixed in #6948).

Two rules the format already states never meet. Multilingual data says every
read of a translatable property is served in the caller's requested language;
a render's `language:` / `languageFrom:` (and the language a reader picks in
the print action) selects the template. A render is not a read by a caller,
so nothing joins them - and an implementation is free to answer "which
language is the data in?" differently at every render.

In practice it does: the interactive print resolves values in whatever
language the reader is browsing in rather than the one they just chose, and a
copy minted by a workflow or a document attached by a scheduled message has
no caller at all, so the translated read falls back to the stored values. The
result is a Bulgarian invoice reading `ФАКТУРА` over `Bank transfer` and
`ISSUED` - worst in the two renders nobody re-reads before they leave, the
archived immutable copy and the copy the counterparty receives.

Adds no key. States that the language a render declares is the requested
language for every read performed to produce it, at all three call sites,
with the per-property fallback unchanged and what a render SELECTS still
evaluated against stored values - the rule reports already follow.

Deliberately left open: whether a notify block's language also governs the
translatable values in its own subject and body. An attachment is a
contractual document and belongs in the document's language; the covering
message belongs in the recipient's. Settling that by accident here would be
the wrong way to answer it.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
delchev added a commit to dirigible-io/dirigible-io.github.io that referenced this pull request Aug 27, 2026
…late (#6945, #6947) (#220)

The printing page said the opposite of what now happens, in the one sentence
someone debugging this would read: "it inherits the multilingual translation
overlay (the document prints in the caller's language)". The caller's language
is the UI locale, not the language chosen for the render - which is exactly
the defect #6945 reported, and the print flow now pins the feeder call's
Accept-Language to the chosen language instead.

- printing.md: correct the feeder sentence; a tip under the Print button that
  the chosen language selects the template AND the data; and, in "The issued
  copy and its language", why the server-side renders needed their own fix -
  a process step carries no Accept-Language, so a snapshot minted by a
  workflow (and a notify attachment, which runs in the same caller-less
  place) used to render a translated template over base-language values.
- glue.md: the notify render language is no longer "the print-template
  language", and says what it does not govern - the mail's subject and body,
  which are the covering message rather than the document.

Tracks specification proposal IntentFile/intent-specification#59 and the
neutral page IntentFile/intentfile.github.io#43.

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
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