Repository navigation
Commit f41ddbd
i18n(plugin-sharing): ship the assignment rule object in all eleven platform languages (#30856)
<!-- 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 — a follow-up to package 8
(`@objectstack/plugin-sharing`, #30767): the assignment rule object
`sys_assignment_rule`, which #30760 added to this package after #30767
landed. It folds in the translations #30066 owed for that object
(landing note 6677585327), so no separate card is needed. 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
## 维护者速读
- **改了什么:** 新对象「分配规则」(`sys_assignment_rule`) 的名称、说明、字段名与帮助、两组选项(分配给:队列 /
用户;选择成员:轮流 / 负载最少)和「按对象」视图名,补上英文以外全部 10 种语言(简中、日、西 + 繁中、阿、法、巴葡、俄、德、韩),每种
30 条。
- **为什么改:** #30760 加了这个对象,但没进本包的抽取配置,所以没有任何翻译;用任何非英文语言的管理员打开「设置 →
分配规则」都看到英文。本 PR 把它加进抽取配置,从此 `check:i18n` 也覆盖它。
- **风险与回滚:** 只改抽取配置的对象列表、与之同步的归属测试清单(一行)和翻译数据,不动逻辑、schema、接口;其它 5
个对象的译文一字未改。选项「队列」「用户」沿用各语言在队列、共享对象上的同一个词,「收件人类型叫法一致」的测试照常通过。回滚即撤 PR。
- **先看:** `scripts/i18n-extract.config.ts`(对象列表多了 `SysAssignmentRule`)和
`src/translations/bundle-ownership.test.ts`(同步加一行),再抽看任一语言
`TAG.objects.generated.ts` 的 `sys_assignment_rule` 段。
- **两分钟验证:** `node scripts/check-i18n-bundles.mjs --filter=sharing` 输出
`plugins/plugin-sharing in sync`;`pnpm --filter
@objectstack/plugin-sharing test` 全绿。
- **需要你做的:** 无,席位落地。
## What changes
- `scripts/i18n-extract.config.ts` lists `SysAssignmentRule` beside the
five objects it already extracts, so the repo's own `os i18n extract
--fill=default --source-hashes` writes its 30 leaves into
`en.objects.generated.ts` and every locale bundle, and `check:i18n`
covers them from this PR on.
- The 30 leaves (label, plural label, description, the field labels and
help, the `recipient_type` options `queue` / `user`, the `strategy`
options `round_robin` / `least_loaded`, and the `by_object` view) are
translated in `zh-CN`, `ja-JP`, `es-ES`, `zh-Hant`, `ar`, `fr`, `pt-BR`,
`ru`, `de` and `ko`.
- Each locale reuses its existing vocabulary: the `queue` / `user`
options read exactly as on `sys_sharing_rule` and `sys_queue_member`,
"Organization", "Name", "Display Label", "Description", "Object",
"Active" and "By Object" read as on `sys_sharing_rule`, and the object's
name follows the word each locale's `sys_queue` help already uses for
assignment rules (for `zh-CN` and `ja-JP` also the Setup menu entry
#30760 added).
- The `load` help names the `least_loaded` option by its translated
label in each locale, and both expression examples (`record.priority ==
"high"`, `record.status != "closed"`) stay byte-identical.
## Tests
- `bundle-ownership.test.ts` (ADR-0029 D8) lists the objects the extract
config owns and is red when the two lists differ; `sys_assignment_rule`
is added to it, the one line this config change requires (without it the
package suite fails: "bundle carries objects this package's extract
config does not own").
- `recipient-vocabulary-consistency.test.ts` already scans every object
of every locale, so the new object is held to "one option key, one
rendering per locale" with no edit.
- No other test changes.
## 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` (key set, `{{holes}}`, `{holes}`,
backtick spans, angle tokens: all ten locales OK, zero diffs; 181 leaves
each). Arabic is RTL prose with identifiers and the expression examples
left in Latin script. `zh-Hant` was checked against OpenCC's Traditional
(Taiwan) conversion: no Simplified-only character in the 30 new strings.
- **Leaves equal to English, on purpose, each recorded by the extractor
as a source copy:** `fr` `Description`, `Condition`; `de` `Name`. All
are the native words.
- No cross-locale coincidence: `check:i18n-stale-fill` passes with the
baseline untouched.
- No string opens with `os ` followed by a lowercase word
(`check-cli-command-ids` passes), and the whole "Lint · docs & code
guards" lane was run locally before opening.
## Verification
<details><summary>Package suite, typecheck, build (verify
lock)</summary>
```
turbo run build --filter=!@objectstack/docs: 118/118 tasks successful, exit 0 (at 59684ad1, the patch before the ownership line)
pnpm --filter @objectstack/plugin-sharing test && typecheck (at 8f3e8b49, the same patch on main c17719d)
Test Files 67 passed (67)
Tests 1436 passed (1436)
check:test-typecheck: OK (tsconfig.test.json)
os-verify-lock: VERDICT command-exit 0
first run at 59684ad1, without the bundle-ownership.test.ts line: 1 failed (the ownership guard naming sys_assignment_rule), 1435 passed; VERDICT command-exit 1
```
</details>
<details><summary>i18n gates, the derived families and the docs &
code guards lane</summary>
```
node scripts/check-i18n-bundles.mjs --filter=sharing (at 753d30d, this head)
check-i18n-bundles: OK (1 package(s) — all bundles in sync, no undeclared authoring keys). EXIT 0
node scripts/check-i18n-stale-fill.mjs (at 753d30d)
check-i18n-stale-fill: OK (11 bundle set(s) — no new stale fills, 1 baselined). EXIT 0
dispatch-gates --commands (at 8f3e8b49): 61 families, each run and recorded with its exit code: 61 x exit 0
dispatch-gates --ran: 61 derived, 61 run, 0 NOT-MEASURED
pnpm lint (repo-wide, at 8f3e8b49): exit 0
CI lane "Lint · docs & code guards", every command run locally (at 8f3e8b49)
56 commands (lane-verdict excepted), 56 x exit 0, check-cli-command-ids included
re-derived at 753d30d: 62 families, the 61 above plus `node scripts/ci/snapshot-next.mjs --self-test`
(main added it to lint.yml's CI-engine job); run here: exit 0. `pnpm check:undeclared-dep-imports`
(its script changed on main) re-run here: exit 0
changed lines 744 (+742 / -2), 16 files: under the 3000-line human-merge threshold
```
</details>
The branch is one commit on `main` `ae82d057` (after #30830 landed). Its
diff has the same patch id (`0760465a`) as `8f3e8b49`, where the suite,
the derived families, `pnpm lint` and the docs & code guards lane ran on
main `c17719dd`; none of the main commits in between touches
`plugin-sharing`. Both i18n checks and the two families that changed on
main 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 042efb7 commit f41ddbd
16 files changed
Lines changed: 742 additions & 2 deletions
File tree
- .changeset
- packages/plugins/plugin-sharing
- 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 | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
46 | | - | |
| 46 | + | |
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
| |||
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
76 | | - | |
| 76 | + | |
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
343 | 343 | | |
344 | 344 | | |
345 | 345 | | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
346 | 412 | | |
347 | 413 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| 25 | + | |
25 | 26 | | |
26 | 27 | | |
27 | 28 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
343 | 343 | | |
344 | 344 | | |
345 | 345 | | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
346 | 412 | | |
347 | 413 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
21 | 22 | | |
22 | 23 | | |
23 | 24 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
343 | 343 | | |
344 | 344 | | |
345 | 345 | | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
346 | 412 | | |
347 | 413 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
343 | 343 | | |
344 | 344 | | |
345 | 345 | | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
346 | 412 | | |
347 | 413 | | |
0 commit comments