aboutsummaryrefslogtreecommitdiff
path: root/internal/calendar/names.go
Commit message (Collapse)AuthorAgeFilesLines
* naming: localise liturgical day names in any languageLukasz Kasprzak2026-07-281-151/+0
| | | | | | | | | | | | | | | | | | | | | | | | Add internal/naming, which renders temporal day names and celebration display names from the calendar engine's slugs in any language. English is the built-in baseline; a language is data -- an embedded lang/<code>.ini (pl shipped) and/or a user file at <config dir>/names/<code>.ini that overrides it key by key. Names compose from a small vocabulary plus per-language format templates, so word order and grammatical case can differ (e.g. Polish genitive "3. Niedziela Okresu Zwykłego"); any string a language omits falls back to English. - Move day-name generation out of calendar (calendar.HumanizeSlug removed, calendar stays a pure engine) into naming.DayName; the English golden cases carry over verbatim. - naming.CelebrationName unifies the three duplicated resolvers (cli/readings/calfeed): name.<lang> -> English -> Latin -> humanized slug. Saint names stay in the calendar data (name.<lang>), overridable via calendar layers. - config: ui_language now accepts any code (lower-cased, not clamped to en/pl) so names/<code>.ini applies; UI chrome still resolves en/pl and falls back to English. Add NamesDir(); wire naming.SetUserDir (and the previously unwired bible.SetUserCorporaDir) in the TUI and web mains too, so external corpora and name files work across all three binaries.
* feat: humanize temporal-day display names (OF + EF)Lukasz Kasprzak2026-07-281-0/+151
Temporal days with no proper name showed a slug-derived string ('triduum fri', 'ordinary 11 tue', 'advent-dec-17'). Add calendar.HumanizeSlug, used by both celebrationName fallbacks (cli + calfeed), turning slugs into proper liturgical names: Good Friday, Ash Wednesday, 'Tuesday of the 11th Week in Ordinary Time', '11th Sunday in Ordinary Time', 'December 17', 'The Most Holy Trinity', and the EF forms ('4th Week after Pentecost', 'Passion Week', 'Ember Wednesday of September'). Adds TestHumanizeSlug.