fix(i18n): localize profile page, inline label objects, managed-by badges and record quick actions#2489
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Contributor
✅ Console Performance Budget
📦 Bundle Size Report
Size Limits
|
…dges and record quick actions
- pickLocalized: upgrade a bare base language ('zh') to any region-qualified
key sharing the base ('zh-CN'). Runtime language is normalized to the base
code while metadata authors write full BCP-47 tags, so inline
{ en, 'zh-CN', ... } label objects previously fell back to English.
- ProfilePage (account:profile_card / /system/profile): all hardcoded strings
now go through useObjectTranslation() with profile.* keys; namespace added
to all ten locale bundles.
- ManagedByBadge: chips/tooltips resolve via managedByBadge.* keys with
{{provider}} interpolation (new namespace in all ten locales).
- record:quick_actions: action labels resolve via the
objects.{object}._actions.{action}.label convention + pickLocalized.
- record:details / record:related_list / record:alert / ObjectTree: pass
inline label objects through pickLocalized.
- Locales: backfill list.inlineEditShort/inlineEditLabel/recordEditingTitle
for ja/es/ko/de/fr/pt/ru/ar.
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.
Summary
Fixes the account/system surfaces rendering English under a non-English browser locale. Root cause + three feature gaps:
pickLocalizedbase-language upgrade (root cause). The runtime normalizesnavigator.language(zh-CN) to the bare base codezh(i18n.ts), while metadata authors write inline label objects with full BCP-47 keys ({ en, 'zh-CN', 'ja-JP', 'es-ES' }).pickLocalizedonly supported downgrading (zh-CN → zh), never upgrading (zh → zh-CN), so every inline label object fell back to English. It now also picks any region-qualified key sharing the base. Unit tests added.account:profile_card//system/profile): all hardcoded strings (title/subtitle, avatar Upload/Replace/Remove, Personal Information card, Change/Set Password card, validation + success messages) now go throughuseObjectTranslation()with a newprofile.*namespace in all ten locale bundles.ManagedByBadge(the "Identity"/"Config"/"System"/"Append-only" chips on managed objects) now resolves through newmanagedByBadge.*keys with{{provider}}interpolation — all ten locales.record:quick_actionsresolves action labels via theobjects.{object}._actions.{action}.labelconvention +pickLocalized, so object action buttons (Change Password, Enable 2FA, Delete My Account, …) localize.record:details/record:related_list/record:alert/ObjectTreelikewise pass inline label objects throughpickLocalized.list.inlineEditShort/inlineEditLabel/recordEditingTitlewere only present in en/zh — added to ja/es/ko/de/fr/pt/ru/ar (the inboxmineview showed literal "Edit inline" under ja).Companion PR in
frameworkconverts the sys_user/sys_organization/sys_position detail-page labels to inline i18n objects and routes the user Security tab throughrecord:quick_actions.Tests
packages/i18n: 177/177 ✅ (incl. newpickLocalizedregional-upgrade cases + top-level key parity across all 10 locales)packages/plugin-detail: 185/185 ✅packages/app-shell: 1278/1278 ✅packages/plugin-tree: 6/6 ✅useObjectLabel.ts/record-quick-actions.tsx/record-related-list.tsx(conditional-hook warnings) verified present onmainbefore this change — not introduced here.Live UI verification (real backend + console, Playwright, locales zh-CN / ja / es)
Backend: framework platform-objects dist on :18742; console dev server on :5190. Screenshots below (full set on branch gist).
zh-CN
ja / es
Known remaining English (out of scope)
userin the user list (field data value, not a label).Created sys_team "…"(server-generated audit text).Changeset
.changeset/profile-card-i18n.md— patch for@objectstack/console,@object-ui/i18n,@object-ui/app-shell,@object-ui/plugin-detail,@object-ui/plugin-tree.