From 9608e49a0956c8228a022454751765404d46daa5 Mon Sep 17 00:00:00 2001 From: Lukasz Kasprzak Date: Wed, 19 Aug 2026 08:51:53 +0200 Subject: fix(render): remove rank_label -- it duplicated name verbatim view.ml's rank_label field was a byte-for-byte copy of the celebration's name (names_value cel.Celebration.names), not a localized rank label at all -- the kernel has no per-language rank names to draw one from, so there was no honest value to put there. Nothing consumed it: no template in the plan, no test, no other code referenced it. Removed from both day_value and padding_cell so the two key sets stay identical (23 keys each, verified). schema/day-v1.json already described 23 keys and needed no change -- it now matches the emitted output exactly. schema/day-v1.json is a published contract: once a phone subscribes or a site fetches this, removing a field is a breaking /v2/ change. The time to remove a field that lies about its own contents is before anyone can depend on it, not after. --- lib/render/view.ml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'lib/render') diff --git a/lib/render/view.ml b/lib/render/view.ml index 9f67705..733aa45 100644 --- a/lib/render/view.ml +++ b/lib/render/view.ml @@ -38,7 +38,7 @@ let padding_cell dow = [ ("iso", str ""); ("dom", str ""); ("dow", str (string_of_int dow)); ("in_month", bool false); ("season", str ""); ("week", str ""); ("slug", str ""); - ("name", T.Obj []); ("rank", str ""); ("rank_label", T.Obj []); + ("name", T.Obj []); ("rank", str ""); ("colour", str ""); ("is_white", bool false); ("is_red", bool false); ("is_green", bool false); ("is_violet", bool false); ("is_rose", bool false); ("is_black", bool false); @@ -61,8 +61,12 @@ let day_value ~vocab (d : ('s, 'r) K.Liturgical_day.t) = ("week", str (match tmp.K.Temporal.week with Some w -> string_of_int w | None -> "")); ("slug", str (K.Slug.to_string cel.K.Celebration.slug)); ("name", names_value cel.K.Celebration.names); + (* [rank] is the kernel's own class string ("class-1"); there is + deliberately no separate localized rank label here -- the kernel + has no per-language rank names to draw one from, and a field + whose contents cannot honestly differ from [name] should not + exist just to exist. Do not re-add one until the kernel can. *) ("rank", str (vocab.K.Vocab.rank_to_string cel.K.Celebration.rank)); - ("rank_label", names_value cel.K.Celebration.names); ("colour", str (K.Colour.to_string colour)); ("is_white", is K.Colour.White); ("is_red", is K.Colour.Red); ("is_green", is K.Colour.Green); ("is_violet", is K.Colour.Violet); -- cgit v1.3