diff options
| author | Lukasz Kasprzak <lukas@labunix.xyz> | 2026-07-23 21:51:40 +0200 |
|---|---|---|
| committer | Lukasz Kasprzak <lukas@labunix.xyz> | 2026-07-23 21:51:40 +0200 |
| commit | 4c776396115c8120c3e1cb8fda993449fcdcd326 (patch) | |
| tree | 0144fb325663dde063057a5ec568c59d4cbe79da /internal/web/server_test.go | |
| parent | bfa8df7b36ccbd44703e0705d51a2ed553a23164 (diff) | |
| download | lectio-4c776396115c8120c3e1cb8fda993449fcdcd326.tar.gz lectio-4c776396115c8120c3e1cb8fda993449fcdcd326.zip | |
i18n: ui_language config (default en) for UI chrome across cli/tui/web; version labels localised
Diffstat (limited to 'internal/web/server_test.go')
| -rw-r--r-- | internal/web/server_test.go | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/internal/web/server_test.go b/internal/web/server_test.go index 47c38e9..25d21f4 100644 --- a/internal/web/server_test.go +++ b/internal/web/server_test.go @@ -38,7 +38,10 @@ func TestServer(t *testing.T) { t.Fatalf("status = %d, want 200", rec.Code) } body := rec.Body.String() - if !strings.Contains(body, "Ewangelia") { + // config.Default() -> UILanguage "en", so the gospel heading's part + // label is localised to "Gospel" (render.LocalizeHeading); the + // citation stays exactly as scraped. + if !strings.Contains(body, "Gospel") { t.Errorf("body missing reading heading: %q", body) } if !strings.Contains(body, "htmx") { @@ -59,7 +62,8 @@ func TestServer(t *testing.T) { if strings.Contains(body, "<html") { t.Errorf("partial is not a fragment: %q", body) } - if !strings.Contains(body, "Ewangelia") { + // See "index page" above: config.Default() is English chrome. + if !strings.Contains(body, "Gospel") { t.Errorf("partial missing reading heading: %q", body) } }) @@ -118,7 +122,8 @@ func TestServer(t *testing.T) { if j := strings.Index(body[i+1:], `class="vnum"`); j != -1 { block = body[i : i+1+j] } - if !strings.Contains(block, "Wujek") || !strings.Contains(block, "Wulgata") { + // config.Default() is English chrome: "Wujek (Polish)"/"Vulgate (Latin)". + if !strings.Contains(block, "Wujek") || !strings.Contains(block, "Vulgate") { t.Errorf("interlinear verse block missing both version labels grouped together: %q", block) } }) |
