<feed xmlns='http://www.w3.org/2005/Atom'>
<title>colitur.git/lib/naming/lang.ml, branch v0.9.0</title>
<subtitle>deterministic OCaml engine to compute and validate liturgical calendars for multiple rites, template-driven output to year 9999</subtitle>
<id>https://git.labunix.xyz/colitur.git/atom?h=v0.9.0</id>
<link rel='self' href='https://git.labunix.xyz/colitur.git/atom?h=v0.9.0'/>
<link rel='alternate' type='text/html' href='https://git.labunix.xyz/colitur.git/'/>
<updated>2026-08-20T13:49:00Z</updated>
<entry>
<title>feat(lang): read [bible] and [sigla] sections</title>
<updated>2026-08-20T13:49:00Z</updated>
<author>
<name>Lukasz Kasprzak</name>
<email>lukas@labunix.xyz</email>
</author>
<published>2026-08-20T13:49:00Z</published>
<link rel='alternate' type='text/html' href='https://git.labunix.xyz/colitur.git/commit/?id=c02e77b73aad34fb5a672a5234a66d64f23b45ce'/>
<id>urn:sha1:c02e77b73aad34fb5a672a5234a66d64f23b45ce</id>
<content type='text'>
Lang reads a hardcoded list of section names and ignores anything else
silently, so without this a [bible] section would appear to work and do
nothing -- confirmed directly with a scratch executable: before this
change, of_string on text containing a [bible] section parsed without
error and Lang.keys came back empty, no trace of the section anywhere.

Lang.bible keeps the total-lookup contract every other lookup in this
module has: a miss returns the key itself, never the empty string.
Lang.sigla_fields returns the [sigla] section's raw fields, values
trimmed but still quoted, for Render.style_of_fields to unquote.

[bible] joins the keys reference set so lang --check reports missing
book names; [sigla] deliberately does not, being settings with working
defaults rather than translatable names -- adding it would make --check
demand five settings from every language file.
</content>
</entry>
<entry>
<title>feat(render): Roman week numbers and date spans, as data</title>
<updated>2026-08-20T09:32:24Z</updated>
<author>
<name>Lukasz Kasprzak</name>
<email>lukas@labunix.xyz</email>
</author>
<published>2026-08-20T09:32:24Z</published>
<link rel='alternate' type='text/html' href='https://git.labunix.xyz/colitur.git/commit/?id=e2e56ac5af290b60ea01037e58e8bc00545c021c'/>
<id>urn:sha1:e2e56ac5af290b60ea01037e58e8bc00545c021c</id>
<content type='text'>
The ordo booklet's week header repeated the month name on every week
even though the heading above already established it -- pure noise.
Replace it with a Roman week number plus the span of dates the week
covers, e.g. "Hebdomada I (Ian 1-2)", following the project's own rule
that a presentation choice is data, not code.

lang/{la,en}.ini gain a [month_abbr] section (three-letter month
abbreviations); Lang.month_abbr follows Lang.month's exact shape,
including the out-of-range and miss-returns-the-key contracts. The
coverage test now fails loudly if an abbreviation goes missing, the
same as [month] already does.

Every week object in the view gains num_roman (Roman numeral, num
stays as the arabic original -- Roman is a presentation choice, not an
engine change), first_dom/last_dom (the day-of-month of the week's
first and last IN-MONTH days, padding excluded), month_abbr (resolved
through Lang.month_abbr), and single_day (true when the week holds
exactly one in-month day). single_day is a flag, not a preformatted
span string: the engine is logic-less and cannot itself decide between
"Ian 1" and "Ian 1-2", so a template makes that call from the flag
instead -- the same "shape the data, not the template" discipline
in_month and last already follow.

Weeks are built per month with padding only at the two ends, so a
week's in-month days never cross a month boundary -- verified, not
assumed: every week always has at least one real day since no month is
shorter than a single week.

