tinyworld-i18n
Installation
SKILL.md
TinyWorld i18n workflow
TinyWorld localizes its gameplay UI into English (en), French (fr), Simplified
Chinese (zh), and Spanish (es). This skill is the repeatable process for keeping
those translations complete and consistent. There is no external API: you (Codex) are
the translator. The checker (npm run i18n:check) is the safety net.
Read docs/i18n.md first if you need the architecture. The short version:
- Locale dictionaries live in
engine/i18n/{en,fr,es,zh}.jsas flat key→string maps. en.jsis authoritative. Every other locale must define exactly its key set.- Static HTML uses
data-i18n/data-i18n-title/data-i18n-tooltip/data-i18n-placeholder/data-i18n-aria-labelattributes. - JS uses the global
t('key')(ortx('key', fallback)to keep a hard-coded English default). Tool/group/variant labels are localized by a single mutation block near the top ofengine/world/19-tools-toolbar.js. - Language switching is reload-on-switch (persist +
location.reload()), so every surface re-renders correctly at boot. Don't add live re-render wiring.