Repository navigation
Commit 561d532
i18n(plugin-sharing): ship the sharing and queue objects in all eleven platform languages (#30767)
<!-- 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 8 of 11 (`@objectstack/plugin-sharing`). The
card stays open: approvals, 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
## 维护者速读
- **改了什么:** 共享插件的 5
个对象(记录共享、共享规则、共享链接、队列、队列成员)的名称、字段、选项、帮助和视图名,补上繁中、阿语、法语、巴葡、俄语、德语、韩语 7
种,与平台语言表的 11 种一致。队列和队列成员也在内;队列记录页的标题也补了这 7 种(与各语言队列对象名同词)。
- **为什么改:** 平台语言表要求每个界面带齐 11 种语言;这是第 3 期按包补齐的第 8 个包(每种语言 151 条)。用这 7
种语言的管理员打开「设置 → 共享规则 / 队列」不再看到英文。
- **风险与回滚:** 只加翻译数据和注册行,不动逻辑、schema、接口;原有 4
种语言一字未改。唯一的测试改动是「收件人类型在各对象上叫法一致」的测试多扫 7 种语言(覆盖变宽,没有放宽任何断言)。回滚即撤 PR。
- **先看:** `src/translations/index.ts`(按表标签注册,zh-CN 在 zh-Hant
前,每种语言带上页面标题)、`src/translations/pages.ts`(手写的队列页标题表),再看
`recipient-vocabulary-consistency.test.ts`,最后抽看任一语言的 `sys_queue` 段。
- **两分钟验证:** `node scripts/check-i18n-bundles.mjs --filter=sharing` 输出
`plugins/plugin-sharing in sync`;`pnpm --filter
@objectstack/plugin-sharing test` 全绿。
- **需要你做的:** 无,席位落地。
## What changes
- Seven new locales for the sharing package under the platform locale
table's tags (`zh-Hant`, `ar`, `fr`, `pt-BR`, `ru`, `de`, `ko`): each a
`TAG.objects.generated.ts` with all 151 object leaves of
`sys_record_share`, `sys_sharing_rule`, `sys_share_link`, `sys_queue`
and `sys_queue_member`, 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 three. `zh-CN` stays ahead of `zh-Hant` in `index.ts`.
- The hand-written page table `src/translations/pages.ts` (the queue
record page `sys_queue_detail`, from #30728) gains an entry per new
locale. Each value is the locale's own `sys_queue` object label, so the
page title and the object read the same word, and each records the same
`en` digest the existing three carry. `index.ts` passes each new
locale's `pages` entry and its recorded digest to `withSourceFallback`,
like the existing three.
- The extract command in `scripts/i18n-extract.config.ts` lists the
seven tags and its merge baseline imports the seven bundles with their
page entries, so `check:i18n` covers them from this PR on.
## Tests
- `recipient-vocabulary-consistency.test.ts` (each recipient option
reads the same on every object that offers it, within a locale) adds the
seven new bundles to its list. Coverage widens; no assertion changed.
- `sys-queue-page.test.ts` already iterates every locale of
`SharingTranslations` and checks the served page label equals the
table's, so the seven new page labels are held to it with no test edit.
## 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 seven locales OK, zero diffs). Arabic
is RTL prose with identifiers left in Latin script. `zh-Hant` was
checked character by character against OpenCC's Traditional (Taiwan)
conversion: no Simplified-only character remains.
- **Leaves equal to English, on purpose, each recorded by the extractor
as a source copy:** `fr` `Source`, `Description` (x2), `Audience`,
`Public (indexable)`; `pt-BR` `Token`; `de` `Name` (x2), `Team` (x2),
`Position` (x3), `Token`. All are the native words.
- No cross-locale coincidence: `check:i18n-stale-fill` passes with the
baseline untouched.
- **Observation, not changed here:** the queue page's members list title
in `src/sys-queue.page.ts` is an inline locale map with four entries
(`en`, `zh-CN`, `ja-JP`, `es-ES`), none for the seven new locales. It is
page prose outside this PR's surface.
- **Deviation from the handover commit:** carried from the released
handover commit `ec0e96dc` (session `session_01Utp6Cai5CRdAs4u9gTipWU`),
with one addition: main gained the queue record page and its
hand-written four-locale `pages` section (#30728) after that commit was
written, so the commit's `index.ts` and extract-config hunks conflicted.
The resolution keeps #30728's wiring and adds the seven locales through
it, which needed the seven page labels in `pages.ts`. The 14 generated
bundle and source-hash files and the test change are byte-identical to
the handover commit (blob ids compared); the changeset gains one
sentence for the page title. The serial row "after #30208 lands" was
cleared by the seat (6672288503): #30208 row 7, which first put
`sys_queue` / `sys_queue_member` into this package's extract, landed in
PR #30551.
## 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-sharing test && typecheck (at head dc12d9d, on main e00bcc6)
Test Files 67 passed (67)
Tests 1424 passed (1424)
check:test-typecheck: OK (tsconfig.test.json)
os-verify-lock: VERDICT command-exit 0
same suite at cb13b51f (the same patch on main e8dc483): 67 files, 1424 passed, VERDICT command-exit 0
```
</details>
<details><summary>i18n gates and the derived families</summary>
```
node scripts/check-i18n-bundles.mjs --filter=sharing (at dc12d9d)
plugins/plugin-sharing in sync (21 bundle(s)) EXIT 0
node scripts/check-i18n-stale-fill.mjs (at dc12d9d)
check-i18n-stale-fill: OK (11 bundle set(s) — no new stale fills, 1 baselined). EXIT 0
dispatch-gates --commands (at cb13b51f): 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 dc12d9d's tree: the identical 61-command list
pnpm lint (repo-wide, at cb13b51f): exit 0
eslint --no-inline-config on the changed .ts files: exit 0
changed lines 2694 (+2691 / -3), 19 files: under the 3000-line human-merge threshold
```
</details>
The branch is one commit on `main` `e00bcc6a` (after #30744 landed). Its
diff has the same patch id (`3f616c44`) as `cb13b51f`, where the derived
families ran on main `e8dc4833`; none of the five main commits in
between touches `plugin-sharing` (they are #30744 itself, #30734 in
service-settings, plugin-auth, plugin-email and service-sms, and three
in cloud-connection, the dispatch skill and the UI packages). The
package suite and both i18n checks were re-run on this head's tree.
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 1371b9d commit 561d532
19 files changed
Lines changed: 2691 additions & 3 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 | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
51 | 58 | | |
52 | 59 | | |
53 | 60 | | |
| |||
73 | 80 | | |
74 | 81 | | |
75 | 82 | | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
76 | 90 | | |
77 | 91 | | |
78 | 92 | | |
| |||
| 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 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
0 commit comments