This document defines the scope and executable rules for i18n translation quality in this repo. Downstream scripts and review checklists should follow this document as the source of truth.
Must-translate scope (at least):
settings (split settings messages under messages/<locale>/settings/)dashboard (messages/<locale>/dashboard.json)myUsage (messages/<locale>/myUsage.json)Locales: zh-CN is canonical. Other supported locales: en, ja, ru, zh-TW.
For any non-canonical locale:
zh-CN leaf string at the same key path, and the zh-CN value contains Han characters, it is treated as a placeholder candidate.Executable check:
bun run i18n:audit-placeholders--fail.
bun run i18n:audit-placeholders:failAllowlist (auditable, minimal):
scripts/audit-settings-placeholders.allowlist.jsonkey, keyPrefix, keyRegex, valueRegex, plus glossary terms.When updating translations, do not change:
{name}, {count}, {resetTime})Recommended verification:
tests/unit/i18n/Maintain a short glossary for terms that should be consistent across locales (brand, model names, product terms).
Initial glossary (expand as needed, but keep it minimal and reviewed):
messages/**/*.json must not contain emoji characters.
Executable check:
bun run i18n:audit-messages-no-emoji:failNotes: