From a865374755480a4aef2a6156afccdf08a91422ea Mon Sep 17 00:00:00 2001 From: Lukasz Kasprzak Date: Fri, 24 Jul 2026 09:55:36 +0200 Subject: rename the pl scripture version to bt (Biblia Tysiąclecia); v0.4.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The niedziela.pl scraped Polish paragraph text is the Biblia Tysiąclecia translation; rename its version code from "pl" to "bt" and its i18n label to "Biblia Tysiąclecia (niedziela.pl)" everywhere the scripture VERSION is meant, across config, i18n, render, web, tui, cli and both binaries' help text. Language-role "pl" (ui_language, traditional_lang, i18n.Get lang, --lang validation) is untouched. Behavior is identical -- bt is still dropped for offline/traditional and substituted with wuj. --- internal/render/render.go | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'internal/render/render.go') diff --git a/internal/render/render.go b/internal/render/render.go index 8a36f12..7ba8ebd 100644 --- a/internal/render/render.go +++ b/internal/render/render.go @@ -96,8 +96,8 @@ const incipit = "Słowa Ewangelii" // internal/i18n); it never affects the verse text/citation itself. func GatherVersion(version string, sec liturgy.Section, lectionary, lang string) (label string, blocks []string) { label = versionLabel(version, lang) - if version == "pl" { - return label, gatherPL(sec) + if version == "bt" { + return label, gatherBT(sec) } ref, err := resolveRef(version, sec, lectionary, lang) @@ -120,7 +120,7 @@ func GatherVersion(version string, sec liturgy.Section, lectionary, lang string) return label, blocks } -// resolveRef resolves a non-"pl" version's bible.Lookup reference for sec: +// resolveRef resolves a non-"bt" version's bible.Lookup reference for sec: // sec.Citation (or, failing that, the citation extracted from sec.Heading), // converted to English/kjv-style via bible.ToEnglishRef when // lectionary=="new" (a "traditional" citation is already English-style and @@ -151,13 +151,13 @@ func resolveRef(version string, sec liturgy.Section, lectionary, lang string) (s } // GatherVerses returns one version's verses for a section as raw bible.Verse -// structs (for column/interlinear alignment). versified is false for "pl" +// structs (for column/interlinear alignment). versified is false for "bt" // (paragraph text, no verse numbers) and on any resolution/lookup failure -- // callers fall back to GatherVersion's string blocks for those. lang selects // the UI chrome language the label comes from, same as GatherVersion. func GatherVerses(version string, sec liturgy.Section, lectionary, lang string) (label string, verses []bible.Verse, versified bool) { label = versionLabel(version, lang) - if version == "pl" { + if version == "bt" { return label, nil, false } @@ -173,10 +173,10 @@ func GatherVerses(version string, sec liturgy.Section, lectionary, lang string) return label, verses, true } -// gatherPL returns the section's paragraphs, one block per paragraph, with +// gatherBT returns the section's paragraphs, one block per paragraph, with // the liturgical incipit ("Słowa Ewangelii według ...") dropped and repeated // blocks (a responsorial psalm's refrain) deduped to their first occurrence. -func gatherPL(sec liturgy.Section) []string { +func gatherBT(sec liturgy.Section) []string { var blocks []string for _, p := range sec.Paragraphs { b := strings.Join(p, " ") @@ -198,9 +198,9 @@ func gatherPL(sec liturgy.Section) []string { return deduped } -// OfflineVersions drops "pl" (which needs the network fetch of the liturgy -// page) from versions. If "pl" was present but "wuj" (the Polish-language -// bible version) was not, "wuj" takes pl's place, so the offline set still +// OfflineVersions drops "bt" (which needs the network fetch of the liturgy +// page) from versions. If "bt" was present but "wuj" (the Polish-language +// bible version) was not, "wuj" takes bt's place, so the offline set still // carries a Polish column. func OfflineVersions(versions []string) []string { hadWuj := false @@ -213,7 +213,7 @@ func OfflineVersions(versions []string) []string { out := make([]string, 0, len(versions)) for _, v := range versions { - if v == "pl" { + if v == "bt" { if hadWuj { continue } @@ -225,7 +225,7 @@ func OfflineVersions(versions []string) []string { return out } -// EffectiveVersions is the version set actually loadable for a request: "pl" +// EffectiveVersions is the version set actually loadable for a request: "bt" // (the niedziela.pl modern scrape) is dropped -- substituting "wuj" if it was // the only Polish column, via OfflineVersions -- whenever the scrape is // unavailable: offline (never fetch) OR the traditional lectionary -- cgit v1.3