Covered by three new View tests, including a real single-day-week
witness (January 2027's own trailing week is a lone Sunday, the 31st).
</content>
</entry>
<entry>
<title>fix(naming): the rite prints its display name, not the internal id ef</title>
<updated>2026-08-20T08:39:47Z</updated>
<author>
<name>Lukasz Kasprzak</name>
<email>lukas@labunix.xyz</email>
</author>
<published>2026-08-20T08:39:47Z</published>
<link rel='alternate' type='text/html' href='https://git.labunix.xyz/colitur.git/commit/?id=1935f40c156563c134f87093bf6ec8da1cf4fc46'/>
<id>urn:sha1:1935f40c156563c134f87093bf6ec8da1cf4fc46</id>
<content type='text'>
The booklet's title page and running header read "Ordo 2027 . ef" --
an internal identifier reaching a reader, the same defect class the
sanctoral/temporal slugs were already fixed for.

lang/la.ini and lang/en.ini each gain a [rite] section mapping the
rite id to a reader-facing name, sourced from the Missal's own title
page (docs/research/LT.txt:6 "MISSALE ROMANUM", :15 "EDITIO TYPICA")
plus the 1962 dating this project uses throughout (rules-register.md,
CLAUDE.md) -- both cited in the ini comments, marked PATTERN since the
phrase combines two title-page elements rather than quoting one
verbatim heading.

Lang.t gains a rite table/lookup (same total, miss-echoes-the-key
contract as every other lookup here); View.of_days exposes rite_name
alongside the existing rite field, which stays the stable key exactly
as slug is kept beside name. Every shipped template that printed
{{rite}} now prints {{rite_name}} instead.

test_lang_coverage.ml gains a coverage assertion over every rite id
the engine can emit -- one today -- so a second rite module (OF)
landing without a matching [rite] entry fails loudly instead of
printing its own bare id.

Goldens regenerated through the Test_view.view_of path
test_render_golden.ml itself uses (English with a Latin fallback),
not the CLI (whose --lang default is plain Latin and would have
pinned output the tests never produce). test/cli.t's own JSON prefix
assertion updated to match: rite_name is a real new key in that
generic view dump, sitting right after rite.
</content>
</entry>
<entry>
<title>fix(naming): merge duplicate [section] blocks in the language table</title>
<updated>2026-08-19T11:43:28Z</updated>
<author>
<name>Lukasz Kasprzak</name>
<email>lukas@labunix.xyz</email>
</author>
<published>2026-08-19T11:43:28Z</published>
<link rel='alternate' type='text/html' href='https://git.labunix.xyz/colitur.git/commit/?id=6bdd5afc5e185b639f9cf5e7c3d662ddc3ecf0e1'/>
<id>urn:sha1:6bdd5afc5e185b639f9cf5e7c3d662ddc3ecf0e1</id>
<content type='text'>
F1 (review round 1): of_string's find took only the FIRST section of a
given name (List.find_opt), so a second [celebration] block anywhere in
the file was silently dropped in its entirety -- reproduced with two
blocks (a in the first, b in the second): b resolved to the slug
fallback "b", not its real value.

This is a data-loss footgun aimed squarely at what happens next: Tasks
3/4 write a 595-entry, hand-edited la.ini, and appending a second
[celebration] block is the natural way to paste in a new batch of names.
Worse, the failure surfaces nowhere near its cause -- a coverage check
reports the dropped slugs as missing a Latin name, with nothing pointing
at the parser.

find now folds over every section sharing the name, in file order, so
all blocks merge. This also settles which value wins when the same key
appears in two different blocks: later in the file wins, consistent with
the existing within-one-block behaviour (unchanged, still last SM.add
wins) and with what a reader expects when appending to an INI file.

lang.mli now documents both duplicate policies explicitly, and notes
they run OPPOSITE to Overlay_ini.get's first-match (List.assoc_opt) over
the same section.fields shape -- undocumented before, and a latent trap
since the two modules read the same section type but resolve a
duplicate key in opposite directions.

Three tests added: two [celebration] blocks both resolve (the F1
regression), a key repeated across two blocks resolves to the later
block, and a key repeated within one block still resolves to the later
line (confirms unchanged behaviour). Confirmed the regression test fails
against the pre-fix code (b resolves to "b", the slug fallback) and
passes after.
</content>
</entry>
<entry>
<title>feat(naming): the language table</title>
<updated>2026-08-19T11:34:53Z</updated>
<author>
<name>Lukasz Kasprzak</name>
<email>lukas@labunix.xyz</email>
</author>
<published>2026-08-19T11:34:53Z</published>
<link rel='alternate' type='text/html' href='https://git.labunix.xyz/colitur.git/commit/?id=45bcbde502e07ad73b96039fcbb62471a3c94781'/>
<id>urn:sha1:45bcbde502e07ad73b96039fcbb62471a3c94781</id>
<content type='text'>
Maps strings to strings and nothing else -- no calendars, no dates, no
filesystem. That is what lets every command use it without the kernel
learning about presentation.

Every lookup is total, and a miss returns THE KEY rather than the empty
string. A partial translation is therefore usable from its first line,
and the fully-degraded case is exactly today's output (bare slugs) rather
than a blank page.

--raw is a real identity table, not a special case threaded through every
call site: one value the whole program passes around.

Reuses Overlay_ini's INI reader rather than growing a second one that
would drift in its comment, quoting and trimming rules; parse_sections is
exposed in the .mli for that, with no behaviour change.

Fixes one defect found while running the brief's own tests rather than
transcribing them blind: weekday's internal lookup key is an English
day-name word (month's is already the numeral string), so on a miss it
echoed that word instead of the documented numeral, breaking both the
0=Sunday convention and Lang.raw's own identity contract for weekday.
weekday/month now fall back to string_of_int n directly on a miss
instead of through get's generic echo-the-search-key path; month is
byte-identical since its key already equals string_of_int n.
</content>
</entry>
</feed>
