From 1935f40c156563c134f87093bf6ec8da1cf4fc46 Mon Sep 17 00:00:00 2001 From: Lukasz Kasprzak Date: Thu, 20 Aug 2026 10:39:47 +0200 Subject: fix(naming): the rite prints its display name, not the internal id ef 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. --- lib/naming/lang.ml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'lib/naming/lang.ml') diff --git a/lib/naming/lang.ml b/lib/naming/lang.ml index 147a49b..92c8a9a 100644 --- a/lib/naming/lang.ml +++ b/lib/naming/lang.ml @@ -14,6 +14,7 @@ type t = { rank : table; colour : table; term : table; + rite : table; chain : t option; (** consulted when this table misses *) } @@ -32,6 +33,7 @@ let season t k = get t (fun x -> x.season) k let rank t k = get t (fun x -> x.rank) k let colour t k = get t (fun x -> x.colour) k let term t k = get t (fun x -> x.term) k +let rite t k = get t (fun x -> x.rite) k let weekday_key = [| "sunday"; "monday"; "tuesday"; "wednesday"; "thursday"; "friday"; "saturday" |] @@ -58,7 +60,7 @@ let fallback_code t = t.fallback_code let raw = { code = "raw"; fallback_code = None; celebration = empty_table; weekday = empty_table; month = empty_table; season = empty_table; rank = empty_table; colour = empty_table; - term = empty_table; chain = None } + term = empty_table; rite = empty_table; chain = None } let with_fallback t base = { t with chain = Some base } @@ -98,6 +100,7 @@ let of_string text = rank = find "rank"; colour = find "colour"; term = find "term"; + rite = find "rite"; chain = None }) let keys t = @@ -105,5 +108,5 @@ let keys t = List.concat [ qualify "celebration" t.celebration; qualify "weekday" t.weekday; qualify "month" t.month; qualify "season" t.season; qualify "rank" t.rank; - qualify "colour" t.colour; qualify "term" t.term ] + qualify "colour" t.colour; qualify "term" t.term; qualify "rite" t.rite ] |> List.sort compare -- cgit v1.3