Repository navigation
Commit bfd6b6b
fix(i18n): an approval rejection reads 驳回 in Chinese on the runtime surfaces (#35175)
Fixes #35021
repo:objectstack#1 · os-warren · session_01JQwxbXBffgVtUPBEY2nLFm
Clause-②: no
Metadata-protocol: none
## 维护者速读
- 改了什么:审批运行界面(审批中心、记录页审批条、审批动态、审批请求页的驳回按钮与状态、邮件确认页)的中文从「拒绝」改为「驳回」;简体 21
条、繁体 21 条界面词条,审批插件 zh-CN 5 处标签,邮件页 3 处。
- 为什么改:设计器里审批分支叫「驳回」,审批人点的却是「拒绝」,同一件事两个说法;按裁决 6973602227(选项 A)统一为「驳回」。
- 风险与回滚:只改显示文案,存储的状态 `rejected` 和动作键 `reject` 不变;权限、邀请、AI
工具审批里的「拒绝」保留。回滚即 revert 本 PR。
- 先看:`ui/packages/i18n/src/locales/zh-Hans.ts` 的 `approvalsInbox` 块(21
处);`packages/plugins/plugin-approvals/src/translations/zh-CN.objects.generated.ts`(驳回按钮、状态、审批动态);`packages/plugins/plugin-approvals/src/action-link-pages.ts`(邮件确认页)。
- 两分钟验证:`pnpm --dir ui exec vitest run
packages/i18n/src/__tests__/approval-reject-wording-35021.test.ts`,预期 9
条全绿;或在 zh-CN 下打开审批中心,行内按钮显示「通过」「驳回」,已驳回的请求状态显示「已驳回」。
- 需要你做的:无,席位落地。
## What changes
Display text only. The stored status `rejected` and the action key
`reject` are unchanged; en and every other language are untouched.
- **`@object-ui/i18n`, `approvalsInbox`, zh-Hans 拒绝 to 驳回 and zh-Hant 拒絕
to 駁回 (21 keys each):** `statusRejected`, `sendBackAutoRejected`,
`keyboardHint`, `actReject`, `reject`, `rejecting`, `rejectN`,
`bulkRejectTitle` (+ `_one`, `_other`), `bulkRejectBody`, `bulkRejected`
(+ `_one`, `_other`), `rejectOneTitle`, `rejectOneBody`, `rejectTitle`,
`rejectBody`, `inlineRejected`, `rejectedToast`, `whyDisabledSubmitter`.
zh-Hant was regenerated with `pnpm --filter @object-ui/i18n
gen:zh-hant`, which reports it byte-identical to the committed file
("already current").
- **`@objectstack/plugin-approvals`, zh-CN bundle (hand-written
translated leaf values, no key added or dropped; `check:i18n` in
sync):** `sys_approval_request` status `rejected` 已驳回;
`_actions.approval_reject` `label` 驳回, `description`
驳回该请求?驳回对所有审批人立即生效。, `successMessage` 已驳回“…”; `sys_approval_action`
action option `reject` 驳回. The zh-Hant bundle already said 駁回 everywhere
and is unchanged.
- **`action-link-pages.ts` (email action-link confirm and result
pages):** `Reject · 驳回`, `确认驳回该审批请求?`, `⛔ Rejected · 已驳回`.
Which key family serves each runtime surface named in the ruling: the
inbox page, the record approvals panel, the approval decision panel and
the history timeline read `approvalsInbox.*` (`actReject`,
`statusRejected`, the confirm and toast keys); the record-page reject
lever, its confirm question and success toast are the declared
`sys_approval_request` action, localized from the plugin bundle (the
admin-override label wraps that same declared label); the generic object
views read the plugin bundle's status and action options.
**Kept, with the reason** (zh-Hans, mirrored in zh-Hant; 39 lines still
carry 拒 in each pack):
- Access denial or a refusal by the server: `form.navigateRefused`,
`list.loadErrorRejectedTitle`, the `list.userFilters` formula-sort hint,
`console.importMappingsRefused`, `console.savedViewsRefused`,
`console.settingsView.cryptoRefusalNoSubject`,
`console.settingsView.mapKeyNotOfferedHint`,
`console.assignedWork.transferRefused`, `auth.device.deny` / `denying` /
`deniedTitle` / `denyFailed`, `oauth.consent.deny` / `denied`,
`errors.forbidden`, `preview.changes.securityBlockTitle` (+ `_one`,
`_other`), `preview.changes.securityRule.cbpNoRelation` /
`cbpAmbiguousRelation`,
`organization.settings.deleteConfirmDescription`,
`cloudConnection.errors.accessDenied`,
`marketplace.install.dependencyMissing.heading`,
`connectorConnections.redirectUriMissing`,
`element.component.apiRefused`.
- Declining an invitation: `organization.invitations.status.rejected`,
`organization.accept.decline` / `declined` / `declineFailed`.
- AI tool approvals, a different concept: `aiApprovals.statusRejected` /
`reject` / `outcomeReject` / `fieldRejectionReason` / `rejectTitle`,
`console.system.aiApprovals.subtitle`, `console.ai.toolDenyReason`,
`chatbot.toolState.denied`.
- An upstream provider rejecting a connector credential (not approval):
`connectorCredentials.statusRejected` (被拒绝) and
`connectorCredentials.rejectedReason`.
Not touched, as ruled: the designer and flow canvas
(`engine.inspector.flowEdge.branchReject` 驳回,
`engine.flowCanvas.rejectedEnd` 已驳回, the Problems-tab hint that
interpolates the branch label), the server notifications
(`translations/messages.ts`, already 驳回 / 駁回, no 拒绝 for approval), 「退回」
(send-back).
## Tests
- New
`ui/packages/i18n/src/__tests__/approval-reject-wording-35021.test.ts`:
for zh-Hans and zh-Hant, no `approvalsInbox` string says 拒绝 / 拒絕
(enumeration asserted non-empty), every key named for the reject
decision says 驳回 / 駁回, the decision verb and status read 驳回 / 已驳回, and
access denial, invitations and `aiApprovals` keep 拒绝; plus the agreement
case the card's acceptance asks for: the runtime `actReject` equals the
designer's `branchReject`, and `statusRejected` equals the canvas
`rejectedEnd`.
- New
`packages/plugins/plugin-approvals/src/approval-reject-wording-35021.test.ts`:
through the real resolvers (`translateMetadataDocument`,
`translateObject`), zh-CN and zh-Hant read 驳回 / 駁回 for the reject lever,
the `rejected` status and the `reject` history row; the lever's question
and toast say it; no `sys_approval_request` / `sys_approval_action`
string in either bundle says 拒绝 / 拒絕; the email confirm and result pages
say 驳回 and no 拒绝.
- Updated pins: `approval-status-vocabulary.test.ts` zh-CN `rejected` is
已驳回; `approvalOverride-zh-wording-13402.test.ts` composes 管理员代为驳回 from
the reject lever's label.
## Acceptance notes
- Ablation, one per behaviour, through `scripts/ablation-replace.mjs`
(anchor hit 1 to 0, blob moved, restored to the HEAD blob with `git diff
HEAD` empty): zh-Hans `actReject` back to 拒绝 turns the ui pin red (4 of
9 failed, including the designer-agreement case); the zh-CN
`approval_reject` label back to 拒绝 turns the plugin pin red (2 of 7
failed). No build was involved: both suites import the edited files by
relative path.
- Observed, not filed (not one of the three filing classes): the approve
wording also differs across surfaces, the plugin bundle saying 已批准 / 批准
(zh-Hant 核准) where the inbox says 已通过 / 通过; outside this card's ruling.
- The designer's approval-node inspector help
(`ui/packages/app-shell/src/views/metadata-admin/i18n.ts`) still says 拒绝
in five strings (the mode help, the status-mirror help, the escalation
help and its `auto_reject` option 自动拒绝, the revision-limit help). The
ruling keeps the designer unchanged, so they are left; raised to the
seat as an open question.
## Verification
All readings on head `f850687b6` (branch merged with `origin/main`
`2fea6d2a1`), except the targeted runs and ablations, taken on
`d863192a0` before the merge, which touched neither package.
<details><summary>Tests</summary>
- `pnpm --dir ui exec vitest run packages/i18n/` (verify lock): VERDICT
command-exit 0, Test Files 104 passed (104), Tests 1956 passed, 13
skipped.
- `pnpm --filter @objectstack/plugin-approvals exec vitest run
--maxWorkers=2` (verify lock): VERDICT command-exit 0, Test Files 123
passed (123), Tests 1748 passed (1748).
- `pnpm --filter @objectstack/plugin-approvals typecheck`: exit 0, test
layer held at the ledgered 321 errors in 8 files, the new test file adds
none.
- `pnpm --filter @object-ui/i18n type-check`: exit 0, after building its
dependency closure (the first run exited 2 on TS6305,
`ui/packages/core/dist` not yet built; the test program lists both
edited test files).
- Ablation runs: see Acceptance notes.
</details>
<details><summary>Local gates</summary>
- `dispatch-gates.mjs --commands` on this tree: 71 families; `--ran`
reconciliation: 71 accounted, 70 run with exit 0, 1 NOT MEASURED, 0
unrun.
- NOT MEASURED: `pnpm check:dual-build-cjs-loads`, exit 3 PREREQUISITE
NOT MET (it reads every package's `dist`, and this worktree built only
the two packages' closures); CI runs it.
- Exit 0 among them: `pnpm check:i18n` (10 packages, all bundles in
sync), `pnpm check:i18n-stale-fill`, `pnpm check:keyed-text-bounds`,
`pnpm check:role-word`, `pnpm check:published-files`, `pnpm
check:undeclared-dep-imports`, `pnpm check:nul-bytes`, `pnpm
check:cross-package-test-inputs`, `pnpm check:test-source-alias`, `pnpm
check:type-check-debt`, `node scripts/check-adr-0087-registration.mjs
--base origin/main`, `node scripts/check-closing-keyword-parity.mjs`,
`node scripts/check-issue-citations.mjs`, `pnpm --dir ui exec vitest run
scripts/` (Test Files 171 passed, 2 skipped).
- `pnpm --dir ui check:new-line-citations`: 0 new citations.
- `node scripts/pm/overlap-check.mjs`: VERDICT clean; #35122 shares both
locale files and merges cleanly.
</details>
---
_Generated by [Claude
Code](https://claude.ai/code/session_01JQwxbXBffgVtUPBEY2nLFm)_
---------
Co-authored-by: Claude <noreply@anthropic.com>1 parent c480f33 commit bfd6b6b
11 files changed
Lines changed: 305 additions & 59 deletions
File tree
- .changeset
- packages/plugins/plugin-approvals/src
- translations
- ui/packages
- app-shell/src/views/metadata-admin
- inspectors
- i18n/src
- __tests__
- locales
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
85 | 85 | | |
86 | 86 | | |
87 | 87 | | |
88 | | - | |
| 88 | + | |
89 | 89 | | |
90 | 90 | | |
91 | | - | |
| 91 | + | |
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
| |||
100 | 100 | | |
101 | 101 | | |
102 | 102 | | |
103 | | - | |
| 103 | + | |
104 | 104 | | |
105 | 105 | | |
106 | 106 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
100 | 100 | | |
101 | 101 | | |
102 | 102 | | |
103 | | - | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
104 | 106 | | |
105 | 107 | | |
106 | 108 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
64 | | - | |
| 64 | + | |
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
| |||
152 | 152 | | |
153 | 153 | | |
154 | 154 | | |
155 | | - | |
156 | | - | |
157 | | - | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
158 | 158 | | |
159 | 159 | | |
160 | 160 | | |
| |||
280 | 280 | | |
281 | 281 | | |
282 | 282 | | |
283 | | - | |
| 283 | + | |
284 | 284 | | |
285 | 285 | | |
286 | 286 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
472 | 472 | | |
473 | 473 | | |
474 | 474 | | |
475 | | - | |
| 475 | + | |
476 | 476 | | |
477 | 477 | | |
478 | 478 | | |
| |||
484 | 484 | | |
485 | 485 | | |
486 | 486 | | |
487 | | - | |
| 487 | + | |
488 | 488 | | |
489 | 489 | | |
490 | 490 | | |
| |||
493 | 493 | | |
494 | 494 | | |
495 | 495 | | |
496 | | - | |
497 | | - | |
| 496 | + | |
| 497 | + | |
498 | 498 | | |
499 | 499 | | |
500 | 500 | | |
| |||
504 | 504 | | |
505 | 505 | | |
506 | 506 | | |
507 | | - | |
| 507 | + | |
508 | 508 | | |
509 | 509 | | |
510 | 510 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
0 commit comments