summaryrefslogtreecommitdiff
path: root/lang
diff options
context:
space:
mode:
authorLukasz Kasprzak <lukas@labunix.xyz>2026-08-19 23:52:05 +0200
committerLukasz Kasprzak <lukas@labunix.xyz>2026-08-19 23:52:05 +0200
commit6994cb2008263678c183228c97dea673babb6f1e (patch)
tree880eb991a3cca1073443ddf0694548b4be308af9 /lang
parentecadd969e1d96918820a1fdac0cf0d520d96ba06 (diff)
downloadcolitur-6994cb2008263678c183228c97dea673babb6f1e.tar.gz
colitur-6994cb2008263678c183228c97dea673babb6f1e.zip
fix(install): ship lang/ so installed colitur resolves names
la.ini and en.ini (725 Latin/English liturgical names -- the entire point of the naming-and-config work just merged) had no dune install rule, so make install / dune install never copied them to <prefix>/share/colitur/lang/. bin/main.ml's lang_dir() probes exactly that installed path first, falling back to a build-tree layout that also does not exist for an installed binary -- so every installed user silently got raw slugs (ef-circumcision) and untranslated terms (epistle/gospel) instead of resolved names, with no error at all. The defect existed because nobody had run the installed binary from a directory with no colitur source tree above it: dune exec and dune test always resolve lang/ via the build tree, materialized as a side effect of test/dune's cram deps, so every in-tree check stayed green while the installed artifact was broken. Add lang/dune, following schema/dune's exact pattern: an install stanza placing la.ini and en.ini at <prefix>/share/colitur/lang/, matching where bin/main.ml's lang_dir() already looked. No code change was needed there -- only the missing install rule. Update Makefile's install target help text and summary echo to mention lang alongside ef/templates/schema. Verified end to end: uninstalled, removed lang/dune, rebuilt and reinstalled to reproduce the bug from an outside directory (~/tmp, colitur table showed ef-circumcision/epistle); restored lang/dune, reinstalled, and confirmed the same command now shows the resolved Latin name and rubric terms, that ~/.local/share/colitur/lang/ contains both files, and that colitur emit --format csv shows a real name in the name column. lang/la.ini and lang/en.ini are untouched. Full suite: dune test --force, 495 tests, 0 failures.
Diffstat (limited to 'lang')
-rw-r--r--lang/dune17
1 files changed, 17 insertions, 0 deletions
diff --git a/lang/dune b/lang/dune
new file mode 100644
index 0000000..057e95a
--- /dev/null
+++ b/lang/dune
@@ -0,0 +1,17 @@
+; The 725-name Latin/English liturgical vocabulary, installed into
+; <prefix>/share/colitur/lang/ so an installed `colitur` can find la.ini
+; the same way it finds its calendar data -- bin/main.ml's own [lang_dir]
+; probes exactly this location as its INSTALLED candidate, mirroring
+; data/dune's own ef/ layout and schema/dune's own schema/ layout.
+;
+; Without this file, `make install`/`dune install` never copied lang/ at
+; all: la.ini and en.ini are the entire point of the naming-and-config
+; work, and an installed binary silently degraded to raw slugs
+; (Lang.raw) with no error, because [lang_dir]'s installed candidate
+; never existed. Task: naming-and-config hotfix.
+(install
+ (section share)
+ (package colitur)
+ (files
+ (la.ini as lang/la.ini)
+ (en.ini as lang/en.ini)))