contracts 1.22.0: only free Bible translations in App 1.0, the publishers' notices

- Each translation has a licence; FREE_BIBLE_TRANSLATION_IDS (KJV and the new
  Berean Standard Bible) is what the Hub and App 1.0 offer, and the CSV import
  refuses any other when told to, naming the publisher to ask.
- The publishers' exact notices (NLT, ESV, AFR53, AFR83 corrected), an
  acknowledgement per translation, the Bible Society's disclaimer, publisher
  and permissionsUrl, FREE_QUOTE_VERSES and quotedVerses. AFR83 is named
  "Afrikaans 1983/1992-vertaling".
- docs/BIBLE-PERMISSIONS.md: what each publisher allows, the status and the
  drafted permission requests. APP-1.0-PLAN decision 14, HANDOVER (with the
  Website 1.8.0 approach), VERSIONS, CHANGELOG.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-30 13:48:38 +02:00
co-authored by Claude Opus 5.5
parent dfd7278f7b
commit 2eef8d1da3
17 changed files with 565 additions and 74 deletions
+32 -3
View File
@@ -83,6 +83,30 @@ export function devotionalCopyright(passage: Pick<DevotionalPassage, "translatio
return bibleTranslation(passage.translation).copyright;
}
/** The publisher's disclaimer shown with the copyright line, or null (Bible Society translations only). */
export function devotionalDisclaimer(passage: Pick<DevotionalPassage, "translation">): string | null {
return bibleTranslation(passage.translation).disclaimer;
}
/**
* Verses quoted per translation, for the free allowance (`FREE_QUOTE_VERSES`, counted across the
* whole App). A passage across chapters can't be counted (verse counts per chapter aren't kept)
* and goes in `uncounted`, so a warning can say the total is at least this.
*/
export function quotedVerses(passages: readonly Pick<DevotionalPassage, "location" | "translation">[]): {
verses: Partial<Record<BibleTranslationId, number>>;
uncounted: Partial<Record<BibleTranslationId, number>>;
} {
const verses: Partial<Record<BibleTranslationId, number>> = {};
const uncounted: Partial<Record<BibleTranslationId, number>> = {};
for (const p of passages) {
const n = passageVerseCount(p.location);
if (n === null) uncounted[p.translation] = (uncounted[p.translation] ?? 0) + 1;
else verses[p.translation] = (verses[p.translation] ?? 0) + n;
}
return { verses, uncounted };
}
// ─── CSV import ──────────────────────────────────────────────────────────────
/** The columns, in this order in the template. A file may order them differently. */
@@ -158,6 +182,8 @@ export interface DevotionalCsvOptions {
taken?: Iterable<string>;
/** The last date allowed (the Hub: 3 months from today). Later dates are errors. */
latestDate?: string;
/** The translations allowed (the Hub and App 1.0: `FREE_BIBLE_TRANSLATION_IDS`). Any by default. */
translations?: readonly BibleTranslationId[];
}
/**
@@ -211,7 +237,10 @@ export function checkDevotionalCsv(text: string, options: DevotionalCsvOptions =
const translationText = required("translation", "The translation");
const translation = BIBLE_TRANSLATION_IDS.find((id) => id === translationText.toUpperCase().replace(/\s/g, "")) as BibleTranslationId | undefined;
if (translationText && !translation) errors.push({ column: "translation", message: `"${translationText}" isn't one of ${BIBLE_TRANSLATION_IDS.join(", ")}` });
if (translationText && !translation) errors.push({ column: "translation", message: `"${translationText}" isn't one of ${(options.translations ?? BIBLE_TRANSLATION_IDS).join(", ")}` });
else if (translation && options.translations && !options.translations.includes(translation)) {
errors.push({ column: "translation", message: `${translation} needs ${bibleTranslation(translation).publisher ?? "the publisher"}'s permission; use ${options.translations.join(" or ")}` });
}
const reference = required("passage", "The passage");
const parsed = reference ? parseBibleReference(reference) : null;
@@ -265,8 +294,8 @@ export const DEVOTIONAL_CSV_TEMPLATE = devotionalCsv([{
date: "2027-01-05",
title: "Love that never gives up",
passage: "1 Corinthians 13:4-7",
translation: "NLT",
passage_text: "Love is patient and kind. Love is not jealous or boastful or proud or rude. It does not demand its own way. It is not irritable, and it keeps no record of being wronged. It does not rejoice about injustice but rejoices whenever the truth wins out. Love never gives up, never loses faith, is always hopeful, and endures through every circumstance.",
translation: "BSB",
passage_text: "Love is patient, love is kind. It does not envy, it does not boast, it is not proud. It is not rude, it is not self-seeking, it is not easily angered, it keeps no account of wrongs. Love takes no pleasure in evil, but rejoices in the truth. It bears all things, believes all things, hopes all things, endures all things.",
body: "Paul wrote these words to a church that was proud of its gifts...\n\nA second paragraph after a blank line.",
prayer: "Lord, teach me to love the way you love me.",
author: "Cross Code",