Compare commits
13 commits
main
...
reg-post/b
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9a435c9967 | ||
|
|
fa5721deb0 | ||
|
|
40ac08abd0 | ||
|
|
525b306f2c | ||
|
|
0e5b1626af | ||
|
|
617bd1fca6 | ||
|
|
5eabfa2346 | ||
|
|
db3931165b | ||
|
|
e74671b7ab | ||
|
|
3601e75c91 | ||
|
|
88485be7ed | ||
|
|
b7d7b6306a | ||
|
|
1954f2b589 |
4 changed files with 102 additions and 6 deletions
|
|
@ -71,6 +71,7 @@ import { ISO3_NAME } from '@map/data/iso3-name.js'
|
|||
import seriesJson from '@map/scripts/posters/series.json'
|
||||
import { generatePoster, BLESSING } from './src/generate.js'
|
||||
import { loadBoundaries } from './src/boundaries.js'
|
||||
import FOOTER_VERSES from './src/footer-verses.json'
|
||||
|
||||
// The host (a shell, or a plain embed) passes profile-config; the shells (Posterverse, the Research
|
||||
// Gallery) write an ABSOLUTE assetsBase + treeBase into it. resolveAssetsBase reads that, else falls
|
||||
|
|
@ -97,6 +98,12 @@ const lang = String(parsedConfig.locale || parsedConfig.lang || urlLang || docLa
|
|||
const EN = (LOCALE_MSGS[msgPath('en')] || {}).default || {}
|
||||
const MSGS = (LOCALE_MSGS[msgPath(lang)] || {}).default || EN
|
||||
const dir = ['ar', 'he', 'fa', 'ur', 'ps', 'sd', 'yi'].includes(lang) ? 'rtl' : 'ltr'
|
||||
// The footer verse (Numbers 6:24-26) in the reader's language, STRICT public domain only (bible.helloao.org
|
||||
// / ebible.org PD translations). Falls back to the English PD blessing (WEB British) where there's no
|
||||
// strict-PD text yet (en, and ro/hi until sourced). The header is a phrase; this is scripture — hence PD-gated.
|
||||
const localFooter = FOOTER_VERSES[lang]
|
||||
? { text: FOOTER_VERSES[lang].text, ref: FOOTER_VERSES[lang].ref, dir: FOOTER_VERSES[lang].dir || 'ltr' }
|
||||
: BLESSING.footer
|
||||
const nf = (() => { try { return new Intl.NumberFormat(lang) } catch { return new Intl.NumberFormat('en') } })()
|
||||
const n = (x) => nf.format(Number(x) || 0)
|
||||
const t = (key, vars) => {
|
||||
|
|
@ -128,9 +135,9 @@ async function build() {
|
|||
])
|
||||
const { html, svg, stats: s, count } = await generatePoster({
|
||||
records, ...boundaries, seriesDef, iso3Name: ISO3_NAME, format: '60x96c4b',
|
||||
// The poster's own header is a phrase (not scripture), so localize it to the reader's language;
|
||||
// the footer verse stays the English PD blessing until the per-locale strict-PD sourcing lands.
|
||||
blessing: { ...BLESSING, header: t('posterHeader') },
|
||||
// The poster's own header is a phrase, localized to the reader's language; the footer is scripture,
|
||||
// localized only to a STRICT public-domain translation (else the English PD blessing). See localFooter.
|
||||
blessing: { ...BLESSING, header: t('posterHeader'), footer: localFooter },
|
||||
})
|
||||
posterHtml.value = html
|
||||
stats.value = s
|
||||
|
|
|
|||
71
plugin-designs/bless-india-posters/src/footer-verses.json
Normal file
71
plugin-designs/bless-india-posters/src/footer-verses.json
Normal file
|
|
@ -0,0 +1,71 @@
|
|||
{
|
||||
"_meta": {
|
||||
"reference": "Numbers 6:24-26",
|
||||
"source": "verbatim strict public-domain translations (ebible.org via bible.helloao.org)",
|
||||
"display_normalizations": "display-only, no word or vowel change: ru sentence-initial capital; zh remove the ASCII space after the full stop between verses; pt drop mismatched outer quotes; ar alef-wasla to plain alef; ar ref uses Arabic-Indic digits + RLM after colon + en dash (matches the UPG-100 packet); ar verse quotes are « » guillemets"
|
||||
},
|
||||
"es": {
|
||||
"text": "Jehová te bendiga, y te guarde: Haga resplandecer Jehová su rostro sobre ti, y haya de ti misericordia: Jehová alce á ti su rostro, y ponga en ti paz.",
|
||||
"ref": "Números 6:24-26",
|
||||
"dir": "ltr",
|
||||
"translation": "Reina-Valera 1909",
|
||||
"licence": "public domain",
|
||||
"source": "ebible.org (via bible.helloao.org)"
|
||||
},
|
||||
"fr": {
|
||||
"text": "L'Éternel te bénisse et te garde! L'Éternel fasse luire sa face sur toi et te fasse grâce! L'Éternel tourne sa face vers toi et te donne la paix!",
|
||||
"ref": "Nombres 6:24-26",
|
||||
"dir": "ltr",
|
||||
"translation": "French Ostervald Bible",
|
||||
"licence": "public domain",
|
||||
"source": "ebible.org (via bible.helloao.org)"
|
||||
},
|
||||
"pt": {
|
||||
"text": "Yahweh te abençoe, e te guarde. Yahweh faz o seu rosto para brilhar em você, e seja gracioso com você. Yahweh levanta o rosto na sua direção, e lhe dar paz.",
|
||||
"ref": "Números 6:24-26",
|
||||
"dir": "ltr",
|
||||
"translation": "World Portuguese Bible",
|
||||
"licence": "public domain",
|
||||
"source": "ebible.org (via bible.helloao.org)"
|
||||
},
|
||||
"de": {
|
||||
"text": "Der HERR segne dich und behüte dich; der HERR lasse sein Angesicht leuchten über dir und sei dir gnädig; der HERR hebe sein Angesicht über dich und gebe dir Frieden.",
|
||||
"ref": "4. Mose 6:24-26",
|
||||
"dir": "ltr",
|
||||
"translation": "German Luther Bible 1912",
|
||||
"licence": "public domain",
|
||||
"source": "ebible.org (via bible.helloao.org)"
|
||||
},
|
||||
"it": {
|
||||
"text": "Il Signore ti benedica e ti guardi. Il Signore faccia risplendere le sua faccia verso te, e ti sia propizio. Alzi il Signore la sua faccia verso te, e ti stabilisca la pace.",
|
||||
"ref": "Numeri 6:24-26",
|
||||
"dir": "ltr",
|
||||
"translation": "Italian Diodati Bible",
|
||||
"licence": "public domain",
|
||||
"source": "ebible.org (via bible.helloao.org)"
|
||||
},
|
||||
"ru": {
|
||||
"text": "Да благословит тебя Господь и сохранит тебя! да призрит на тебя Господь светлым лицем Своим и помилует тебя! да обратит Господь лице Свое на тебя и даст тебе мир!",
|
||||
"ref": "Числа 6:24-26",
|
||||
"dir": "ltr",
|
||||
"translation": "Russian Synodal Bible",
|
||||
"licence": "public domain",
|
||||
"source": "ebible.org (via bible.helloao.org)"
|
||||
},
|
||||
"ar": {
|
||||
"text": "يُبَارِكُكَ الرَّبُّ وَيَحْرُسُكَ. يُضِيءُ الرَّبُّ بِوَجْهِهِ عَلَيْكَ وَيَرْحَمُكَ. يَرْفَعُ الرَّبُّ وَجْهَهُ عَلَيْكَ وَيَمْنَحُكَ سَلَامًا.",
|
||||
"ref": "العدد ٦:٢٤–٢٦",
|
||||
"dir": "rtl",
|
||||
"translation": "Arabic Van Dyck Bible",
|
||||
"licence": "public domain",
|
||||
"source": "ebible.org (via bible.helloao.org)"
|
||||
},
|
||||
"zh": {
|
||||
"text": "『愿耶和华赐福给你,保护你。愿耶和华使他的脸光照你,赐恩给你。愿耶和华向你仰脸,赐你平安。』",
|
||||
"ref": "民数记 6:24-26",
|
||||
"dir": "ltr",
|
||||
"translation": "Chinese Union Version (Simplified)",
|
||||
"licence": "public domain",
|
||||
"source": "ebible.org (via bible.helloao.org)"
|
||||
}
|
||||
}
|
||||
|
|
@ -19,7 +19,7 @@ const INDIA = {
|
|||
export const BLESSING = {
|
||||
header: "Bless India in Jesus' name",
|
||||
footer: {
|
||||
text: 'The LORD bless you, and keep you. The LORD make his face to shine on you, and be gracious to you. The LORD lift up his face toward you, and give you peace.',
|
||||
text: 'The LORD bless you, and keep you. The LORD make his face to shine on you, and be gracious to you. The LORD lift up his face towards you, and give you peace.',
|
||||
ref: 'Numbers 6:24-26',
|
||||
},
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2554,6 +2554,19 @@ async function renderPoster(zone, pins, zoneFC) {
|
|||
while (H1_SIZE > H1_MIN && textW(h1Text, H1_SIZE) * H1_SERIF_BOLD > h1Room) H1_SIZE -= 0.5;
|
||||
|
||||
const verse = verseFor(zone);
|
||||
// Footer verse direction + quoting. Honour an RTL verse (footer-verses.json "dir":"rtl") with
|
||||
// direction=rtl + unicode-bidi so the Arabic reads right→left (verse 24 first), and isolate the
|
||||
// reference in FSI…PDI (U+2068…U+2069) so its "6:24-26" stays left-to-right. Skip our own curly
|
||||
// quotes when the text already opens with a quote/bracket (e.g. the Chinese Union Version's 『…』),
|
||||
// so it is not double-quoted.
|
||||
const vRtl = !!(verse && verse.dir === 'rtl');
|
||||
const vBracketed = /^[『「«“‘"']/.test(String((verse && verse.text) || ''));
|
||||
// Quote marks: Latin curly “ ” for LTR; Arabic guillemets « » for RTL verses (the Arabic convention,
|
||||
// and it matches the UPG-100 packet). None when the text already opens with its own quote/bracket.
|
||||
const vqOpen = vBracketed ? '' : (vRtl ? '«' : '“');
|
||||
const vqClose = vBracketed ? '' : (vRtl ? '»' : '”');
|
||||
const vTextAttrs = vRtl ? ' direction="rtl" style="unicode-bidi:embed;"' : '';
|
||||
const vRef = vRtl ? `${esc(verse.ref)}` : esc(verse.ref);
|
||||
// ── OSM STREET BASEMAP (city sheets only) ────────────────────────────────
|
||||
// A city sheet at ~9km needs STREETS; the ADM0/ADM1 polygon fill this template
|
||||
// draws has none, which is why the first 176 city posters shipped as blank
|
||||
|
|
@ -2695,7 +2708,7 @@ async function renderPoster(zone, pins, zoneFC) {
|
|||
whole thing reads as ONE centred line. It was left-aligned with the ref
|
||||
pushed to the right margin, which split it into two objects at opposite
|
||||
ends of the sheet rather than one closing statement. -->
|
||||
<text x="${PW / 2}" y="${VERSE_RULE_Y + 30}" text-anchor="middle" class="verse">“${esc(verse.text)}”<tspan class="vref"> ${esc(verse.ref)}</tspan></text>`}
|
||||
<text x="${PW / 2}" y="${VERSE_RULE_Y + 30}" text-anchor="middle"${vTextAttrs} class="verse">${vqOpen}${esc(verse.text)}${vqClose}<tspan class="vref"> ${vRef}</tspan></text>`}
|
||||
<!-- GENERATION DATE, bottom-left. Deliberately NO hard counts of the global
|
||||
unengaged total on this poster: that number changes as research updates, and
|
||||
a printed figure would silently go stale on a wall. What CAN be stated
|
||||
|
|
@ -2946,7 +2959,12 @@ async function renderPoster(zone, pins, zoneFC) {
|
|||
/* "Start with Prayer!" — the call to action above the three networks. */
|
||||
.hcta{font-family:Georgia,'Times New Roman',serif;font-size:21px;font-weight:700;
|
||||
fill:#3f3a2e;letter-spacing:.06em;font-variant:small-caps}
|
||||
.verse{font-family:Georgia,'Times New Roman',serif;font-style:italic;font-size:23px;font-weight:700;fill:#2A2721}
|
||||
/* 21px, not 23: the footer verse is one centred line and the blessing is now
|
||||
localized to each reader's language. The longest strict-PD translations (ru/de/it)
|
||||
run wider than the English; measured against the 2500px sheet (budget ~2408px
|
||||
inside the edge), 23px overflowed ru (2488px). 21px fits every locale with margin
|
||||
(widest ru 2284px) and still carries display weight at wall scale. */
|
||||
.verse{font-family:Georgia,'Times New Roman',serif;font-style:italic;font-size:21px;font-weight:700;fill:#2A2721}
|
||||
.vref{font-family:'Segoe UI',system-ui,sans-serif;font-size:13px;font-weight:700;fill:#6B4A78;letter-spacing:.14em;text-transform:uppercase}
|
||||
.attrib{font-family:'Segoe UI',system-ui,sans-serif;font-size:9px;fill:#8d857a;letter-spacing:.02em}
|
||||
/* Haloed so the credits stay legible wherever they land on the map. */
|
||||
|
|
|
|||
Loading…
Reference in a new issue