diff options
| author | Lukasz Kasprzak <lukas@labunix.xyz> | 2026-08-20 17:14:42 +0200 |
|---|---|---|
| committer | Lukasz Kasprzak <lukas@labunix.xyz> | 2026-08-20 17:14:42 +0200 |
| commit | d68feb04f71c3dea3b59726e2ffca225d99eaa35 (patch) | |
| tree | 8be66516af6a6dd40aa8ca85add74de6f5ef4a04 /test/cli.t | |
| parent | 27606c42b7506ab7ffc7f1bd32d4d4a72c6400c8 (diff) | |
| download | colitur-d68feb04f71c3dea3b59726e2ffca225d99eaa35.tar.gz colitur-d68feb04f71c3dea3b59726e2ffca225d99eaa35.zip | |
feat(lang): Latin and English book names, and the shipped sigla styles
la.ini and en.ini both gain [sigla] (the current Vulgate/Latin punctuation
convention, byte-identical to Render.default_style) and [bible] (a .full
and .abbr row for every id in Book.all -- 45 cited ids plus the 7 tradition
targets, 52 total). Shipping [sigla] changes no output, asserted by the
full test run. Shipping [bible] does change rendered book names, which is
the point.
la.ini's titles are sourced from docs/research/scan1.txt/scan2.txt (the
1962 Missal scans), each row citing the line its incipit pattern was read
from. Six pairs (kings_3/4, corinthians_1/2, thessalonians_1/2,
timothy_1/2, peter_1/2) share one Missal incipit and differ only in the
sourced .abbr, matching what the primary text itself does. Three ids
(proverbs, song_of_songs, ecclesiasticus) and the seven tradition targets
are marked UNSOURCED and fall back to the data's own spelling, per this
project's central rule against inventing a Latin title.
Re-running the task's own sourcing note against the scans, counting every
hit rather than eyeballing a frequency-sorted list, found nine of its
NOT-sourced verdicts were undercounted (a single clean hit, buried under
higher-frequency matches): Galatians, Colossians, both Thessalonians, both
Peter, Malachi, Numbers, Jonas, Osee and Esdras all have a clean incipit
in the scans and are sourced here. The note's other three verdicts stand,
confirmed independently. Ecclesiasticus is not simply unfound: this Missal
reuses Wisdom's own Lectio libri Sapientiae incipit for Ecclesiasticus
readings too (both were anciently classed as one Sapiential group), so
using it for Ecclesiasticus would misidentify the book, not merely
abbreviate it -- recorded in that row's own comment.
en.ini's [bible] is filled in full, not left partial the way [celebration]
is: without it, a Vulgate-numbered id would fall through the [meta]
fallback chain to la.ini's Latin name, not merely a less complete English
one. Traditional Douay-Rheims names for the Vulgate ids (3 Kings, Osee,
Ecclesiasticus, Isaias, Apocalypse), modern names for the seven tradition
targets, since --sigla-tradition modern is the reader asking for modern
numbering.
test_lang_coverage.ml gains test_every_book_named, asserting every
Book.all id has both forms in la.ini -- the check that catches a forgotten
tradition target, since nothing else in the suite ever names them.
Shipping real book names changes 11 golden template renders (Render/golden)
and several test/cli.t examples that used to demonstrate the pre-Task-10
default-spelling fallback; both are updated to the new, correct output,
each line checked against a fresh render before promoting.
Diffstat (limited to 'test/cli.t')
| -rw-r--r-- | test/cli.t | 37 |
1 files changed, 21 insertions, 16 deletions
@@ -420,7 +420,7 @@ CSV emits a header and one row per day: $ colitur emit --format csv --from 2027 --to 2027 | head -2 date,rite,season,season_name,week,slug,name,weekday,rank,rank_name,colour,colour_name,subject,first,gospel,comms - 2027-01-01,ef,christmastide,Tempus Nativitatis,,ef-circumcision,In Octava Nativitatis Domini,Feria VI,class-1,I classis,white,albus,temporal,Titus 2:11-15,Luke 2:21, + 2027-01-01,ef,christmastide,Tempus Nativitatis,,ef-circumcision,In Octava Nativitatis Domini,Feria VI,class-1,I classis,white,albus,temporal,Tit 2:11-15,Luc 2:21, $ colitur emit --format csv --from 2027 --to 2027 | wc -l 366 @@ -519,7 +519,7 @@ place. 1 January 2027 is the Circumcision, kept within the Nativity octave: 2027-01-02 saturday christmastide - ef-christmas-1-saturday class-4 white Officium sanctae Mariae in sabbato $ colitur readings 2027 | head -1 - 2027-01-01 ef-circumcision | Titus 2:11-15 | Luke 2:21 | In Octava Nativitatis Domini + 2027-01-01 ef-circumcision | Tit 2:11-15 | Luc 2:21 | In Octava Nativitatis Domini --raw restores the old byte-exact output -- no trailing field at all, not merely an empty one, because [Lang.raw] is the identity table (lang.mli): @@ -539,16 +539,19 @@ Every citation now renders through a {!Colitur_citation.Sigla.t} (Task 9), at both places one reaches output -- [View.citation_ref] (`table`/`render`/ `emit`/`publish`) and `readings`' own `part_ref`. The DEFAULT style normalises the seven duplicate book spellings the shipped data inherited -from lectio onto one canonical form (`3 Kgs.`/`3 Kings` -> `3 Kings`, -`Isa.` -> `Isa`, ...) and reconstructs each citation from its PARSED +from lectio onto ONE name, reconstructed from the citation's PARSED structure, so stray punctuation the parser already treats as noise (a trailing full stop or semicolon, a comma used as a chapter/verse -separator) does not survive either: +separator) does not survive either. Since Task 10 shipped `la.ini`'s own +`[bible]` section, that one name is a real Latin abbreviation sourced from +the Missal scans, not merely a pick between the data's own two raw +spellings: both `3 Kgs.` and `3 Kings` resolve to `3 Reg`, the Vulgate's own +form (lang/la.ini's own `[bible]` header note, kings_3): - $ colitur readings 2027 | grep -E '3 K(gs|ings)' | head -3 - 2027-02-17 ef-lent-ember-wed | 3 Kings 19:3-8 | Matt 12:38-50 | Feria IV Quatuor Temporum Quadragesimae - 2027-02-23 ef-lent-2-tuesday | 3 Kings 17:8-16 | Matt 23:1-12 | Feria III post Dominicam II in Quadragesima - 2027-03-08 ef-lent-4-monday | 3 Kings 3:16-28 | John 2:13-25 | Feria II post Dominicam IV in Quadragesima + $ colitur readings 2027 | grep -E '3 Reg' | head -3 + 2027-02-17 ef-lent-ember-wed | 3 Reg 19:3-8 | Matth 12:38-50 | Feria IV Quatuor Temporum Quadragesimae + 2027-02-23 ef-lent-2-tuesday | 3 Reg 17:8-16 | Matth 23:1-12 | Feria III post Dominicam II in Quadragesima + 2027-03-08 ef-lent-4-monday | 3 Reg 3:16-28 | Ioann 2:13-25 | Feria II post Dominicam IV in Quadragesima `--raw` passes {!Colitur_citation.Sigla.verbatim}, NEVER a styled `Sigla.t` built over `Lang.raw` -- the latter would still parse and reformat every @@ -1249,7 +1252,7 @@ so two dumps of the same table are byte-identical: [meta] lang = la - [celebration] + [bible] $ grep -c '^ef-epiphany ' d.ini 1 @@ -1424,17 +1427,19 @@ Latin-convention punctuation. The synthetic file below overrides only $ printf '[meta]\nlang = zz\n[sigla]\nchapter_verse = "{chapter}, {verses}"\n' > lang-sigla.ini $ colitur readings 2027 --sigla-style ./lang-sigla.ini | head -1 - 2027-01-01 ef-circumcision | Titus 2, 11-15 | Luke 2, 21 | In Octava Nativitatis Domini + 2027-01-01 ef-circumcision | Tit 2, 11-15 | Luc 2, 21 | In Octava Nativitatis Domini `--sigla-tradition` renumbers which book an id DENOTES (lang/traditions.ini), independently of style or naming -- `modern` maps `3 Kings` onto the id -`kings_1`, which has no registered spelling of its own (only a Vulgate -tradition target, book.mli), so it prints literally until a language file -names it -- a real, if plain, witness that the tradition actually applied -rather than a no-op: +`kings_1`. Task 10's `la.ini` now carries a `[bible]` row for `kings_1` (a +tradition target the Vulgate data never cites directly, book.mli), but only +its own bare id -- an honest UNSOURCED placeholder, not a name (la.ini's own +`[bible]` header note) -- so it still prints literally, now BY DESIGN rather +than by the row's absence, still a real, if plain, witness that the +tradition actually applied rather than a no-op: $ colitur readings 2027 --sigla-tradition modern | grep '^2027-02-17' - 2027-02-17 ef-lent-ember-wed | kings_1 19:3-8 | Matt 12:38-50 | Feria IV Quatuor Temporum Quadragesimae + 2027-02-17 ef-lent-ember-wed | kings_1 19:3-8 | Matth 12:38-50 | Feria IV Quatuor Temporum Quadragesimae `table`/`render`, `emit` and `publish` accept the same three flags too -- smoke-tested for exit status alone here (a minimal inline template, the |
