summaryrefslogtreecommitdiff
path: root/lib/render/view.mli
diff options
context:
space:
mode:
authorLukasz Kasprzak <lukas@labunix.xyz>2026-08-20 16:43:04 +0200
committerLukasz Kasprzak <lukas@labunix.xyz>2026-08-20 16:43:04 +0200
commit27606c42b7506ab7ffc7f1bd32d4d4a72c6400c8 (patch)
tree26c132598ef132a38e26b4922a93b9923defa562 /lib/render/view.mli
parent87b155b913cea7f5c55b5a2391aff7819ba541a6 (diff)
downloadcolitur-27606c42b7506ab7ffc7f1bd32d4d4a72c6400c8.tar.gz
colitur-27606c42b7506ab7ffc7f1bd32d4d4a72c6400c8.zip
feat(render): citations render through Sigla at both call sites
View.citation_ref and readings' part_ref are the only two places a citation reaches output; every emitter goes through View. --raw passes Sigla.verbatim rather than a style built over Lang.raw: an identity name table would still reformat punctuation and renumber. Loosen reject_sigla_for: --sigla-style/--sigla-book/--sigla-tradition now actually render on readings/table/render/emit/publish (each builds its own Sigla.t via the new load_sigla), and stay refused only on commands that render no citation (day, easter, temporal, ...). names_of degrades a Lang.bible miss to Book.default_spelling rather than printing the lookup key itself ("luke.abbr"); pinned in cli.t against a language file with no [bible] section at all, independent of la.ini/en.ini's own eventual [bible] section. Regenerate the 11 golden templates for 2027: every changed line is one canonical citation replacing a stored variant, verified against the full readings 2027 diff (raw vs default) cell by cell -- 86 distinct (raw, rendered) pairs account for the entire diff across all 11 files, with zero unexplained residue. Two families: the seven duplicate book spellings collapsing onto one canonical form (Isa./Isa, 3 Kgs./3 Kings, ...), and citations reconstructed from parsed structure dropping stray punctuation the parser already treats as noise (a trailing period or semicolon, a comma chapter/verse separator, an elided inherited chapter) -- each of the latter already named and tested in test_citation.ml's parse_suite before this task.
Diffstat (limited to 'lib/render/view.mli')
-rw-r--r--lib/render/view.mli14
1 files changed, 11 insertions, 3 deletions
diff --git a/lib/render/view.mli b/lib/render/view.mli
index 81bfc26..d271641 100644
--- a/lib/render/view.mli
+++ b/lib/render/view.mli
@@ -16,13 +16,14 @@
val of_days :
lang:Colitur_naming.Lang.t ->
+ sigla:Colitur_citation.Sigla.t ->
vocab:('s, 'r) Colitur_kernel.Vocab.t ->
rite:string ->
year:int ->
('s, 'r) Colitur_kernel.Liturgical_day.t list ->
Template.value
-(** [of_days ~lang ~vocab ~rite ~year days] where [days] is one civil year,
- 1 January to 31 December, in order. Pure and total.
+(** [of_days ~lang ~sigla ~vocab ~rite ~year days] where [days] is one civil
+ year, 1 January to 31 December, in order. Pure and total.
[lang] resolves every display string -- a day's [name], its localised
[weekday]/[rank_name]/[colour_name]/[season_name], each month's [name],
@@ -35,4 +36,11 @@ val of_days :
[slug] is untouched by [lang] -- it stays the stable machine key,
identical between any two calls that differ only in [lang]. Pass
{!Colitur_naming.Lang.raw} for the pre-naming behaviour, under which
- [name] equals [slug] exactly (this is what CLI [--raw] uses). *)
+ [name] equals [slug] exactly (this is what CLI [--raw] uses).
+
+ [sigla] resolves the [first]/[gospel] citation fields (Task 9): each
+ stored reference is passed through {!Colitur_citation.Sigla.format}
+ rather than emitted verbatim. Pass {!Colitur_citation.Sigla.verbatim}
+ alongside {!Colitur_naming.Lang.raw} for [--raw] -- a styled [Sigla.t]
+ built over [Lang.raw] would still parse and reformat every citation,
+ which defeats the byte-exact diffing [--raw] exists for. *)