Conversation
added 2 commits
September 30, 2026 15:03
Add src/translations/zh.json covering all 5088 keys of en.json, plus the zh.meta.json AI-translation sidecar used by scripts/translate-locale.js. Wire the locale into the runtime and tooling: - src/localize/localize.ts: register the zh loader; Home Assistant reports Simplified Chinese as zh-Hans, which resolveLoaderKey already strips down to zh. - scripts/translate-locale.js: add zh so --all keeps it in sync. - src/translations/_glossary.json: per-language Simplified Chinese guidance. Documentation: - README.zh-CN.md: full Chinese README. - README.md and CONTRIBUTING_TRANSLATIONS.md: list Chinese Simplified and note that zh-Hans maps to zh. Coverage is 100% structural and 99.1% translated; the 47 strings left in English are product names, units and code identifiers. Placeholders and HTML tags verified intact by scripts/validate-translations.js.
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.
Translation Contribution
Language: Chinese (Simplified) (
zh.json)Type: New language
Changes Made:
src/translations/zh.json: a complete Simplified Chinese translation of all 5,088 keys inen.json, keeping the same structure, section order and key order.src/translations/zh.meta.json: the per-locale AI-translation sidecar thatscripts/translate-locale.jsreads and updates on incremental runs.src/localize/localize.ts. Home Assistant reports Simplified Chinese aszh-Hans; the existingresolveLoaderKey()strips the region, so a singlezh.jsoncoverszh,zh-Hansand any otherzh-*variant.zh: 'Simplified Chinese'toLANG_NAMESinscripts/translate-locale.js, sonpm run translations:fill -- --allkeeps the new locale in sync as keys are added.per_lang.zhentry tosrc/translations/_glossary.jsonwith Simplified Chinese guidance (concise Home Assistant style labels,never_translateterms preserved).README.zh-CN.mdwith a full Chinese README, link it from the README header, and list Chinese Simplified in the Translations section of bothREADME.mdandCONTRIBUTING_TRANSLATIONS.md.Testing:
node scripts/validate-translations.jsreports no missing and no extra keys forzh(exit code 0).node scripts/translation-coverage.jsreports 100% structural coverage and 99.1% translated strings for the new locale.Notes:
Ultra Card Pro,FreeSpace,Google Maps,OctoPrint,Moonraker,Bambu Lab,Smart Cards,Living Canvas), units and unit-like labels (px,km,h,W,°,6mo+), and code identifiers such asmy_variable_nameandentity_id.zh,zh-Hansandzh-CNall resolve to this one file, so no regional variant file was added; no runtime change beyond the loader entry was required.src/translations/,src/localize/,scripts/and the two docs were touched.dist/is left to the maintainer's build.zh.json.