Repository navigation
Add Simplified Chinese translation - #36
Conversation
|
Thanks! I redesigned the i18n approach a bit, can you PTAL and submit your translation to https://github.com/mihaild/DeepStruggle/tree/main/web/ui/src/i18n? |
3135afd to
9ea6199
Compare
|
Thanks for adding the new framework! I've updated this PR to provide the Simplified Chinese catalogs under This is ready for another look whenever you have time. I'd be happy to adjust the translations or integration based on your feedback. |
|
Comments from Claude about translation. I don't speak Chinese, can you please check if they make sense or are hallucinations?
|
|
Thanks for sharing Claude's feedback. I checked the points and pushed fixes. The card names follow the established names in the Chinese version I used, so I left them unchanged. The updates mainly clarify potentially ambiguous rules wording, along with a few UI translation fixes. |
|
Thanks! |
|
Right, Chinese distinguishes them: Red Scare is “红色恐慌”, while Red Terror is “红色恐怖”. The words “恐慌” and “恐怖” are similar in meaning, but the historical terms refer to different things. The Chinese card edition I used translates Red Scare as “红色恐怖”, and I followed that wording to keep the card names familiar to players. I’ve reconsidered this particular name. “红色恐慌/清洗” would be more accurate. Thanks for pointing out the distinction. |
This PR adds Simplified Chinese translations to the existing i18next framework. English remains the default, and Chinese can be selected from the language menu or with
?lang=zh-CN.The translation covers 1,042 interface messages across the current namespaces, all 110 cards, 84 countries, and nine regions. Card names follow a manually reviewed glossary. It also registers the Chinese locale and plural form, extends the language-switching and structured-log tests, and lets header track groups wrap to keep Chinese labels readable.
The changes retain the upstream interface and include no third-party artwork or bundled fonts. Engine logic, model calculations, and saved-game formats are unchanged. Localized log messages keep their card IDs and hover references, while exported descriptions remain English.
AI assistance
The translations, integration changes, and additional tests were prepared with extensive AI assistance using Codex. I reviewed the card-name glossary and manually tested the Chinese interface. Automated checks cover language switching and English compatibility.
Validation
The following GitHub Actions workflows passed in my fork at commit
9ea6199:tests/websuite, including catalog, structured-log, and Chromium language-switching checks: 188 passed, 6 warnings.Local Chromium checks also covered linked cards and play modes, the Space Race dialog, unchanged position and replay data after switching languages, and a 390px viewport.
The upstream PR workflows currently await maintainer approval to run. The linked results above are for this revision, not the previous implementation.