Annotate Matins octave readings with their occasion too
The octave-reading branch never called withOccasion/occasionName at
all, so an active octave's own reading always showed a bare source
even when pooled alongside other content on the same day -- the same
missing-annotation gap just fixed for plain-Sunday and saint/temporal
readings, in a fourth branch that predates that helper. octave-readings'
source is bilingual ({la, en}), unlike nocturn-readings' plain string,
so the occasion suffix is appended to both language slots directly
rather than routed through withOccasion itself.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01T6rG4RTNqLFYcyjbCGkPFs
This commit is contained in:
+13
-1
@@ -984,10 +984,22 @@ function buildReadingPool(day: LiturgicalDay, temporalId: string, date: string,
|
|||||||
for (const octave of activeOctavesFor(date)) {
|
for (const octave of activeOctavesFor(date)) {
|
||||||
const reading = getOctaveReading(octave.id, octave.dayNumber);
|
const reading = getOctaveReading(octave.id, octave.dayNumber);
|
||||||
if (reading) {
|
if (reading) {
|
||||||
|
// Unlike nocturn-readings' `source` (a plain, non-bilingual string —
|
||||||
|
// see `withOccasion`'s own doc comment), an octave reading's `source`
|
||||||
|
// is itself `{la, en}` (2026-08 fix). The occasion name is still a
|
||||||
|
// single plain string either way, so it's appended to both language
|
||||||
|
// slots rather than routed through `withOccasion`.
|
||||||
|
const occasion = occasionName(octave.id, day);
|
||||||
|
const label = occasion
|
||||||
|
? {
|
||||||
|
la: reading.source.la ? `${reading.source.la} (for ${occasion})` : reading.source.la,
|
||||||
|
en: reading.source.en ? `${reading.source.en} (for ${occasion})` : reading.source.en,
|
||||||
|
}
|
||||||
|
: reading.source;
|
||||||
parts.push({
|
parts.push({
|
||||||
kind: 'lesson',
|
kind: 'lesson',
|
||||||
text: { text: reading.text, status: reading.status },
|
text: { text: reading.text, status: reading.status },
|
||||||
label: reading.source,
|
label,
|
||||||
responsory: reading.responsory
|
responsory: reading.responsory
|
||||||
? { text: reading.responsory, status: { la: 'verified', en: 'verified' } }
|
? { text: reading.responsory, status: { la: 'verified', en: 'verified' } }
|
||||||
: undefined,
|
: undefined,
|
||||||
|
|||||||
Reference in New Issue
Block a user