From 70c504148ca9ddf7fdb31162f5f8da7e118fca45 Mon Sep 17 00:00:00 2001 From: Lukasz Kasprzak Date: Tue, 4 Aug 2026 00:05:55 +0200 Subject: i18n: pin the Polish part labels; cross-reference the part-ID orders --- internal/render/render.go | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'internal/render') diff --git a/internal/render/render.go b/internal/render/render.go index c744aac..3437396 100644 --- a/internal/render/render.go +++ b/internal/render/render.go @@ -29,6 +29,14 @@ func versionLabel(version, lang string) string { // than ranging over i18n.UI.PartLabel (a map, so Go randomises its // iteration order). None of the five labels is a prefix of another, so the // order never changes which one matches, only determinism. +// +// Its *set* of five IDs must match internal/readings/offline.go's +// ofPartOrder, which lists the same modern IDs in a different, deliberate +// order (display order, unrelated to this package's prefix-match need). +// Nothing enforces that agreement mechanically -- internal/render and +// internal/readings do not import each other (adding a cross-package test +// would create a new dependency edge that does not exist today) -- so if a +// sixth modern part is ever added to ofPartOrder, add it here too, by hand. var modernPartOrder = []string{"pierwsze_czytanie", "drugie_czytanie", "psalm", "aklamacja", "ewangelia"} // LocalizeHeading swaps a modern (niedziela.pl) section heading's leading -- cgit v1.3