Repository navigation
Commit ae82d05
i18n(plugin-approvals): ship the approval objects, notifications, record page and e-mail link line in ru, de and ko (#30830)
<!-- claude-projects-attribution: {"github_login":"os-elon-musk"} -->
_Requested by **Elon** · [project
thread](https://claude.ai/code/project/chan_01WedDzV26nniwxv7jC88B9D?thread=cmsg_01WedDzV26nniwxv7jC88B9D7v5H7BaFmL7sUCoN7tSxhm)_
domain:server#1 · os-elon-musk · session_016WV4cya5ej5GQV86RPbRPK
Part of #30512 — package 9 of 11, second half
(`@objectstack/plugin-approvals` in `ru`, `de`, `ko`; the first half,
`zh-Hant`, `ar`, `fr`, `pt-BR`, landed in #30790). With it the package
serves all eleven platform languages. The card stays open: settings and
platform-objects follow, and the last PR of the series makes the bundle
check read the platform locale table.
Clause-②: no
Metadata-protocol: none
## 维护者速读
- **改了什么:** 审批插件的 3 个对象(审批请求、审批动作、审批委派)的名称、字段、选项、帮助和动作,审批通知的 40
条句子,审批请求记录页的标题和「详情 / 时间线」两个标签,以及审批邮件里「打开审批」那一行,补上俄语、德语、韩语 3
种。繁中、阿语、法语、巴葡已在上半包(#30790)落地,至此本包 11 种语言齐全。
- **为什么改:** 平台语言表要求每个界面带齐 11 种语言;这是第 3 期按包补齐的第 9 个包的下半(每种语言 164 条对象文本 +
40 条消息)。用这 3 种语言的审批人和提交人看到的审批界面、通知和邮件不再是英文。
- **风险与回滚:** 只加翻译数据和注册行,不动逻辑、schema、接口;邮件模板的结构、选模板的规则和
`EMAIL_TEMPLATE_FLOOR_LOCALE` 都没动,只给「打开审批」那一行加了 3 种语言(按裁决 A)。原有 8
种语言一字未改。测试改动只是各语言测试把 3 种新语言加进列表(覆盖变宽,没有放宽任何断言)。回滚即撤 PR。
- **先看:** `src/translations/index.ts`(按表标签注册,zh-CN 在 zh-Hant
前,每种语言带页面标题和消息)、`src/approval-email-templates.ts` 的
`APPROVAL_EMAIL_LINK_LINES`、`src/translations/messages.ts`,再看
`sys-approval-request-page.test.ts`。
- **两分钟验证:** `node scripts/check-i18n-bundles.mjs --filter=approvals` 输出
`plugins/plugin-approvals in sync`;`pnpm --filter
@objectstack/plugin-approvals test` 全绿。
- **需要你做的:** 无,席位落地。
## What changes
- Three new locales under the platform locale table's tags (`ru`, `de`,
`ko`): each a `TAG.objects.generated.ts` with all 164 object leaves of
`sys_approval_request`, `sys_approval_action` and
`sys_approval_delegation`, plus its `TAG.source-hashes.generated.ts`,
written by the repo's own `os i18n extract --fill=default
--source-hashes` and served through `withSourceFallback` like the
existing seven. `zh-CN` stays ahead of `zh-Hant` in `index.ts`.
- The hand-written records gain an entry per new locale: `messages.ts`
(the 40 approval notification sentences; `approvalMessages` widens to
all eleven), `pages.ts` (the record page label
`sys_approval_request_detail`, recorded against the same `en` digest the
existing seven carry), and the record page's inline Details / Timeline
labels in `sys-approval-request.page.ts`.
- `approval-email-templates.ts`: `APPROVAL_EMAIL_LINK_LINES` (the line
that opens the request from its e-mail, `{{approvalUrl}}` kept
byte-identical) gains the three locales. This follows the seat's ruling
A, as recorded in the handover commit `7db48bdd` and carried by #30790:
the link line is added per locale; the e-mail templates' shape, the
template selection and `EMAIL_TEMPLATE_FLOOR_LOCALE` are unchanged.
- The extract command in `scripts/i18n-extract.config.ts` lists the
three tags and its merge baseline imports the three bundles with their
page entries, so `check:i18n` covers them from this PR on.
## Tests
- `sys-approval-request-page.test.ts` pins the served locale set; it now
lists the eleven locales this PR serves, and every served locale is
still held to carrying the authored page label.
- `approval-status-vocabulary.test.ts`,
`approve-decision-question.test.ts`, `decision-question-i18n.test.ts`,
`success-copy-names-request-i18n.test.ts` and
`admin-copy-vocabulary.test.ts` add the three new bundles to their
locale lists. Coverage widens; no assertion changed.
## Acceptance notes
- **Quality bar (#17508 / PR #19345):** every leaf written for the
reader; placeholders, code spans and identifiers byte-identical, checked
mechanically per leaf against `en` for the object bundles and for
`messages.ts` (key set, `{{holes}}`, `{holes}`, backtick spans, angle
tokens: all three locales OK, zero diffs).
- **Leaves equal to English, on purpose, each recorded by the extractor
as a source copy:** `de` `Status`, the native word. In `messages.ts`,
the reason separator `"; "` equals the English one in all three.
- No cross-locale coincidence: `check:i18n-stale-fill` passes with the
baseline untouched.
- Carried unchanged from the released handover commit `2dffb78d`
(session `session_01Utp6Cai5CRdAs4u9gTipWU`): the patch id of this PR's
diff equals that commit's (`01aee2a9`). The serial row "after #30208
lands" was cleared by the seat (6672288503): #30208's rows that touch
this package landed in PR #30551.
- The existing `ja-JP` / `es-ES` bundles still carry English source
copies on `sys_approval_delegation`; this PR does not touch the existing
locales.
- For the platform-objects PRs that follow: the account menu's
`nav_account_approvals` label is pinned there to equal this package's
`my_pending` label in each locale (the handover's cross-package pin);
this PR fixes the `ru` / `de` / `ko` side of it.
## Verification
<details><summary>Package suite, typecheck, build (verify
lock)</summary>
```
turbo run build --filter=!@objectstack/docs: 118/118 tasks successful, exit 0
pnpm --filter @objectstack/plugin-approvals test && typecheck (at head c582c20, on main c17719d)
Test Files 115 passed (115)
Tests 1498 passed (1498)
check:test-typecheck: OK (tsconfig.test.json)
os-verify-lock: VERDICT command-exit 0
same suite at 89c1a860 (the same patch on top of #30790's final head): 115 files, 1498 passed, VERDICT command-exit 0
```
</details>
<details><summary>i18n gates, the derived families and the docs &
code guards lane</summary>
```
node scripts/check-i18n-bundles.mjs --filter=approvals (at c582c20)
plugins/plugin-approvals in sync (21 bundle(s)) EXIT 0
node scripts/check-i18n-stale-fill.mjs (at c582c20)
check-i18n-stale-fill: OK (11 bundle set(s) — no new stale fills, 1 baselined). EXIT 0
CI lane "Lint · docs & code guards", every command run locally (at c582c20)
56 commands (lane-verdict excepted), 56 x exit 0, check-cli-command-ids included
dispatch-gates --commands (at 89c1a860): 61 families, each run and recorded with its exit code: 61 x exit 0
dispatch-gates --ran: 61 derived, 61 run, 0 NOT-MEASURED (a derived zero)
re-derived at c582c20: the identical 61-command list
pnpm lint (repo-wide, at 89c1a860): exit 0
changed lines 1474 (+1464 / -10), 19 files: under the 3000-line human-merge threshold
```
</details>
The branch is one commit on `main` `c17719dd` (after #30790 landed). Its
diff has the same patch id (`01aee2a9`) as the handover commit and as
`89c1a860`, where the derived families ran on top of #30790's final
head; none of the main commits in between touches `plugin-approvals`.
The package suite, both i18n checks and the docs & code guards lane were
re-run on this head.
Dogfood: not run — content-only package PR, no `!` in the title and no
`(narrowing)` arm.
---
_Generated by [Claude
Code](https://claude.ai/code/session_016WV4cya5ej5GQV86RPbRPK)_
Co-authored-by: Claude <noreply@anthropic.com>1 parent 25e1c1a commit ae82d05
19 files changed
Lines changed: 1464 additions & 10 deletions
File tree
- .changeset
- packages/plugins/plugin-approvals
- scripts
- src
- translations
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| |||
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
67 | 70 | | |
68 | 71 | | |
69 | 72 | | |
| |||
92 | 95 | | |
93 | 96 | | |
94 | 97 | | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
95 | 101 | | |
96 | 102 | | |
97 | 103 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
36 | 39 | | |
37 | 40 | | |
38 | 41 | | |
| |||
97 | 100 | | |
98 | 101 | | |
99 | 102 | | |
100 | | - | |
| 103 | + | |
101 | 104 | | |
102 | 105 | | |
103 | 106 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
55 | | - | |
| 55 | + | |
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
| |||
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
64 | 67 | | |
65 | 68 | | |
66 | 69 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
308 | 308 | | |
309 | 309 | | |
310 | 310 | | |
311 | | - | |
| 311 | + | |
312 | 312 | | |
313 | 313 | | |
314 | 314 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
122 | 122 | | |
123 | 123 | | |
124 | 124 | | |
125 | | - | |
| 125 | + | |
126 | 126 | | |
127 | 127 | | |
128 | 128 | | |
129 | 129 | | |
130 | | - | |
| 130 | + | |
131 | 131 | | |
132 | 132 | | |
133 | 133 | | |
| |||
139 | 139 | | |
140 | 140 | | |
141 | 141 | | |
142 | | - | |
| 142 | + | |
143 | 143 | | |
144 | 144 | | |
145 | 145 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
115 | 115 | | |
116 | 116 | | |
117 | 117 | | |
118 | | - | |
| 118 | + | |
119 | 119 | | |
120 | 120 | | |
121 | 121 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
29 | 32 | | |
30 | 33 | | |
31 | 34 | | |
| |||
53 | 56 | | |
54 | 57 | | |
55 | 58 | | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
56 | 62 | | |
57 | 63 | | |
58 | 64 | | |
| |||
0 commit comments