add simplified chinese language option#7
Open
Eddykasp wants to merge 5 commits into
Open
Conversation
There was a problem hiding this comment.
Pull request overview
Adds Simplified Chinese (zh-Hans) as a selectable UI/editor language in RailBlocks, and refines some existing English/German UI strings/tooltips to improve translation clarity and consistency.
Changes:
- Introduces a new
zhlocale (custom RailBlocks tokens + Blocklyzh-hans) and registers it in the localization system. - Adds a Simplified Chinese option to the language picker and ensures the page uses UTF-8.
- Adjusts select English/German tooltips and UI labels for clearer phrasing.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| test/validate_translation_consistency.test.js | Includes zh_locale in translation consistency checks. |
| locales/zh/zh_tokens.js | Adds Simplified Chinese translations for block labels/tooltips/warnings. |
| locales/zh/zh_locale.js | Adds the Simplified Chinese locale configuration and UI/toolbox labels. |
| locales/en/en_tokens.js | Tweaks English tooltip/warning phrasing. |
| locales/en/en_locale.js | Simplifies English save/load UI labels. |
| locales/de/de_tokens.js | Tweaks German tooltip phrasing. |
| locales/de/de_locale.js | Simplifies German save/load UI labels. |
| frontend/localization.js | Registers zh in LANGUAGE_CONFIGS so it can be applied/stored. |
| frontend/index.html | Adds UTF-8 meta tag and a Simplified Chinese language menu entry. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
some of the translations here are a little clunky due to the sentence structure. In particular the tokens with _TEXT_START and _TEXT_END make it awkward. It would be nice to have more flexibility here.
The strings regarding lights, tracks and points are currently difficult to translate
In Chinese something like "light number one" would translate to "number one light", which the current structure of the strings does not really seem to allow as far as I can tell