Add name-template substitution for Common-of-a-Holy-Woman's invitatory antiphon
Deploy / deploy (push) Successful in 1m20s

Commune/C7's own invitatory antiphon ("Laudémus Deum nostrum * In
confessióne beátæ N..") needs a per-saint genitive-singular name, unlike
every other Common invitatory antiphon currently authored. Exports
resolve-common.ts's existing substituteName helper (previously only used
by getDayCollect for collectCommon/collectName) and wires it into
resolveMatinsInvitatoryText via a new SaintRecord.invitatoryName field
-- kept separate from collectName since the two templates' {N}
placeholders don't always need the same grammatical case. Fills in real
declined names for the 3 saints using common-of-a-holy-woman (Anne,
Martha, Mary Magdalene).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012AVXS5iTrk3c2anSYVGwxS
This commit is contained in:
2026-08-27 09:26:22 -04:00
parent f55cd46272
commit 366ada1b26
8 changed files with 74 additions and 8 deletions
+9 -2
View File
@@ -79,6 +79,7 @@ import {
verifiedText,
splitNamedAntiphon,
openingAntiphon,
substituteName,
} from './resolve-common';
import { getSaintRecord } from '../calendar/feasts';
import { getBiblePlanReadings } from '../propers/bible-plan';
@@ -193,11 +194,17 @@ function resolveMatinsInvitatoryText(day: LiturgicalDay): ResolvedText {
}
}
const winner = resolveOfficeWinner(day);
const commonId = winner.kind === 'sanctoral' ? getSaintRecord(winner.id)?.common : undefined;
const saint = winner.kind === 'sanctoral' ? getSaintRecord(winner.id) : undefined;
const commonId = saint?.common;
if (commonId) {
const common = resolveCommon(`matins-invitatory-${commonId}`);
if (common.status.la !== 'missing' || common.status.en !== 'missing') {
return common;
// Common-of-a-Holy-Woman's own invitatory antiphon is a name
// template ("beátæ N..") -- the only Common invitatory antiphon
// currently in use that needs one (see matins-invitatory-common-
// of-a-holy-woman.yml's own header). Same substituteName idiom
// getDayCollect already uses for collectCommon/collectName.
return saint?.invitatoryName ? substituteName(common, saint.invitatoryName) : common;
}
}
const seasonSuffix = seasonalOfficeSuffix(day.season);