aboutsummaryrefslogtreecommitdiff
path: root/lib/kernel/names.ml
diff options
context:
space:
mode:
authorLukasz Kasprzak <lukas@labunix.xyz>2026-08-19 13:34:53 +0200
committerLukasz Kasprzak <lukas@labunix.xyz>2026-08-19 13:34:53 +0200
commit45bcbde502e07ad73b96039fcbb62471a3c94781 (patch)
tree515bd1465c75072ece7c70f8e2bcabd493f80417 /lib/kernel/names.ml
parent6762ce46af3cb12bc6ae37cda762c5d95add7903 (diff)
downloadcolitur-45bcbde502e07ad73b96039fcbb62471a3c94781.tar.gz
colitur-45bcbde502e07ad73b96039fcbb62471a3c94781.zip
feat(naming): the language table
Maps strings to strings and nothing else -- no calendars, no dates, no filesystem. That is what lets every command use it without the kernel learning about presentation. Every lookup is total, and a miss returns THE KEY rather than the empty string. A partial translation is therefore usable from its first line, and the fully-degraded case is exactly today's output (bare slugs) rather than a blank page. --raw is a real identity table, not a special case threaded through every call site: one value the whole program passes around. Reuses Overlay_ini's INI reader rather than growing a second one that would drift in its comment, quoting and trimming rules; parse_sections is exposed in the .mli for that, with no behaviour change. Fixes one defect found while running the brief's own tests rather than transcribing them blind: weekday's internal lookup key is an English day-name word (month's is already the numeral string), so on a miss it echoed that word instead of the documented numeral, breaking both the 0=Sunday convention and Lang.raw's own identity contract for weekday. weekday/month now fall back to string_of_int n directly on a miss instead of through get's generic echo-the-search-key path; month is byte-identical since its key already equals string_of_int n.
Diffstat (limited to 'lib/kernel/names.ml')
0 files changed, 0 insertions, 0 deletions