aboutsummaryrefslogtreecommitdiff
path: root/internal/config
diff options
context:
space:
mode:
authorLukasz Kasprzak <lukas@labunix.xyz>2026-07-24 09:55:36 +0200
committerLukasz Kasprzak <lukas@labunix.xyz>2026-07-24 09:55:36 +0200
commita865374755480a4aef2a6156afccdf08a91422ea (patch)
tree74caa0e64574e491a5620300c3b5544948d0a412 /internal/config
parent1faf9f1b03d7d257307f6ea0500063e4be939d17 (diff)
downloadlectio-a865374755480a4aef2a6156afccdf08a91422ea.tar.gz
lectio-a865374755480a4aef2a6156afccdf08a91422ea.zip
rename the pl scripture version to bt (Biblia Tysiąclecia); v0.4.0
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.
Diffstat (limited to 'internal/config')
-rw-r--r--internal/config/config.go16
-rw-r--r--internal/config/config.toml4
-rw-r--r--internal/config/config_test.go2
3 files changed, 11 insertions, 11 deletions
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" {