aboutsummaryrefslogtreecommitdiff
path: root/internal/i18n
diff options
context:
space:
mode:
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)
+ }
+ }
+}