fix(platform-objects): translate the Setup nav_sso_providers nav entry in all four locales - #6787
Merged
Merged
Conversation
…try in all four locales (#6659) `@objectstack/plugin-auth` contributes an "SSO Providers" entry into Setup's Access Control group (`sys_sso_provider`, priority 250), but no locale bundle carried a label for it: on `ea1d9165d` a grep for `nav_sso_providers` over en / zh-CN / ja-JP / es-ES returned 0 each, against a control probe (`nav_positions`) returning 1 each. A deployment with an external IdP wired rendered `SSO Providers` in English inside an otherwise translated menu. Each label matches that locale's existing `sys_sso_provider.pluralLabel`, since the entry opens exactly that object's list view. `pnpm check:app-nav-i18n` cannot reach this id: `plugin-auth` spreads its `navigationContributions` in only when `authManager.isSsoWired()` is true, so the composition that gate boots never merges the entry. Measured both ways — with all four labels missing the gate still reports `OK (10 contributor(s), 53 merged nav id(s), every id labelled in every locale)`. The id is therefore pinned by hand next to the #6660 dead-key tombstone it is the converse of: one list holds ids whose label must be gone, the other ids whose label must stay. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01W6bLax4KMrSfnE1ydFU8Dw
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
Contributor
📓 Docs Drift CheckThis PR changes 1 package(s): 2 hand-written doc(s) reference the affected code and may need an implementation-accuracy re-verification:
|
os-zhuang
marked this pull request as ready for review
August 8, 2026 17:50
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.
Fixes #6659
The gap
@objectstack/plugin-authcontributes an SSO Providers entry into the Setup app'sgroup_access_control(sys_sso_provider, priority 250,auth-plugin.ts:552), and no locale bundle carried a label for it. A deployment with an external IdP wired therefore renderedSSO Providersin English inside an otherwise fully translated Setup menu.Premise re-measured on the fresh base (
origin/mainea1d9165d, i.e. after #6767 rewrote parts of these files):nav_sso_providersnav_positions(control)The declaring contribution had not drifted — still
auth-plugin.ts:552.The change
Option 1 of the issue only. The union-aware gate (option 2) is deliberately not built.
enzh-CNja-JPes-ESEach matches that locale's existing
sys_sso_provider.pluralLabel(already in the generated object bundles), since the nav entry opens exactly that object's list view — so the menu and the page it opens read the same words. Placed inside the Access Control block, betweennav_record_sharesandnav_api_keys, matching the contribution's priority 250.Why no gate caught it, measured both ways
pnpm check:app-nav-i18n(#5750) boots the real composition and asserts every merged Setup nav id carries a label in every locale — andplugin-authspreads itsnavigationContributionsin only whenauthManager.isSsoWired()is true. In the composition that gate boots, this entry is never contributed, never merged, never judged. The gate's own header already declared that bound; this PR is the first concrete specimen of it.Reverse verification, with the expected direction decided up front. The interesting half is that the gate is predicted not to move — that is the issue's central claim, not a gap in the verification. Measured with the four labels taken back out (
git checkout origin/main --the four locale files, then rebuilt):expected [ 'nav_sso_providers' ] to deeply equal [], one per localecheck:app-nav-i18nOK (10 contributor(s), 53 merged setup nav id(s), 4 locale(s), every id labelled in every locale)— byte-identical to the run with the labels presentThat second row is the point: the gate reports "every id labelled in every locale" while all four locales are missing this one. So the id is pinned by hand in
setup-nav-dead-key-tombstone.test.ts, as the converse of the #6660 tombstone it now sits beside — one list holds ids whose label must be gone, the other ids whose label must stay. The two are the two halves of one ledger, and the file header says so, including the bound that this package can assert only the label half (plugin-authdepends on it, so it cannot be imported from here — the same import direction that put the boot gate inpackages/cli).Also in scope (declared in the claim — cli-seat veto welcome)
packages/cli/scripts/check-app-nav-i18n.mjsheader, comment only, no logic edits. Its closing sentence said "the deadapps.setup.navigationkeys that exist today are tracked separately" — those four keys were removed by #6767, so that half-sentence is now false. Rewritten to point at where Setup's reverse direction is actually decided (the two hand-kept lists), keeping the still-true claim intact: the gate makes no reverse assertion, because from one composition a dead key and a gated-off contribution are indistinguishable.One more citation was falsified by this PR and corrected in the same file it lives in: the tombstone header said "Making that gate union-aware is tracked as #6659". After triage, #6659 tracks the missing label and the union-aware gate is explicitly a separate, unbuilt card — leaving that line would point future readers at a closed issue for work never done.
Verification
All foreground, heavy runs under
flock /tmp/os-heavy-verify.lockwith a 4 GB heap cap.check:i18n-coveragefirst reportedCOULD NOT MEASURE—@objectstack/connector-mcphad no build output because the earlier build was scoped to@objectstack/cli.... That is the gate's documentedfix: pnpm build, not a finding; it is green above after building the CI package set.No
skip-changesetlabel: this PR ships a changeset (.changeset/sso-providers-nav-label.md, patch on@objectstack/platform-objects).中文摘要
plugin-auth只有在外部 IdP 接通时才会向 Setup 的「访问控制」分组贡献nav_sso_providers,而四个语言包都没有它的标签,所以接了 SSO 的部署会在一个已完全翻译的菜单里显示英文的SSO Providers。本 PR 按裁决只做方案一:补齐四个语言的标签,措辞与各语言sys_sso_provider.pluralLabel保持一致。check:app-nav-i18n只启动一个组合,被条件关掉的贡献根本不会被合并,因此结构上看不到这个 id —— 已双向实测:删掉四个标签后该 gate 仍然输出完全相同的every id labelled in every locale,而新增的 pin 用例四个语言全红。所以这个 id 改为手工 pin 在setup-nav-dead-key-tombstone.test.ts,与 #6660 的墓碑互为反面:一份列「必须消失」的 id,一份列「必须保留」的 id。未实现方案二(让 gate 具备 union 感知)—— 按裁决那是独立的、面向维护者的卡片。