summaryrefslogtreecommitdiff
path: root/tools/bootstrap_sanctoral.ml
diff options
context:
space:
mode:
Diffstat (limited to 'tools/bootstrap_sanctoral.ml')
-rw-r--r--tools/bootstrap_sanctoral.ml19
1 files changed, 17 insertions, 2 deletions
diff --git a/tools/bootstrap_sanctoral.ml b/tools/bootstrap_sanctoral.ml
index 19adc0b..4135518 100644
--- a/tools/bootstrap_sanctoral.ml
+++ b/tools/bootstrap_sanctoral.ml
@@ -155,10 +155,25 @@ let parse_subject sec =
| Some s -> s
| None -> die "section [%s]: unknown class %S" sec.name raw)
+(* name.en is always required; name.pl is not -- the 2026-08-12 re-bootstrap
+ (RG16(a) blast-radius task) found 5 of the source's 322 entries missing it
+ outright (agnes-secundo, boniface-martyr, eusebius-confessor, evaristus,
+ theodore -- all 5 either newly added or newly un-hidden by lectio's own
+ generator fix, never previously reachable through this tool at all, since
+ every entry the OLD ini shipped happened to carry both languages). Prior
+ to this the field was unconditionally required (`field sec "name.pl"`,
+ which `die`s on absence) -- correct for a byte-faithful mirror of a
+ source that always had it, wrong once the source legitimately does not:
+ Names.t itself is an open, per-language assoc list (names.mli) with no
+ rule that every entry must carry every language colitur happens to know
+ about, so requiring pl here was this tool's own invented constraint, not
+ a kernel one. Falling back to en-only (never a placeholder string) is the
+ same posture the kernel takes elsewhere for a genuinely absent field. *)
let parse_names sec =
let en = field sec "name.en" in
- let pl = field sec "name.pl" in
- Names.of_list [ (Lang.of_string_exn "en", en); (Lang.of_string_exn "pl", pl) ]
+ match field_opt sec "name.pl" with
+ | Some pl -> Names.of_list [ (Lang.of_string_exn "en", en); (Lang.of_string_exn "pl", pl) ]
+ | None -> Names.of_list [ (Lang.of_string_exn "en", en) ]
(* reading.* is deliberately ignored -- Plan 4's lectionary bootstrap. *)
let convert_entry sec : V.rank Layer.entry =