Skip to content

feat(i18n): add Simplified Chinese (zh-Hans) UI - #1

Closed
SenZh wants to merge 1 commit into
azygoss:mainfrom
SenZh:feat/zh-hans
Closed

SenZh wants to merge 1 commit into
azygoss:mainfrom
SenZh:feat/zh-hans

Conversation

@SenZh

@SenZh SenZh commented Oct 19, 2026

Copy link
Copy Markdown

Summary

Adds a Simplified Chinese (zh-Hans) UI to the app, following the existing i18n pattern (English source strings as keys, same as tr).

  • src/i18n/zh.ts — 1294 translated strings covering every key returned by node scripts/extract-strings.mjs (1307 total; 13 are pure technical terms such as CPU, PDF, Webhooks, exit {code} and are intentionally left as-is)
  • src/i18n/index.ts — register the zh catalog; resolveLanguage now maps any zh* system locale to zh (previously anything non-tr fell back to English)
  • src/store/settings.ts — Language gains 'zh'
  • src/app/settings.tsx — add 中文 to the language picker (System / English / Türkçe / 中文)
  • src/lib/voice.ts — on-device TTS uses zh-CN when Chinese is selected
  • src/components/FeatureSearch.tsx — searchable keywords for the language row
  • README.md — one line noting Simplified Chinese

Verification

  • npx tsc --noEmit → clean (exit 0)
  • Placeholder integrity checked programmatically: every {name} / {n} / {p} / {title} in the source string is present, unchanged, in the translation (0 mismatches across 1307 strings)
  • Terminology kept consistent (session=会话, gateway=网关, profile=配置档, skill=技能, cron job=定时任务, …); product names, commands, paths and model ids are not translated
  • A build of this branch is running on my fork (SenZh/hermes-android, tag v1.8.0-zh.3) so the APK can be smoke-tested on a device before merge

Notes

  • No dependency, config or native changes; the diff is i18n-only plus the README line.
  • Happy to adjust terminology, shorten button labels, or split the catalog if you prefer a different structure.

Thanks for the app — it's the only Hermes client I've found that covers the whole backend surface.

- Add src/i18n/zh.ts with 1294 translated strings keyed by the English source
- Register zh in the catalog map and detect zh* system locales
- Add 中文 to the in-app language picker (Settings -> Language)
- Use zh-CN for on-device text-to-speech when Chinese is selected
- Mention Simplified Chinese in the README
@SenZh

SenZh commented Oct 20, 2026

Copy link
Copy Markdown
Author

Hi — thanks for the app, it's the only Hermes client I've found that covers the whole backend surface, and it's what I use daily.

This PR adds a Simplified Chinese (zh-Hans) UI on top of the existing tr pattern, and it's ready to merge as-is:

  • src/i18n/zh.ts: 1294 strings, covering every key node scripts/extract-strings.mjs reports (1307 total; the remaining 13 are terms like CPU, PDF, Webhooks, exit {code} that read better untranslated)
  • Wiring: catalog registration, zh* system-locale detection (previously anything non-tr fell back to English), the Settings → Language option, and zh-CN for on-device TTS
  • npx tsc --noEmit is clean, which is what your check job runs
  • Placeholders ({name}, {n}, {p}, {title}) were verified programmatically against the source strings: 0 mismatches across all 1307
  • I built the branch and have been running it on a phone against my own gateway; screens load and connect fine

If any terminology is off (profile=配置档, skill=技能, session=会话), tell me which and I'll send a follow-up commit — I'd rather match your wording than mine.

Two notes:

  1. Your apk job is currently broken on both counts — see ci: fix the apk job (setup-android action + Gradle 9 vs AGP 8.12) #2, which fixes android-actions/setup-android@v3 failing on the hosted runner and the Gradle 9 / AGP 8.12 mismatch (SoftwareComponent with name 'release' not found). Happy to close that one if you'd rather fix it your own way.
  2. The release on my fork (SenZh/hermes-android, tag v1.8.0-zh.4) is built from this branch if you want to try the Chinese UI before merging.

No rush on review — just didn't want this to sit unread.

@SenZh SenZh closed this Oct 26, 2026
@SenZh
SenZh deleted the feat/zh-hans branch October 26, 2026 09:22
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.

1 participant