From cb3379f41c06a94085c77fe359709b46712850dc Mon Sep 17 00:00:00 2001 From: Lukasz Kasprzak Date: Mon, 27 Jul 2026 14:59:14 +0200 Subject: 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. --- internal/bible/booktable_test.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'internal/bible/booktable_test.go') 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) } } -- cgit v1.3