vanuatu/viewer/localization
2026-11-03 15:19:32 +00:00
..
da.json Add compact export reference and concise goods tooltips 2026-11-03 15:19:32 +00:00
de.json Add compact export reference and concise goods tooltips 2026-11-03 15:19:32 +00:00
el.json Add compact export reference and concise goods tooltips 2026-11-03 15:19:32 +00:00
en.json Add compact export reference and concise goods tooltips 2026-11-03 15:19:32 +00:00
fa.json Add compact export reference and concise goods tooltips 2026-11-03 15:19:32 +00:00
fr.json Add compact export reference and concise goods tooltips 2026-11-03 15:19:32 +00:00
hi.json Add compact export reference and concise goods tooltips 2026-11-03 15:19:32 +00:00
index.d.ts Serve languages and artwork separately with compressed viewer releases 2026-09-30 00:28:35 +02:00
index.js Serve languages and artwork separately with compressed viewer releases 2026-09-30 00:28:35 +02:00
it.json Add compact export reference and concise goods tooltips 2026-11-03 15:19:32 +00:00
ko.json Add compact export reference and concise goods tooltips 2026-11-03 15:19:32 +00:00
nl.json Add compact export reference and concise goods tooltips 2026-11-03 15:19:32 +00:00
pl.json Add compact export reference and concise goods tooltips 2026-11-03 15:19:32 +00:00
pt-BR.json Add compact export reference and concise goods tooltips 2026-11-03 15:19:32 +00:00
README.md Add Persian viewer and tutorial translations 2026-09-27 00:53:03 +02:00
ro.json Add compact export reference and concise goods tooltips 2026-11-03 15:19:32 +00:00
rtl.css Explain marker planning and action outcomes in the journal 2026-09-27 22:21:24 +02:00
ru.json Add compact export reference and concise goods tooltips 2026-11-03 15:19:32 +00:00
runtime.js Add manually authored Simplified Chinese UI and tutorials 2026-10-20 14:20:50 +02:00
vi.json Add compact export reference and concise goods tooltips 2026-11-03 15:19:32 +00:00
zh-CN.json Add compact export reference and concise goods tooltips 2026-11-03 15:19:32 +00:00
zh-TW.json Add compact export reference and concise goods tooltips 2026-11-03 15:19:32 +00:00

Viewer translations

The viewer follows BGS's shared preferences.locale value. Tutorials receive options.locale. Supported locales match BGS: English, German, French, Polish, Romanian, Greek, Hindi, Russian, Danish, Brazilian Portuguese, Korean, Traditional Chinese, Vietnamese, Italian, Dutch and Persian (fa, including fa-IR).

en.json contains source UI text, including tutorial explanations and engine-generated descriptions rendered by the viewer. The other catalogues use the same keys. {p0}, {p1}, etc. represent dynamic display values: translators may reorder them but must preserve every placeholder. Add or update the corresponding entries in all catalogues when changing source wording. Component names and terminology need game-specific review; translations were initially machine-assisted.

The rendering adapter translates text and accessible labels, including tooltips, without changing state, action identifiers, input values or HTML structure. It remembers source text so a language change is reversible, observes subsequent framework updates, and disconnects on viewer destruction. Player names and chat messages are excluded. translate="no" also excludes any element and its descendants. Keep user-provided content inside excluded elements.

For rich text that is split into icons and spans, call translateText on the complete sentence before splitting it; localize the tokenizer's resource labels too. This preserves sentence grammar. Avoid relying on rendered labels to identify an action—use action IDs or data attributes.

Run node scripts/check-locales.mjs viewer/localization to verify catalogue coverage and placeholders. The viewer's normal build and browser tests should also cover language switching, action controls, translated tutorial progression and narrow layouts. Browser text must remain readable if a translation is missing; English is the fallback.

The standalone Vanuatu preview also accepts ?locale=nl.

Persian translations are authored directly, without a translation API. Scoped RTL styling applies to tutorial prose, dialogs, action labels and journal explanations. The board, SVG coordinates, round track and trade ships keep their original direction. Proper names, selectors and extracted code tokens retain their source spelling. Run node test/persian-browser.mjs after building to check every tutorial walkthrough at phone and desktop widths, plus live locale switching and unchanged board geometry.