// Package i18n holds lectio's UI-chrome string tables (English and Polish) // for the ui_language config setting. It localises the chrome only -- // version-column labels, the TUI keybar/messages, the CLI banner words, the // web control labels, and the modern-lectionary section-heading label words // -- never the scripture verse text or citation, which stay source-language. package i18n // UI is one language's complete set of chrome strings. type UI struct { // Version names each bible version for column headers / prose, keyed by // version code (pl, wuj, vul, grb, drb). Version map[string]string // PartLabel names each modern-lectionary section's heading label word, // keyed by liturgy.Section.PartID (pierwsze_czytanie, psalm, // drugie_czytanie, aklamacja, ewangelia). The pl entries are the exact // prefixes niedziela.pl's scraped headings carry, used by // render.LocalizeHeading to recognise and swap the label word while // keeping the citation untouched. PartLabel map[string]string // TUI keybar and status messages. NoReadingsFor and ErrorPrefix each // carry their own single trailing space (the TUI concatenates a date or // error string directly onto them, no separator added at the call site). FooterKeys, Loading, NoReadingsFor, ErrorPrefix, ErrorHint string // CLI banner label words and connective: the banner is // " " (e.g. "Gospel for 2026-07-22" / // "Ewangelia na 2026-07-22"). BannerGospel, BannerReadings, BannerConnective string // Web control labels. Lectionary, OptModern, OptTraditional string Parts, OptGospel, OptAll string Layout, OptHorizontal, OptColumns string OptInterlinear, Theme, Mono string // NoInterlinearVerses is the web interlinear pane's note when no // requested version could be interleaved for a section. NoInterlinearVerses string // NoReadingsDay is the web error fragment shown when readings.Load // returns no sections at all for the requested date. NoReadingsDay string // NoVersion/NoVersionPartial/NoReference/NoReferenceErr are // render.GatherVersion/GatherVerses' lookup/citation-failure blocks, // rendered verbatim by cli/tui/web. NoVersion takes the version code; // NoVersionPartial takes the version code and the comma-joined missing // references; NoReferenceErr takes the underlying error (pl keeps %w so // it still wraps, en uses %v -- the verb only controls // errors.Unwrap-ability, both format identically via Error()). NoVersion, NoVersionPartial, NoReference, NoReferenceErr string } // Get returns lang's chrome string set, falling back to English for // anything other than "pl". func Get(lang string) UI { if lang == "pl" { return plUI } return enUI } var enUI = UI{ Version: map[string]string{ "pl": "Polish (niedziela.pl)", "wuj": "Wujek (Polish)", "vul": "Vulgate (Latin)", "grb": "Greek", "drb": "Douay-Rheims (English)", }, PartLabel: map[string]string{ "pierwsze_czytanie": "1st reading", "psalm": "Psalm", "drugie_czytanie": "2nd reading", "aklamacja": "Acclamation", "ewangelia": "Gospel", }, FooterKeys: "tab/⇧tab version ←/→ day j/k scroll space/b page g/G top/bottom r refresh q quit", Loading: "loading…", NoReadingsFor: "no readings for ", ErrorPrefix: "error: ", ErrorHint: "change date (←/→) or refresh (r)", BannerGospel: "Gospel", BannerReadings: "Readings", BannerConnective: "for", Lectionary: "lectionary", OptModern: "modern", OptTraditional: "traditional", Parts: "parts", OptGospel: "Gospel", OptAll: "all parts", Layout: "layout", OptHorizontal: "horizontal", OptColumns: "columns", OptInterlinear: "interlinear", Theme: "theme", Mono: "mono", NoInterlinearVerses: "(no verses to align)", NoReadingsDay: "no readings for this day", NoVersion: "(not in %s)", NoVersionPartial: "(not in %s: %s)", NoReference: "(no reference)", NoReferenceErr: "(no reference: %v)", } var plUI = UI{ Version: map[string]string{ "pl": "Polski (niedziela.pl)", "wuj": "Wujek (pol.)", "vul": "Wulgata (lac.)", "grb": "Grecki", "drb": "Douay-Rheims (ang.)", }, PartLabel: map[string]string{ "pierwsze_czytanie": "1. czytanie", "psalm": "Psalm", "drugie_czytanie": "2. czytanie", "aklamacja": "Aklamacja", "ewangelia": "Ewangelia", }, FooterKeys: "tab/⇧tab wersja ←/→ dzień j/k przewiń spacja/b strona g/G góra/dół r odśwież q wyjście", Loading: "ładowanie…", NoReadingsFor: "brak czytań na ", ErrorPrefix: "błąd: ", ErrorHint: "zmień datę (←/→) lub odśwież (r)", BannerGospel: "Ewangelia", BannerReadings: "Czytania", BannerConnective: "na", Lectionary: "lekcjonarz", OptModern: "nowy", OptTraditional: "tradycyjny", Parts: "zakres", OptGospel: "Ewangelia", OptAll: "wszystkie części", Layout: "układ", OptHorizontal: "poziomo", OptColumns: "kolumny", OptInterlinear: "interlinearnie", Theme: "motyw", Mono: "mono", NoInterlinearVerses: "(brak wersetów do zestawienia interlinearnego)", NoReadingsDay: "brak czytań na ten dzień", NoVersion: "(brak w „%s”)", NoVersionPartial: "(brak w „%s”: %s)", NoReference: "(brak odwołania)", NoReferenceErr: "(brak odwołania: %w)", }