Replace generic "Reading"/"Gospel" headings with real incipits
Deploy / deploy (push) Successful in 1m50s
Deploy / deploy (push) Successful in 1m50s
Bible-plan readings now carry a generated bilingual incipit label (bible-book-incipits.ts) instead of falling through to the UI's generic "Reading" heading. Gospel pericopes (whether from the user's own plan or nocturn-readings.ts's proper content) get the same treatment via a new label field on the 'gospel' ResolvedPart, recovering the book from the reading's own citation when no raw book code is available. Updates 3 matins.test.ts assertions that used "no label" as a stand-in for "this is a bible-plan reading" — no longer true now that these readings carry a real label, so they now key off the label's shape (string = patristic attribution, object = generated incipit) instead. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AGjUyhUZJaSjiniEmnLdak
This commit is contained in:
+6
-2
@@ -92,6 +92,7 @@ import { getSaintRecord } from '../calendar/feasts';
|
||||
import { getBiblePlanReadings } from '../propers/bible-plan';
|
||||
import { getNocturnReadings, type NocturnReading } from '../propers/nocturn-readings';
|
||||
import { getOctaveReading } from '../propers/octave-readings';
|
||||
import { getGospelIncipitFromCitation } from '../propers/bible-book-incipits';
|
||||
import { getMatinsSaintOverride, getMatinsCommonOverride, type MatinsPsalmodyScheme } from './matins-psalmody-overrides';
|
||||
import matinsSundayAntiphonsData from '../data/hours/matins-sunday-antiphons.yml';
|
||||
import matinsSundayNocturn3OverridesData from '../data/hours/matins-sunday-nocturn3-overrides.yml';
|
||||
@@ -683,10 +684,12 @@ function nocturnReadingPart(r: NocturnReading): ResolvedPart {
|
||||
* whereas two adjacent pool entries could be (and, before this, sometimes
|
||||
* were). */
|
||||
function gospelReadingPart(r: NocturnReading, homily: NocturnReading | undefined): ResolvedPart {
|
||||
const incipit = getGospelIncipitFromCitation(r.citation);
|
||||
return {
|
||||
kind: 'gospel',
|
||||
text: { text: r.text, status: r.status, citation: r.citation },
|
||||
source: r.source,
|
||||
label: incipit ? { la: incipit.la, en: incipit.en } : undefined,
|
||||
responsory: r.responsory ? { text: r.responsory, status: { la: 'verified', en: 'verified' } } : undefined,
|
||||
homily: homily
|
||||
? { source: homily.source, text: { text: homily.text, status: homily.status, citation: homily.citation } }
|
||||
@@ -717,10 +720,11 @@ function buildReadingPool(day: LiturgicalDay, temporalId: string, date: string,
|
||||
// this file's own header) — a bare pericope, still its own 'gospel'
|
||||
// kind so it gets the same distinguishing UI treatment as a proper
|
||||
// Gospel+homily.
|
||||
const label = r.label ? { la: r.label.la ?? '', en: r.label.en ?? '' } : undefined;
|
||||
parts.push(
|
||||
r.isGospel
|
||||
? { kind: 'gospel', text: { text: r.text, status: r.status, citation: r.citation }, responsory }
|
||||
: { kind: 'lesson', text: { text: r.text, status: r.status, citation: r.citation }, responsory },
|
||||
? { kind: 'gospel', text: { text: r.text, status: r.status, citation: r.citation }, responsory, label }
|
||||
: { kind: 'lesson', text: { text: r.text, status: r.status, citation: r.citation }, responsory, label },
|
||||
);
|
||||
}
|
||||
// Grouped by the reading's own `nocturn` tag (ascending), not by which id
|
||||
|
||||
Reference in New Issue
Block a user