Uh oh!
There was an error while loading. Please reload this page.
fix(plugin-security): say "unique per organization" in sys_position's es-ES/ja-JP/zh-CN help - #8723
Conversation
… es-ES/ja-JP/zh-CN help
The en bundle and the object source already state that sys_position.name is
unique per organization -- the declared index is
{ fields: ['name'], unique: 'organization' }. The three other shipped locales
still asserted bare, unqualified uniqueness, telling an admin in Setup that the
machine name had to be free installation-wide, which the index does not enforce.
Each locale's leaf now matches the source description, examples included
(sales_manager, hr_specialist -- the superseded admin, editor, viewer are gone),
and follows the idiom PR #8599 landed in the same files for sys_permission_set.
Leaf string values only; no bundle structure was hand-edited.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XeQRiAa7vYRVX5Fog7Zby8The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
📓 Docs Drift CheckThis PR changes 1 package(s): 12 hand-written doc(s) reference the affected code and may need an implementation-accuracy re-verification:
⛔ 1 release-owned page(s) also reference the affected code. These are read-only:
|
…s-ES/ja-JP/zh-CN) sys_position states the machine-name uniqueness rule in TWO places, and #8468 corrected both at source: the field description (sys-position.object.ts:184) and the clone_position action's name param helpText (:116). The first commit corrected the field help; this one corrects the clone dialog, which is the text an admin reads at the exact moment they type a new API name. Each locale's :99 now matches its own :277 -- the sys_permission_set clone param that PR #8599 already landed -- which is the right target because `en` is byte-identical at both lines. No new phrasing was invented; these are strings the repo has already accepted. Folded in on PM instruction: the second leaf was always inside #8601's stated scope ("correct sys_position's leaf values in all four shipped locales"), and a separate PR would touch the identical three files. Closes#8718. Leaf string values only; no bundle structure was hand-edited. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XeQRiAa7vYRVX5Fog7Zby8
Uh oh!
There was an error while loading. Please reload this page.
Fixes#8601
Fixes#8718
sys_position.name's declared index is{ fields: ['name'], unique: 'organization' }, and #8556/#8468 corrected the source to say so — in both places the object states the rule. Theenbundle was brought in line; the three other shipped locales were not. They asserted bare, unqualified uniqueness, so an admin reading Setup in Spanish, Japanese or Chinese was told a position's machine name had to be free installation-wide, which is not what the index enforces.The change — six leaf string values, two per locale
packages/plugins/plugin-security/src/translations/{es-ES,ja-JP,zh-CN}.objects.generated.ts.1.
sys_position.fields.name.help— the field help in detail and edit views. Also still carried the superseded examples (admin, editor, viewer) the source replaced withsales_manager, hr_specialist.es-ES"Nombre técnico único del puesto (p. ej. admin, editor, viewer).""Nombre técnico del puesto, único por organización (p. ej. sales_manager, hr_specialist)."ja-JP"ポジションの一意の機械名(例: admin、editor、viewer)""ポジションのマシン名(組織ごとに一意。例: sales_manager、hr_specialist)"zh-CN"岗位的唯一机器名称(例如 admin、editor、viewer)""岗位的机器名称,在每个组织内唯一(例如 sales_manager、hr_specialist)"2.
sys_position.actions.clone_position.params.name.helpText— the Clone Position dialog's API-name input, i.e. the text an admin reads at the exact moment they type a new name. Source:sys-position.object.ts:116, whose own comment at:112-114states this is #8468's doing ("the name must be free within THIS organization, not across").es-ES"Nombre de máquina snake_case único""Nombre de máquina snake_case, único por organización"ja-JP"一意の snake_case マシン名""snake_case マシン名(組織ごとに一意)"zh-CN"唯一的 snake_case 机器名称""snake_case 机器名称,在每个组织内唯一"No new phrasing was invented
Every one of the six targets is a string this repo has already accepted, landed by PR #8599in these same files:
fields.name.helpvalues mirrorsys_permission_set.fields.name.helpat:188—único por organización/組織ごとに一意/在每个组织内唯一.clone_positionvalues are copied from each locale's own:277(thesys_permission_setclone param). That is the correct target becauseenis byte-identical at:99and:277— so if the English says the same thing in both places, each translation should too. Verified after editing: all four locales now match at:99and:277.ja-JPadditionally moves機械名toマシン名, the term the rest of that bundle already uses.Leaf string values only. No bundle structure was hand-edited, per the bundle header's documented workflow.
Why the second leaf is here rather than in its own PR
It was folded in on PM instruction. #8601's body asks to "correct
sys_position's leaf values in all four shipped locales to match the sourcedescribe()that #8556 landed", and #8468/#8556 corrected both source leaves — so the clone-dialog helpText was always inside this card's stated scope; the dispatch narrowed it before the second leaf was known to exist. It was reported as an out-of-scope finding first (#8718) and widened back deliberately. A separate PR would touch the identical three files for three lines, making the two PRs merge-conflict magnets against each other.Scope notes
enwas already correct and is deliberately untouched. The card statesen.objects.generated.ts"still reads «Unique machine name for the position»"; on currentmainthat string does not exist. Re-measured independently — the grep is not vacuous (sys_positionis present in that file at:12).check:i18nis green either way.rol→puestofind-replace damage (Puestoes,contpuesto, a survivingClonar rol) #8735 (find-replace artifacts in thees-ESbundle:Puestoes,contpuesto, a survivingClonar rol). Deliberately not addressed here, and explicitly a sample rather than a bounded set.The gate cannot judge this change
check:i18nis green both before and after the defect, so it is evidence of structural integrity only, not of correctness. Correctness here is a translation judgement, anchored to the already-accepted strings above.Two things were verified because of that:
node scripts/check-i18n-bundles.mjs --writewas run against the committed fix. It reportsregeneratedfor all nine packages and rewrites these three files byte-identically —git statuscomes back clean. The sanctioned edit-in-place workflow is intact; hand-edited leaves are preserved, not clobbered.check:i18n --self-testpasses, confirming the drift classifier can still go red.Verification
All gates below were run at
31aeb70, the head of this branch, after the final commit.Gate set re-derived with
node scripts/pm/dispatch-gates.mjsagainst the actual changed paths, both before and after the fold-in commit; the set is unchanged because the paths are. The changeset-triggered gates were not in the original dispatch list — that list predates this PR's changeset.pnpm --filter @objectstack/plugin-security testwas not run locally: the shared verification lock was held throughout by a long-running sibling build/test sweep. CI runs this suite and its conclusion is the reading that counts.Generated by Claude Code