summaryrefslogtreecommitdiff
path: root/test/cli.t
diff options
context:
space:
mode:
authorLukasz Kasprzak <lukas@labunix.xyz>2026-08-19 23:48:35 +0200
committerLukasz Kasprzak <lukas@labunix.xyz>2026-08-19 23:48:35 +0200
commitecadd969e1d96918820a1fdac0cf0d520d96ba06 (patch)
treea06ed1160bfd28ae4578d9445242e48ac9ac3ea4 /test/cli.t
parent6762ce46af3cb12bc6ae37cda762c5d95add7903 (diff)
parent329d07b49e397cb65ab52e7ca019b47313027136 (diff)
downloadcolitur-ecadd969e1d96918820a1fdac0cf0d520d96ba06.tar.gz
colitur-ecadd969e1d96918820a1fdac0cf0d520d96ba06.zip
feat: naming, localisation and the rebuilt printed output
colitur computed the calendar correctly and could not say what it had computed. A printed ordo read ef-septuagesima-sunday-2 where a reader expects Dominica in Sexagesima, and the wall calendar showed slugs in every cell. lib/naming a language table and a config file, both pure and total, parsing the INI reader Overlay_ini already had lang/ la.ini and en.ini -- 725 names, every one transcribed from the 1962 Missal and citing the line it came from templates the ordo rebuilt as an A5 booklet: one week per page, a table of contents, framed days, a colour swatch; the wall calendar now fills its sheet instead of a quarter of it tools check_citations.py verifies all 400 citations resolve, with 33 self-tests of its own Names resolve through lang -> declared fallback -> the slug, so a partial translation is usable from its first line and the fully degraded case is the old output rather than a blank page. colitur day and colitur readings are BYTE-IDENTICAL to before, verified against main rather than asserted; --lang, --raw and the lang/config subcommands are still to come, and man/colitur-templates.5 still documents the pre-naming view, so writing a custom template needs the source until that lands.
Diffstat (limited to 'test/cli.t')
-rw-r--r--test/cli.t23
1 files changed, 16 insertions, 7 deletions
diff --git a/test/cli.t b/test/cli.t
index 80c8078..dfe5caa 100644
--- a/test/cli.t
+++ b/test/cli.t
@@ -419,8 +419,8 @@ displaced silently.
CSV emits a header and one row per day:
$ colitur emit --format csv --from 2027 --to 2027 | head -2
- date,rite,season,week,slug,rank,colour,subject,name_la,name_en,first,gospel,comms
- 2027-01-01,ef,christmastide,,ef-circumcision,class-1,white,temporal,,,Titus 2:11-15,Luke 2:21,
+ 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,
$ colitur emit --format csv --from 2027 --to 2027 | wc -l
366
@@ -522,12 +522,21 @@ render is the same operation under the name the design used:
2027-01-01 ef-circumcision
2027-01-02 ef-christmas-1-saturday
-Flavour is inferred from the extension and escapes data -- Sts. Peter &
-Paul (29 June) and its vigil are the only two 2035 entries whose English
-name needs LaTeX escaping:
+Flavour is inferred from the extension. `name` is the RESOLVED display
+string now (view.ml), not the old lang-keyed object -- there is no more
+`.en`/`.la` to reach, so a plain `{{name}}` is the only correct form; the
+old `{{name.en}}` dotted lookup on today's plain string simply finds
+nothing, on purpose (this is the change that also removes the shadowing
+hazard: a miss on a plain string has no dotted path left to fall back
+through). Names are Latin here (no --lang until the CLI wiring task), and
+the Missal's own Latin spells Peter and Paul's feast with "et", never an
+ampersand, so this no longer doubles as an escaping demonstration --
+that property is proved live on 2035 data in test_emit.ml instead
+(test_xml_escapes_live_data), where the English table both name sources
+still share does carry one:
- $ printf '{{#days}}{{name.en}}\n{{/days}}' > /tmp/t.tex
- $ colitur table --year 2035 --template /tmp/t.tex | grep -c 'Peter \\& Paul'
+ $ printf '{{#days}}{{name}}\n{{/days}}' > /tmp/t.tex
+ $ colitur table --year 2035 --template /tmp/t.tex | grep -c 'Ss\. Petri et Pauli'
2
An unknown extension with no --flavour is an error, not a silent fallback: