diff options
| author | Lukasz Kasprzak <lukas@labunix.xyz> | 2026-07-24 09:55:36 +0200 |
|---|---|---|
| committer | Lukasz Kasprzak <lukas@labunix.xyz> | 2026-07-24 09:55:36 +0200 |
| commit | a865374755480a4aef2a6156afccdf08a91422ea (patch) | |
| tree | 74caa0e64574e491a5620300c3b5544948d0a412 /internal/tui | |
| parent | 1faf9f1b03d7d257307f6ea0500063e4be939d17 (diff) | |
| download | lectio-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/tui')
| -rw-r--r-- | internal/tui/tui.go | 6 | ||||
| -rw-r--r-- | internal/tui/tui_test.go | 14 |
2 files changed, 10 insertions, 10 deletions
diff --git a/internal/tui/tui.go b/internal/tui/tui.go index 16cb304..db0e8da 100644 --- a/internal/tui/tui.go +++ b/internal/tui/tui.go @@ -43,7 +43,7 @@ type errMsg struct { err error } -// New builds the initial model: cfg.Offline drops "pl" from the version +// New builds the initial model: cfg.Offline drops "bt" from the version // list (render.OfflineVersions). startVersion selects the active version // (falling back to cfg.DefaultVersion when ""), still resolved through // EffectiveVersions/indexOf so an unavailable version falls back to index 0. @@ -334,9 +334,9 @@ func (m Model) bodyLines(w int) []string { _, blocks := render.GatherVersion(ver, sec, m.cfg.Lectionary, m.cfg.UILanguage) numW := maxNumWidth(blocks) - // The refrain-italic only applies to the pl responsorial-psalm block + // The refrain-italic only applies to the bt responsorial-psalm block // (its first, deduped paragraph); bible versions have no refrain block. - isPsalm := sec.PartID == "psalm" && ver == "pl" + isPsalm := sec.PartID == "psalm" && ver == "bt" for bi, b := range blocks { refrain := isPsalm && bi == 0 lines = append(lines, styleBlock(b, refrain, w, numW)...) diff --git a/internal/tui/tui_test.go b/internal/tui/tui_test.go index 2b966ee..85a8175 100644 --- a/internal/tui/tui_test.go +++ b/internal/tui/tui_test.go @@ -10,8 +10,8 @@ import ( ) func TestVersionCycle(t *testing.T) { - m := New(config.Config{Versions: []string{"pl", "wuj", "vul"}, DefaultVersion: "pl"}, "", "") - if m.version() != "pl" { + m := New(config.Config{Versions: []string{"bt", "wuj", "vul"}, DefaultVersion: "bt"}, "", "") + if m.version() != "bt" { t.Fatalf("start = %q", m.version()) } m = m.cycleVersion(+1) @@ -19,16 +19,16 @@ func TestVersionCycle(t *testing.T) { t.Errorf("after tab = %q", m.version()) } m = m.cycleVersion(-1) - if m.version() != "pl" { + if m.version() != "bt" { t.Errorf("after shift-tab = %q", m.version()) } } -func TestOfflineDropsPL(t *testing.T) { - m := New(config.Config{Versions: []string{"pl", "wuj", "vul"}, DefaultVersion: "pl", Offline: true}, "", "") +func TestOfflineDropsBT(t *testing.T) { + m := New(config.Config{Versions: []string{"bt", "wuj", "vul"}, DefaultVersion: "bt", Offline: true}, "", "") for _, v := range m.versions { - if v == "pl" { - t.Error("offline model kept pl") + if v == "bt" { + t.Error("offline model kept bt") } } } |
