diff --git a/internal/check-poster-prints.mjs b/internal/check-poster-prints.mjs index c3f15377a..e5962470e 100644 --- a/internal/check-poster-prints.mjs +++ b/internal/check-poster-prints.mjs @@ -128,7 +128,14 @@ const r = await pg.evaluate(async ({ src, frame, packetRender, cardRender, qr, s out.packetSheets = pdoc.querySelectorAll('.sheet').length out.packetCards = pdoc.querySelectorAll('.card').length out.packetWheel = pdoc.querySelectorAll('svg path[fill^="hsl"]').length - out.packetMark5 = /Gadarenes/.test(pdoc.body.innerText) + // ⚠ NOT /Gadarenes/. That is an ENGLISH proper noun from the World English Bible + // text, so this assertion would go RED on a CORRECTLY TRANSLATED packet and passes + // today only because point4_passage is still English in all ten non-English blocks + // (DECIDE-MARK5-SCRIPTURE-IS-ENGLISH-IN-EVERY-TRANSLATED-PACKET). The check and the + // bug were locked together — the same fix already applied in check-packet-render + // and check-packet-browser. Assert the passage BLOCK and its length, which holds in + // any language. + out.packetMark5Len = (pdoc.querySelector('.p4-passage') || { textContent: '' }).textContent.trim().length // ── without a provider: must FAIL HONESTLY, not throw ──────────────────── const noProv = usePosterPrints({ label: (i) => i.label }) @@ -155,13 +162,19 @@ if (!/no records provider/i.test(r.noProvMsg)) { if (r.packetSheets !== 4) fails.push(`the packet printed ${r.packetSheets} sheets, expected 4`) if (r.packetCards !== 2) fails.push(`the packet printed ${r.packetCards} people cards, expected 2`) if (r.packetWheel !== 12) fails.push(`the prayer wheel has ${r.packetWheel} segments, expected 12`) -if (!r.packetMark5) fails.push('the packet is missing Mark 5:1-20 in full') +// The English passage is 2,141 chars; 1,200 is a floor no truncation or placeholder +// survives, with room for languages that render the same text more compactly. +if (r.packetMark5Len < 1200) { + fails.push(r.packetMark5Len === 0 + ? 'the packet is missing Mark 5:1-20 in full (no .p4-passage block)' + : `Mark 5:1-20 looks truncated: ${r.packetMark5Len} chars`) +} if (errs.length) fails.push(`${errs.length} page error(s): ${errs[0]}`) console.log(` list print : ${r.listRows} rows, checkbox=${r.listHasCheckbox}`) console.log(` without provider : phase=${r.noProvPhase} "${r.noProvMsg.slice(0, 60)}"`) console.log(` packet : ${r.packetSheets} sheets, ${r.packetCards} cards, ` - + `${r.packetWheel} wheel segments, Mark5=${r.packetMark5}`) + + `${r.packetWheel} wheel segments, Mark5=${r.packetMark5Len} chars`) console.log(` page errors : ${errs.length}`) if (fails.length) {