Repository navigation
Commit ca37605
i18n(service-messaging): ship the notification objects and digest heading in zh-Hant, ar, fr and pt-BR (第 5 包的 A 半) (#30638)
<!-- claude-projects-attribution: {"github_login":"os-bill"} -->
_Requested by **Bill** · [project
thread](https://claude.ai/code/project/chan_016iMXWSZDzqWRWvWzdNo8wg?thread=cmsg_016iMXWSZDzqWRWvWzdNo8wgBxjikPH2bUin9o95gbAxsx)_
domain:server#2 · os-bill · session_01Utp6Cai5CRdAs4u9gTipWU
Refs #30512 — **第 5 包的 A 半** (package 5 of 11,
`@objectstack/service-messaging`, first half: `zh-Hant`, `ar`, `fr`,
`pt-BR`). The B half (`ru`, `de`, `ko`) follows as its own PR; the card
stays open until the last PR of the series flips the bundle check to the
platform locale table.
Clause-②: no
Metadata-protocol: none
## 维护者速读
- **改了什么:** 消息/通知七个对象(收件箱、回执、投递、偏好、模板、HTTP
投递、用户设备)的名称、字段、选项、帮助和视图名,以及摘要标题「您有 {{count}} 条通知」,补上繁中、阿语、法语、巴葡 4 种。这是第
5 包的 A 半;俄、德、韩在 B 半。
- **为什么改:** 平台语言表(#29428 裁决 F)要求 11 种语言;本包整包超过 3000 行,按席位裁决按语言拆成 A/B
两半,各自单独可绿。
- **风险与回滚:** 只加翻译数据和注册行,`messages.ts` 的语言类型只加宽到这 4 种(B 半再加 3
种);不动逻辑、schema、接口,原有 4 种一字未改。三处测试改动都是**前提变了、不是放宽**(见下文)。回滚即撤 PR。
- **先看:**
`src/translations/index.ts`、`messages.ts`(阿语摘要标题用计数式写法,避开复数变化),再看
`keyed-notification-text.integration.test.ts`。
- **两分钟验证:** `node scripts/check-i18n-bundles.mjs --filter=messaging` 输出
in sync;`pnpm --filter @objectstack/service-messaging test` 全绿。
- **需要你做的:** 无,席位落地。
## What changes
- Four new locales for the messaging objects under the platform locale
table's tags: each a `TAG.objects.generated.ts` with all 203 object
leaves plus its `TAG.source-hashes.generated.ts`, written by the repo's
own `os i18n extract --fill=default --source-hashes`, served through
`withSourceFallback`, `zh-CN` ahead of `zh-Hant` in `index.ts`.
- `messages.ts`: the digest heading in the four locales;
`MessagingLocale` widens to eight tags (the B half widens it to eleven),
so each half is green on its own.
- The extract command lists the four tags and its merge baseline imports
the four bundles, so `check:i18n` covers them from this PR on.
## Test changes — the premise moved, nothing loosened
- `keyed-notification-text.integration.test.ts` used `fr-FR` as its
recipient with no pack. With `fr` shipping, that premise is false for
French: the no-pack recipient and deployment default become `it-IT`
(Italian is not a platform-table language) with the same assertions,
including the single warning, and a new case pins a `fr-FR` recipient
reading the `fr` heading (`Vous avez 2 notifications`).
- `admin-copy-vocabulary.test.ts` and `setup-list-empty-states.test.ts`
list the bundles they hold to their wording rules; the four new bundles
join that list, so the rules now also cover them.
## Acceptance notes
- **Quality bar (#17508 / PR #19345):** every leaf written for the
reader; placeholders, code spans and identifiers byte-identical, checked
per leaf against `en`. Arabic is RTL prose with identifiers in Latin
script. `t()` selects no plural form, so the Arabic digest heading is a
tally (`عدد الإشعارات لديك: {{count}}`), correct for every count; the
comment in `messages.ts` says why.
- **Leaves equal to English, on purpose:** product and protocol names
`APNs`, `FCM`, `Android`, `iOS`, and one help leaf that is a list of
status codes, in every locale; beyond those, native words only: `fr`
`Notifications`, `Partition`, `Source`, `Version`, `Web`; `pt-BR`
`Status`, `Web`. `pt-BR` writes the payload as `Carga útil` rather than
the English loanword.
- No cross-locale coincidence: `check:i18n-stale-fill` passes with the
baseline untouched.
## Verification
<details><summary>Package suite, typecheck, build (verify lock, at the
rebased head)</summary>
```
turbo build --filter=@objectstack/service-messaging...: 16 tasks successful, exit 0
pnpm --filter @objectstack/service-messaging test && typecheck
Test Files 66 passed (66)
Tests 845 passed (845)
os-verify-lock: VERDICT command-exit 0
```
</details>
<details><summary>i18n gates and size</summary>
```
node scripts/check-i18n-bundles.mjs --filter=messaging in sync EXIT 0
node scripts/check-i18n-stale-fill.mjs OK (no new stale fills, 1 baselined) EXIT 0
eslint --no-inline-config on the changed .ts files: exit 0
changed lines 2195 (+2178 / -17), 15 files: under the 3000-line threshold
```
</details>
Derived gate families (dispatch-gates --commands, reconciled with
--ran): 62 run, 0 not measured, all exit 0; recorded in the
os-dev-report on #30512.
Dogfood: not run — content-only package PR, no `!` in the title and no
`(narrowing)` arm.
---
🤖 Generated with [Claude Code](https://claude.com/claude-code)
https://claude.ai/code/session_01Utp6Cai5CRdAs4u9gTipWU
---------
Co-authored-by: Claude <noreply@anthropic.com>1 parent 2d6402c commit ca37605
15 files changed
Lines changed: 2178 additions & 17 deletions
File tree
- .changeset
- packages/services/service-messaging
- scripts
- src
- objects
- 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 | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
52 | 56 | | |
53 | 57 | | |
54 | 58 | | |
| |||
79 | 83 | | |
80 | 84 | | |
81 | 85 | | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
82 | 90 | | |
83 | 91 | | |
84 | 92 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
86 | 86 | | |
87 | 87 | | |
88 | 88 | | |
89 | | - | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
90 | 92 | | |
91 | 93 | | |
92 | 94 | | |
| |||
487 | 489 | | |
488 | 490 | | |
489 | 491 | | |
490 | | - | |
| 492 | + | |
491 | 493 | | |
492 | 494 | | |
493 | 495 | | |
494 | 496 | | |
495 | | - | |
| 497 | + | |
496 | 498 | | |
497 | 499 | | |
498 | | - | |
499 | | - | |
| 500 | + | |
| 501 | + | |
500 | 502 | | |
501 | 503 | | |
502 | 504 | | |
503 | 505 | | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
504 | 518 | | |
505 | | - | |
| 519 | + | |
506 | 520 | | |
507 | 521 | | |
508 | 522 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
29 | 33 | | |
30 | 34 | | |
31 | 35 | | |
| |||
90 | 94 | | |
91 | 95 | | |
92 | 96 | | |
93 | | - | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
94 | 107 | | |
95 | 108 | | |
96 | 109 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
31 | 35 | | |
32 | 36 | | |
33 | 37 | | |
| |||
45 | 49 | | |
46 | 50 | | |
47 | 51 | | |
48 | | - | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
49 | 62 | | |
50 | 63 | | |
51 | 64 | | |
| |||
0 commit comments