Fix nocturn reading occasion labels leaking rank and commemorations
Deploy / deploy (push) Successful in 2m3s

occasionName() fell back to getDayLabel() (the full day-heading builder)
when the temporal day itself won, baking the feast rank and every
commemoration/transfer note into the "(for ...)" annotation. Use
temporalLabel()'s bare ordinal name instead, matching the sanctoral-winner
branch, so the label names only the single occasion that pooled the
reading.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PNMRYZiEbU2NuSfRQUi4uP
This commit is contained in:
2026-09-06 06:28:46 -04:00
parent 8f70a7e5b7
commit f579ba2d2e
+8 -8
View File
@@ -815,8 +815,9 @@ function fallbackHagiographicLabel(id: string): string | undefined {
* comment), or — the most common case in the whole pool — a plain governing * comment), or — the most common case in the whole pool — a plain governing
* Sunday's own temporal-cycle id (`post-pentecost-15`) or its * Sunday's own temporal-cycle id (`post-pentecost-15`) or its
* `month-week-<NNN>` half (see `nocturnReadingIds`'s `temporalKept` block), * `month-week-<NNN>` half (see `nocturnReadingIds`'s `temporalKept` block),
* which falls back to the same `getDayLabel` the day's own heading uses * which falls back to `temporalLabel`'s bare ordinal name (e.g. "The 14th
* (e.g. "The 14th Sunday after Trinity"). Used to annotate an authored * Sunday after Trinity" — no rank, no commemorations; that's the day
* heading's job, not this annotation's). Used to annotate an authored
* patristic `source` with *why* it's here, since a single day can pool * patristic `source` with *why* it's here, since a single day can pool
* several ids' worth of readings (e.g. a commemorated Ember day's own * several ids' worth of readings (e.g. a commemorated Ember day's own
* Gospel homily alongside the winning saint's own) and a bare "Pope St. * Gospel homily alongside the winning saint's own) and a bare "Pope St.
@@ -827,12 +828,11 @@ function occasionName(id: string, day: LiturgicalDay): string | undefined {
if (named) return named; if (named) return named;
const monthWeek = monthWeekId(day.date); const monthWeek = monthWeekId(day.date);
if (id === resolveTemporalId(day.date) || (monthWeek && id === `month-week-${monthWeek}`)) { if (id === resolveTemporalId(day.date) || (monthWeek && id === `month-week-${monthWeek}`)) {
// When a saint (not the temporal day itself) won the day, name the // Always the bare Sunday/feria name — never `getDayLabel`, which bakes
// plain Sunday/feria only — `getDayLabel`'s own text is winner-centric // in the day's rank and every commemoration/transfer note. This
// (the winning saint's full name + rank), which would otherwise get // annotation names the single occasion that pooled this one reading,
// pointlessly repeated back into its own "(for ...)" annotation, since // not the whole day's heading.
// the winner's name is already shown elsewhere as the day's heading. return temporalLabel(day).en;
return day.winner.kind === 'sanctoral' ? temporalLabel(day).en : getDayLabel(day).en;
} }
return undefined; return undefined;
} }