Uh oh!
There was an error while loading. Please reload this page.
feat(access): localize capability picker group headers (#2600 B5, objectui side) - #2653
Merged
Merged
Conversation
…ectui side)
The System Capabilities picker rendered its scope group headers
("PLATFORM" / "ORGANIZATION" / "OTHER") as hardcoded English strings, even in a
Chinese UI. Route them through the field translation bundle
(`capability.group.<scope>`) and add the strings to every locale (zh: 平台 /
组织 / 其他; others translated, all falling back to en).
The capability *labels themselves* (Manage Metadata, Studio Access, …) come from
the sys_capability registry and stay as-is — their per-locale localization is a
registry concern tracked separately (framework).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>The latest updates on your projects. Learn more about Vercel for GitHub. |
Contributor
✅ Console Performance Budget
📦 Bundle Size Report
Size Limits
|
Uh oh!
There was an error while loading. Please reload this page.
os-zhuang added a commit
that referenced
this pull request
Jul 18, 2026
…5 follow-up) (#2657) Follow-up to #2653 (which localized the picker's group headers). The capability chip *labels* (Manage Metadata, Studio Access, …) are served in English by the sys_capability registry. Framework registry localization turned out to require a new record-data i18n pattern (no existing convention), which is disproportionate for this — the curated platform capabilities are a FIXED, known set, so localize just those on the client: - CapabilityMultiSelectField resolves labels for the 7 curated platform caps via `capability.label.<name>` (dots → underscores); package-/admin-authored capabilities keep their registry-served label. - Added the keys to useFieldTranslation defaults + en/zh bundles (others fall back to en; nested under the existing top-level `capability` key so locale parity is unaffected). Also made the toggle-off test re-query the chip at click time: the label now resolves through i18n, so an async translation-settle can re-render the chips between findBy and click — asserting on a re-queried node avoids a detached-node race. Adds a curated-vs-registry label test. Co-authored-by: Jack Zhuang <277994282+os-zhuang@users.noreply.github.com> Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
8 tasks
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 freeto 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.
What
Issue #2600 · B5 (设计迭代 · 细项) — the System Capabilities picker rendered its scope group headers (
PLATFORM/ORGANIZATION/OTHER) as hardcoded English, even in a Chinese UI.Change (objectui side)
capability.group.<scope>) inCapabilityMultiSelectField, add the keys touseFieldTranslationdefaults, and add the strings to all 11 locale bundles (zh: 平台 / 组织 / 其他; others translated, all falling back to en so the locale-parity test stays green).Deferred to framework (per issue decision)
The capability labels themselves (Manage Metadata, Studio Access, …) come from the
sys_capabilityregistry (backend data), so their per-locale localization belongs there — tracked as a separate framework task, not in this PR. The other B5 sub-item ("rail button has no accessible name") was retracted in the issue (agent-browser's a11y tree shows the name; it was a read_page tool quirk).Verify (live, Chinese UI)
Expand the capability picker on a writable set → group headers now render 平台 / 组织 (were
PLATFORM/ORGANIZATION); capability chip labels stay English (registry-sourced, deferred).Tests
Existing
CapabilityMultiSelectFieldsuite green (English default path viaFIELD_DEFAULTS); i18n locale-parity + bundle tests green (106 tests). Live-verified the zh headers in-browser rather than adding a heavier I18nProvider unit test.🤖 Generated with Claude Code