Skip to content

912 make a new bible text swap feature for biblica global publishing - #1157

Open
Fikitti wants to merge 10 commits into
mainfrom
912-make-a-new-bible-text-swap-feature-for-biblica-global-publishing
Open

912 make a new bible text swap feature for biblica global publishing#1157
Fikitti wants to merge 10 commits into
mainfrom
912-make-a-new-bible-text-swap-feature-for-biblica-global-publishing

Conversation

@Fikitti

@Fikitti Fikitti commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Biblica Bible Swap Feature

Format:
912-make-a-new-bible-text-swap-feature-for-biblica-global-publishing

Summary

Closes #912

Adds an optional Bible Swap step to Biblica round-trip export: after notes are rebuilt into the Study IDML, verse text can be replaced from a translated Bible IDML while study notes, InDesign structure, and styling stay in place.

###Swap modes
Surgical — replace only prose inside Study character/paragraph ranges (study layout stays English-shaped).
Structure — replace each study chapter text span with the matching Bible paragraph XML so translated poetry, speaker labels, and chapter-boundary p_dc1/p_dc2 styling come from the Bible file.

###Export UI (Biblica only)
Pick Surgical vs Structure, choose a language, attach a Bible IDML, then see a compatibility report before export: book/chapter/verse overlap, projected match %, and versification changes (replace / remove / insert, including Psalms).

###Languages and mappings
Shipped precomputed versification plans ({language}/{VOLUME}.mapping.json) for the six study volumes (GEN–DEU through ACT–REV):

  • Portuguese, Russian, French, Hindi, Marathi, Arabic — mappings applied at export instead of re-deriving the plan
  • Ukrainian — NT mappings present but currently fall back to analyze-at-export
  • Any — derive the plan from the selected Bible file at export time

Per-language strategies pick preferred mode, force Structure on heavy volumes (e.g. JOB–SNG for Russian/French/Marathi), and apply known plan patches (e.g. Portuguese HAB 3).

###Versification
Aligns study vs Bible by book/chapter/verse, including Psalms (superscriptions as v1, extra Bible verses inserted, study-only verses removed, chapter remaps). Handles split chapters, boundary bleed, and insert-only heading chapters.

Test Checklist

  • go to export biblica study bible notes file
  • you should see optional selection of bible swap, where you select language and file
  • you can wait until compatibility analysis is complete or go export right away
  • open the exported file and see if the bible text was exported correctly
  • you can sent to Martin, he has validator tools for that

@Fikitti
Fikitti requested a review from LeviXIII September 1, 2026 10:04
@Fikitti Fikitti linked an issue Sep 1, 2026 that may be closed by this pull request
3 tasks
…lica-global-publishing

Resolve conflicts:
- exportHandler.ts: keep `options` (used for Bible Swap) alongside main's new
  `roundTrip` context parameter; adopt main's timestamp-free export file
  naming while preserving the `_bible-swap` suffix when a swap was applied.
- biblicaExporter.ts: keep the Bible Swap story-application code appended on
  this branch and main's trailing newline at end of file.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Make a new Bible Text Swap feature for Biblica Global Publishing

2 participants