aboutsummaryrefslogtreecommitdiff
path: root/internal/bible/booktable_test.go
diff options
context:
space:
mode:
authorLukasz Kasprzak <lukas@labunix.xyz>2026-07-27 14:59:14 +0200
committerLukasz Kasprzak <lukas@labunix.xyz>2026-07-27 14:59:14 +0200
commitcb3379f41c06a94085c77fe359709b46712850dc (patch)
tree032801111764c83c3ab089ed101ba4d1222a9abd /internal/bible/booktable_test.go
parenta13dd6224a095242da54062e4775570c4f16a718 (diff)
downloadlectio-cb3379f41c06a94085c77fe359709b46712850dc.tar.gz
lectio-cb3379f41c06a94085c77fe359709b46712850dc.zip
feat: books.toml -> books.ini, multi-language (add Latin dialect), config-scoped citation display
books.ini with [en]/[pl]/[la]; parseBooks reads INI (bible drops go-toml). Latin dialect resolves EF citations (Eccli->Sirach, Apoc->Revelation, Luc...); sigla_style gains 'latin'. Reading citations now DISPLAY in the configured sigla (FormatRef(SiglaLang)), not raw English. One-shot books.toml->books.ini user migration (go-toml now config-only). Web settings editor -> books.ini.
Diffstat (limited to 'internal/bible/booktable_test.go')
-rw-r--r--internal/bible/booktable_test.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/internal/bible/booktable_test.go b/internal/bible/booktable_test.go
index 2a57d80..2fdd891 100644
--- a/internal/bible/booktable_test.go
+++ b/internal/bible/booktable_test.go
@@ -97,7 +97,7 @@ func TestFormatRef(t *testing.T) {
func TestBookTableMergeAndMalformed(t *testing.T) {
// User adds an alias "Jhn" to English John; other books stay default.
- user := []byte("[en]\nJohn = [\"Jn\", \"Jhn\", \"John\"]\n")
+ user := []byte("[en]\nJohn = Jn, Jhn, John\n")
tbl, err := LoadBookTable(user)
if err != nil {
t.Fatalf("merge err: %v", err)
@@ -108,12 +108,12 @@ func TestBookTableMergeAndMalformed(t *testing.T) {
if got, ok := tbl.ParseRef("en", "Gen 1:1"); !ok || got != "Genesis 1:1" {
t.Errorf("unlisted book lost after merge: %q,%v", got, ok)
}
- // Malformed user TOML -> non-nil error but a usable defaults table.
- tbl2, err := LoadBookTable([]byte("this is not [valid toml"))
+ // Malformed user INI -> non-nil error but a usable defaults table.
+ tbl2, err := LoadBookTable([]byte("this is not valid ini"))
if err == nil {
- t.Error("expected error for malformed user toml")
+ t.Error("expected error for malformed user ini")
}
if got, ok := tbl2.ParseRef("en", "Jn 3:16"); !ok || got != "John 3:16" {
- t.Errorf("defaults unusable after malformed user toml: %q,%v", got, ok)
+ t.Errorf("defaults unusable after malformed user ini: %q,%v", got, ok)
}
}