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/config/config.go | 16 ++++++++-------- internal/config/config.toml | 4 ++-- internal/config/config_test.go | 2 +- 3 files changed, 11 insertions(+), 11 deletions(-) (limited to 'internal/config') diff --git a/internal/config/config.go b/internal/config/config.go index 5102d38..bee48a7 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -24,11 +24,11 @@ var seedTOML []byte // Version is lectio's release version, shared by every binary's // -v/--version output (lectio, lectio-ui, lectio-web). -const Version = "0.3.0" +const Version = "0.4.0" // validVersions are the five scripture versions lectio understands. var validVersions = map[string]bool{ - "pl": true, + "bt": true, "wuj": true, "vul": true, "grb": true, @@ -36,7 +36,7 @@ var validVersions = map[string]bool{ } // ValidVersion reports whether v is one of the five scripture versions -// lectio understands (pl, wuj, vul, grb, drb). +// lectio understands (bt, wuj, vul, grb, drb). func ValidVersion(v string) bool { return validVersions[v] } @@ -129,8 +129,8 @@ func Default() Config { SchemaVersion: 1, Lectionary: "new", TraditionalLang: "pl", - Versions: []string{"pl", "wuj", "vul", "grb", "drb"}, - DefaultVersion: "pl", + Versions: []string{"bt", "wuj", "vul", "grb", "drb"}, + DefaultVersion: "bt", Width: 0, All: false, Offline: false, @@ -227,15 +227,15 @@ func validate(cfg Config) error { } for _, v := range cfg.Versions { if !validVersions[v] { - return fmt.Errorf("config: invalid version %q in versions (must be one of pl, wuj, vul, grb, drb)", v) + return fmt.Errorf("config: invalid version %q in versions (must be one of bt, wuj, vul, grb, drb)", v) } } if !validVersions[cfg.DefaultVersion] { - return fmt.Errorf("config: invalid default_version %q (must be one of pl, wuj, vul, grb, drb)", cfg.DefaultVersion) + return fmt.Errorf("config: invalid default_version %q (must be one of bt, wuj, vul, grb, drb)", cfg.DefaultVersion) } for _, v := range cfg.WebVersions { if !validVersions[v] { - return fmt.Errorf("config: invalid version %q in web_versions (must be one of pl, wuj, vul, grb, drb)", v) + return fmt.Errorf("config: invalid version %q in web_versions (must be one of bt, wuj, vul, grb, drb)", v) } } return nil diff --git a/internal/config/config.toml b/internal/config/config.toml index 49cca7f..656ddc5 100644 --- a/internal/config/config.toml +++ b/internal/config/config.toml @@ -1,8 +1,8 @@ schema_version = 1 lectionary = "new" # "new" (niedziela.pl) or "traditional" (missalemeum, 1962) traditional_lang = "pl" # vernacular for traditional propers: "pl" or "en" -versions = ["pl", "wuj", "vul", "grb", "drb"] # compare set + TUI cycle order -default_version = "pl" # TUI start / `lectio show` default +versions = ["bt", "wuj", "vul", "grb", "drb"] # compare set + TUI cycle order +default_version = "bt" # TUI start / `lectio show` default width = 0 # CLI wrap width; 0 = detect terminal all = false # default to all parts (true) or just the gospel (false) offline = false # true = never fetch; read only harvested sigla + cache diff --git a/internal/config/config_test.go b/internal/config/config_test.go index 0f7bea8..a72383b 100644 --- a/internal/config/config_test.go +++ b/internal/config/config_test.go @@ -13,7 +13,7 @@ func TestLoadSeeds(t *testing.T) { if err != nil { t.Fatal(err) } - if cfg.DefaultVersion != "pl" || cfg.Offline { + if cfg.DefaultVersion != "bt" || cfg.Offline { t.Errorf("defaults wrong: %+v", cfg) } if cfg.Lectionary != "new" { -- cgit v1.3