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
+50 -6
View File
@@ -1,6 +1,6 @@
import {
BIBLE_BOOKS, BIBLE_TRANSLATIONS, DEVOTIONAL_CSV_COLUMNS, DEVOTIONAL_CSV_TEMPLATE, checkDevotionalCsv, devotionalCsv,
devotionalsReplySchema, findBibleBook, formatBibleReference, parseBibleReference, parseCsv, passageVerseCount, youVersionUrl,
BIBLE_BOOKS, BIBLE_TRANSLATIONS, DEVOTIONAL_CSV_COLUMNS, FREE_BIBLE_TRANSLATION_IDS, FREE_QUOTE_VERSES, DEVOTIONAL_CSV_TEMPLATE, checkDevotionalCsv, devotionalCsv,
devotionalDisclaimer, devotionalsReplySchema, findBibleBook, quotedVerses, formatBibleReference, parseBibleReference, parseCsv, passageVerseCount, youVersionUrl,
type PassageLocation,
} from "../src";
import { sample } from "./helpers";
@@ -33,11 +33,47 @@ describe("Bible books and translations", () => {
expect(findBibleBook("Nowhere")).toBeNull();
});
it("has the seven translations, with unique ids and YouVersion numbers", () => {
expect(BIBLE_TRANSLATIONS.map((t) => t.id)).toEqual(["NLT", "ESV", "NIV", "NKJV", "KJV", "AFR53", "AFR83"]);
expect(new Set(BIBLE_TRANSLATIONS.map((t) => t.youVersionId)).size).toBe(7);
it("has the eight translations, with unique ids and YouVersion numbers", () => {
expect(BIBLE_TRANSLATIONS.map((t) => t.id)).toEqual(["NLT", "ESV", "NIV", "NKJV", "KJV", "AFR53", "AFR83", "BSB"]);
expect(new Set(BIBLE_TRANSLATIONS.map((t) => t.youVersionId)).size).toBe(8);
for (const t of BIBLE_TRANSLATIONS) expect(t.copyright.length).toBeGreaterThan(10);
});
it("carries each publisher's notices, with a publisher to ask for all but the public-domain ones", () => {
expect(FREE_BIBLE_TRANSLATION_IDS).toEqual(["KJV", "BSB"]);
for (const t of BIBLE_TRANSLATIONS) {
const free = FREE_BIBLE_TRANSLATION_IDS.includes(t.id);
expect(t.licence).toBe(free ? "public-domain" : "permission");
expect(t.acknowledgement.length).toBeGreaterThan(t.id === "KJV" ? 10 : 50);
expect(t.publisher === null).toBe(free);
expect(t.permissionsUrl === null).toBe(free);
}
expect(youVersionUrl(ok("John 3:16"), "BSB")).toBe("https://www.bible.com/bible/3034/JHN.3.16.BSB");
expect(BIBLE_TRANSLATIONS.find((t) => t.id === "NLT")!.copyright).toContain("Tyndale House Ministries");
expect(BIBLE_TRANSLATIONS.find((t) => t.id === "ESV")!.copyright).toContain("ESV Text Edition: 2025");
expect(FREE_QUOTE_VERSES).toBe(500);
});
it("gives the Bible Society's translations their disclaimer and official names", () => {
for (const t of BIBLE_TRANSLATIONS) {
expect(t.disclaimer !== null).toBe(t.language === "af");
expect(t.acknowledgement).not.toMatch(/Ou Vertaling|Nuwe Vertaling/);
}
expect(devotionalDisclaimer({ translation: "AFR83" })).toContain("Bybelgenootskap van Suid-Afrika verklaar");
expect(devotionalDisclaimer({ translation: "NIV" })).toBeNull();
expect(BIBLE_TRANSLATIONS.find((t) => t.id === "AFR83")!.copyright).toContain("1983-vertaling met herformulerings tot en met 1992");
});
it("counts the verses quoted per translation, passages across chapters apart", () => {
const r = quotedVerses([
{ location: ok("John 3:16-18"), translation: "NIV" },
{ location: ok("Ps 23:1-6"), translation: "NIV" },
{ location: ok("Rom 8:38-9:2"), translation: "NIV" },
{ location: ok("Gen 1:1"), translation: "KJV" },
]);
expect(r.verses).toEqual({ NIV: 9, KJV: 1 });
expect(r.uncounted).toEqual({ NIV: 1 });
});
});
describe("parseBibleReference", () => {
@@ -118,7 +154,15 @@ describe("checkDevotionalCsv", () => {
expect(r.fileError).toBeNull();
expect(r.rows).toHaveLength(1);
expect(r.rows[0]!.errors).toEqual([]);
expect(r.rows[0]!.devotional?.passage).toMatchObject({ reference: "1 Corinthians 13:4–7", translation: "NLT" });
expect(r.rows[0]!.devotional?.passage).toMatchObject({ reference: "1 Corinthians 13:4–7", translation: "BSB" });
expect(checkDevotionalCsv(DEVOTIONAL_CSV_TEMPLATE, { translations: FREE_BIBLE_TRANSLATION_IDS }).rows[0]!.errors).toEqual([]);
});
it("refuses a translation that isn't allowed, naming the publisher to ask", () => {
const r = checkDevotionalCsv(devotionalCsv([row({ translation: "NIV" }), row({ date: "2027-01-06", translation: "kjv" })]), { translations: FREE_BIBLE_TRANSLATION_IDS });
expect(r.rows[0]!.devotional).toBeNull();
expect(r.rows[0]!.errors).toEqual([{ column: "translation", message: "NIV needs Biblica, Inc.'s permission; use KJV or BSB" }]);
expect(r.rows[1]!.devotional?.passage.translation).toBe("KJV");
});
it("turns a good row into a devotional, in the translation's language, empty optional fields null", () => {