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/web/render_test.go | |
| 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/web/render_test.go')
| -rw-r--r-- | internal/web/render_test.go | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/internal/web/render_test.go b/internal/web/render_test.go index 494cdcd..b7f5b1e 100644 --- a/internal/web/render_test.go +++ b/internal/web/render_test.go @@ -45,7 +45,7 @@ func TestRenderReadingsEscapesScriptText(t *testing.T) { PartID: "pierwsze_czytanie", Paragraphs: [][]string{{"<script>alert(1)</script>"}}, }} - html := string(RenderReadings(secs, []string{"pl"}, "new", "horizontal", "pl")) + html := string(RenderReadings(secs, []string{"bt"}, "new", "horizontal", "pl")) if strings.Contains(html, "<script>alert(1)</script>") { t.Errorf("raw <script> leaked into rendered output: %q", html) } @@ -89,14 +89,14 @@ func TestRenderReadingsInterlinear(t *testing.T) { } } -func TestRenderReadingsInterlinearExcludesPL(t *testing.T) { +func TestRenderReadingsInterlinearExcludesBT(t *testing.T) { secs := []liturgy.Section{{Heading: "Ewangelia (J 20, 1. 11-18)", PartID: "ewangelia"}} - html := string(RenderReadings(secs, []string{"pl", "vul"}, "new", "interlinear", "pl")) - if strings.Contains(html, "Polski (niedziela.pl)") { - t.Errorf("interlinear output should substitute wuj for pl, not carry pl's label: %q", html[:min(300, len(html))]) + html := string(RenderReadings(secs, []string{"bt", "vul"}, "new", "interlinear", "pl")) + if strings.Contains(html, "Biblia Tysiąclecia (niedziela.pl)") { + t.Errorf("interlinear output should substitute wuj for bt, not carry bt's label: %q", html[:min(300, len(html))]) } if !strings.Contains(html, "Wujek") { - t.Errorf("interlinear output should substitute wuj for pl: %q", html[:min(300, len(html))]) + t.Errorf("interlinear output should substitute wuj for bt: %q", html[:min(300, len(html))]) } } |
