aboutsummaryrefslogtreecommitdiff
path: root/internal/i18n
diff options
context:
space:
mode:
authorLukasz Kasprzak <lukas@labunix.xyz>2026-08-04 00:05:55 +0200
committerLukasz Kasprzak <lukas@labunix.xyz>2026-08-04 00:05:55 +0200
commit70c504148ca9ddf7fdb31162f5f8da7e118fca45 (patch)
treebbba04379fa639ebd387f8213c12dcbc6490a02f /internal/i18n
parent1106568c52265ea3076b9d3f1943c052c83a2a89 (diff)
downloadlectio-70c504148ca9ddf7fdb31162f5f8da7e118fca45.tar.gz
lectio-70c504148ca9ddf7fdb31162f5f8da7e118fca45.zip
i18n: pin the Polish part labels; cross-reference the part-ID orders
Diffstat (limited to 'internal/i18n')
-rw-r--r--internal/i18n/vocab_test.go31
1 files changed, 31 insertions, 0 deletions
diff --git a/internal/i18n/vocab_test.go b/internal/i18n/vocab_test.go
index bcd3464..97c09d6 100644
--- a/internal/i18n/vocab_test.go
+++ b/internal/i18n/vocab_test.go
@@ -65,3 +65,34 @@ func TestPolishRankWordingUnchanged(t *testing.T) {
}
}
}
+
+// The Polish part labels must be exactly this spelling, diacritics included,
+// and no others. This asserts against plUI directly, NOT i18n.Get("pl"):
+// Get overlays the embedded English baseline first and then the Polish file
+// on top (lang.go's Get), so a label present in English and missing only
+// from plUI.PartLabel would resolve through Get("pl") to the identical
+// English word rather than "" -- invisible to
+// internal/readings/partids_test.go's TestEveryPartIDHasLabels, which only
+// checks Get(lang) for non-emptiness. plUI is the unmerged golden source
+// with no fallback, so a missing entry is genuinely absent there, which is
+// the only way to catch this. The exact key-count check guards against a
+// future addition to plUI.PartLabel slipping in unpinned.
+func TestPolishPartLabelWordingUnchanged(t *testing.T) {
+ want := map[string]string{
+ "pierwsze_czytanie": "1. czytanie",
+ "psalm": "Psalm",
+ "drugie_czytanie": "2. czytanie",
+ "aklamacja": "Aklamacja",
+ "ewangelia": "Ewangelia",
+ "epistola": "Lekcja",
+ "evangelium": "Ewangelia",
+ }
+ if len(plUI.PartLabel) != len(want) {
+ t.Fatalf("plUI.PartLabel has %d keys, want %d: %v", len(plUI.PartLabel), len(want), plUI.PartLabel)
+ }
+ for k, v := range want {
+ if got, ok := plUI.PartLabel[k]; !ok || got != v {
+ t.Errorf("plUI.PartLabel[%q] = %q (present=%v), want %q", k, got, ok, v)
+ }
+ }
+}