diff options
Diffstat (limited to 'lib/naming/lang.mli')
| -rw-r--r-- | lib/naming/lang.mli | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/lib/naming/lang.mli b/lib/naming/lang.mli index 34a6d5d..3c62d26 100644 --- a/lib/naming/lang.mli +++ b/lib/naming/lang.mli @@ -55,6 +55,13 @@ val term : t -> string -> string degradation an unnamed slug already gets, not a special case. *) val rite : t -> string -> string +(** A Bible book's name, from the [\[bible\]] section. The key is + [<book_id>.full] or [<book_id>.abbr] (e.g. ["luke.abbr"]). A miss returns + the key itself, the same TOTAL-lookup contract as every other function + here -- callers turn that into a real fallback via + {!Colitur_citation.Book.default_spelling}, not this module. *) +val bible : t -> string -> string + (** [weekday t n], 0 = Sunday. Out-of-range [n] returns [string_of_int n]. *) val weekday : t -> int -> string @@ -69,5 +76,23 @@ val month : t -> int -> string val month_abbr : t -> int -> string (** Every (section-qualified key, value) pair, sorted. Used by [lang --dump] and - [lang --check]. Keys are qualified as e.g. ["celebration.ef-epiphany"]. *) + [lang --check]. Keys are qualified as e.g. ["celebration.ef-epiphany"]. + + Includes [\[bible\]] (["bible.luke.abbr"]): book names are translatable + text, so a file missing them is genuinely incomplete and [lang --check] + should say so. Deliberately EXCLUDES [\[sigla\]]: those are five citation- + style settings with working defaults ({!Colitur_citation.Render.default_style}), + not names a translator owes -- listing them here would make [--check] + demand five settings from every language file. *) val keys : t -> (string * string) list + +(** The [\[sigla\]] section's raw fields, for + {!Colitur_citation.Render.style_of_fields} to read. Values come back + TRIMMED (whitespace at both ends) but still QUOTED if the file quoted + them -- unquoting is [Render]'s job, not this module's, the same reason + {!Colitur_kernel.Overlay_ini} (which this parses through) never unquotes + either. An empty (or absent) [\[sigla\]] section returns [[]]; unlike + every lookup above, there is no per-key TOTAL contract to keep here -- + this is a settings bag, not a translation table, and [Render] already + supplies its own defaults for whatever is missing. *) +val sigla_fields : t -> (string * string) list |
