Skip to content

add simplified chinese language option#7

Open
Eddykasp wants to merge 5 commits into
mainfrom
mka/zh-locale
Open

add simplified chinese language option#7
Eddykasp wants to merge 5 commits into
mainfrom
mka/zh-locale

Conversation

@Eddykasp

@Eddykasp Eddykasp commented Jul 3, 2026

Copy link
Copy Markdown
Member

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

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 zh locale (custom RailBlocks tokens + Blockly zh-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.

Comment thread frontend/index.html Outdated
Comment thread locales/zh/zh_locale.js Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants