Skip to content

feat(i18n): add optional UI locales and a Chinese example pack - #64

Open
Xianbei233 wants to merge 6 commits into
TannerMidd:mainfrom
Xianbei233:feat/zh-cn-ui-locales-replacement
Open

Xianbei233 wants to merge 6 commits into
TannerMidd:mainfrom
Xianbei233:feat/zh-cn-ui-locales-replacement

Conversation

@Xianbei233

@Xianbei233 Xianbei233 commented Oct 12, 2026 •

Copy link
Copy Markdown

Summary

Retains the optional data-only locale-extension design from #41 (now closed) and updates this existing feature branch to upstream 0.19.0.

  • Add validated, data-only uiLocales extension packs, authenticated client delivery, English fallback, and live reload/disable behavior.
  • Add explicit UI t() keys and named templates across fixed browser UI, preserving user/model content, raw external errors, permissions, and persistence.
  • Ship a deliberately small Simplified Chinese example pack in docs/examples/zh-cn-ui.ts. It starts off and can be enabled from Extensions. The complete Chinese dictionary is maintained separately and is not part of this PR.
  • Add optional notice presentation metadata without changing original notice text, logs, or audience.
  • Merge upstream main at d2a3280b10c3f51610eacb13cdfa6e1ea4577b5b (0.19.0) normally. Re-resolve the conflicts onto the 0.19 slot-based top bar, places, composer and status line, the redesigned extensions and gallery sheets, and the subagents board. No history rewrite.

Validation

Merge commit: 5a576cc5d83ab13f32e1f094998ee0cb56d0a17d (parents: b04986dcc7e04c11231ce59d3696ef9f25d6d2e4 and upstream d2a3280b10c3f51610eacb13cdfa6e1ea4577b5b).

  • npm run check, npm run lint, npm run format:check, and git diff --check passed.
  • Full test suite ran in six bounded batches: 404/404 passed, zero failures. This includes the real loader, live locale enable/disable, English fallback, guest 403 on extension changes, and phone (390×844) / desktop (1280×800) Chromium checks with unchanged drafts, titles, model IDs, and no overflow.
  • Docs CI equivalent (isolated docs-site install plus link-checked build): passed.
  • The separate complete dictionary (1407 strings / 282 templates) audits 1731 direct/conditional t() call records with zero missing keys; it is not shipped here. The example pack is intentionally partial, and unknown keys stay English.
  • GitHub checks: GitGuardian passed. The Docs workflow run is action_required because this fork PR needs a maintainer's approval to run; it has no failing job.

Scope and remaining English

The example pack is intentionally optional and incomplete. Pre-authentication pages, persisted activity, raw provider/tool/server errors, and some dynamic status content remain English. Unknown keys retain English fallback. There is no global DOM text rewriting, user-content translation, production deployment, package publication, or default-branch push.

No real model, microphone, Web Push, GitHub watch, or compression-backend end-to-end tests were run.

@TannerMidd

Copy link
Copy Markdown
Owner

Thanks for this work, I will be looking at getting the integrated. May take a bit, but it will be done 👍

@Xianbei233

Copy link
Copy Markdown
Author

I'll keep this PR conflict-free with the main branch until it's merged.

TannerMidd added a commit that referenced this pull request Oct 16, 2026
The owner moved theming to 0.14.0. So:

- core-or-extension.md's themes example is no longer planned: core
  keeps the theme surface (tokens, data-part names, states) and the
  loading and checks of theme folders; each theme is a folder.
- api-stability.md §7: themes have a public surface of their own.
- The design doc puts the themes guide with the theming work of 0.14.0.
- sidebar.mjs has no PENDING or LATER: every row is a page that exists,
  and the build fails otherwise. A comment marks where each theme page
  goes; the theming branch adds each one as one row. Without them, the
  strict mode (DOCS_STRICT) has nothing left to do, so it goes too.

i18n (#64) stays a proposal for 0.15, as it was.

Tested: docs build (42 pages), format, lint.
Re-applies the data-only UI locale mechanism and the explicit t() call sites
onto upstream main (0.18.0), keeping only the framework, its UI wiring, docs
and tests. The complete Chinese dictionary is maintained separately; the
shipped example pack is deliberately small.
@Xianbei233 Xianbei233 changed the title feat(i18n): add optional UI locales and Chinese pack feat(i18n): add optional UI locales and a Chinese example pack Oct 21, 2026
Re-resolve conflicts onto 0.19.0, preserving the data-only locale mechanism,
its explicit t() call sites through the new slot definitions, and live
English fallback. The shipped example pack stays deliberately small.

This branch has not been deployed

No deployments
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