Repository navigation
Commit 2f05a46
i18n(platform-objects): ship the platform objects, Setup, Studio and Account in French (#31233)
<!-- claude-projects-attribution: {"github_login":"marchtian"} -->
_Requested by **田騏** · [project
thread](https://claude.ai/code/project/chan_01VmuUhXU9SSUzqJYyXSmYSi?thread=cmsg_01VmuUhXU9SSUzqJYyXSmYSiR7jUqx4egncChjbUD2S9oH)_
Part of #30512
Fixes #28107
Clause-②: no
Metadata-protocol: none
## 维护者速读
- 改了什么:给 `@objectstack/platform-objects` 加上法语(fr):平台对象、Studio
的元数据表单、Setup/Studio/Account 导航、系统概览仪表板和用户/组织记录页的内嵌文字,做法与刚合并的
ar(#31120)逐文件一致。
- 为什么改:语言设为 fr 的用户在主页动态里读到「A modifié User « … » : Banned et Ban
Reason」,法语句子里夹着英文字段名(#28107);fr 也是 #30512 要补的第三个语言。
- 风险与回滚:只新增 fr 文件、注册行和测试里的语言列表,不改任何已有语言的文字;新文字同样走 source-hash 回退。回滚即
revert 本 PR。
-
先看:`packages/platform-objects/src/apps/translations/fr.ts`(导航钉住项),`packages/plugins/plugin-audit/src/activity-summary-fr-sys-user-labels.test.ts`(#28107
的守护测试),`fr.metadata-forms.generated.ts` 里 repeater 行属性那几处带上父名的译法。
- 两分钟验证:`cd packages/plugins/plugin-audit && npx vitest run
src/activity-summary-fr-sys-user-labels.test.ts`,预期 5 个测试通过,句子为「A
modifié Utilisateur « Carl Edited » : Banni et Motif du bannissement」。
- 需要你做的:生成文件让 PR 超过 3000 行,座位契约复审 ACCEPT 后请人工合并。
## What changes
- New `fr` bundles in `packages/platform-objects/src/apps/translations`:
`fr.objects.generated.ts` (1697 leaves),
`fr.metadata-forms.generated.ts` (1263 leaves), their provenance table
`fr.source-hashes.generated.ts` (183 deliberate byte copies of `en`,
listed under Acceptance notes), the hand-authored `fr.ts` (140 leaves)
and `fr.source-hashes.ts` recording the `en` digest of every hand leaf.
- Registration: the extract config's `--locales` docstring and
`translations:` baseline, `setup.translation.ts`, the `apps` barrel, and
`metadata-translations/index.ts`.
- Inline maps: 36 in `sys-user.page.ts`, 6 in
`sys-organization.page.ts`, and the System Overview null label in
`system.datasets.ts`.
- Wording pins: `nav_account_approvals` reads as plugin-approvals'
`my_pending` label (`Mes approbations en attente`),
`nav_assignment_rules` as `sys_assignment_rule`'s plural label (`Règles
d’attribution`), each `nav_settings_*` (including
`nav_settings_access_policy`) as its service-settings hub title,
`nav_settings_hub` as the console's `backToHub` (`Tous les paramètres`),
and the four #30935 keys: `grp_account_ai_assistant` = `Assistant IA`;
both `nav_connect_agent` entries and `pages.connect_agent.label` =
`Connecter un assistant IA`.
- `fr.source-hashes.ts` also records `nav_settings_access_policy`, which
the `ar` and `zh-Hant` tables leave legacy-trusted.
- Changeset `.changeset/30512-platform-objects-fr.md` (patch).
## Tests
- `fr` added to the locale lists of every test #31120 widened for `ar`
(vocabulary, nav parity, dead-key tombstone, source-hash, copy tests,
record-page tabs, plugin translation loads), plus plugin-approvals
`approval-status-vocabulary`, plugin-security
`people-org-assignment-nav-contribution` and service-settings
`setup-nav-hub-parity`. The cli `platform-page-i18n-parity` LOCALE_KEY
shape already accepts `fr`.
- New
`packages/plugins/plugin-audit/src/activity-summary-fr-sys-user-labels.test.ts`
(#28107): an i18n service holding what a booted kernel holds (this
plugin's bundle and the platform Setup bundle, every locale) composes a
`sys_user` update summary for a reader whose locale is `fr` or `fr-FR`.
The reader gets `A modifié Utilisateur « Carl Edited » : Banni et Motif
du bannissement`, and a tracked change names `Motif du bannissement`; an
`en` control keeps `Updated User "Carl Edited": Banned and Ban Reason`.
Ablation: with the platform `fr` bundle left out of the service, three
cases fail with `A modifié User « Carl Edited » : Banned et Ban Reason`,
the sentence #28107 reported.
## Acceptance notes
- Every leaf is translated. The 183 byte copies of `en` the extract
records are French words spelled like the English (`Description`,
`Type`, `Source`, `Version`, `Navigation`, `Configuration`, `Kanban`,
…), identifiers and header names (`ID`, `API`, `JWKS`, `JWKS URI`,
`Message-ID`, `Reply-To`, `Cc`, `cron`, `snake_case`), lowercase option
values that read the same in French (`marketing`, `notification`,
`workflow`, `package`), and the five JSON or scope examples kept
verbatim as every locale keeps them.
- Where a catalog test refuses an `en` echo (repeater row properties,
dashboard header children, System Overview captions), the leaf names its
parent instead (`ID du nœud`, `Description de l’option`, `Type de
variable`, `Boutons d’action`, `Nombre de sessions`), as `es-ES` does.
- Typography follows `ui/packages/i18n` `fr`: a plain space before `: ;
? !`, plain spaces inside « », the typographic apostrophe, sentence
case.
- `Position` on the add-record button is `Position` (the place); the job
position is `Poste`. A hook's `Body` is `Corps`. Adjectives agree with
the object they qualify (`Toutes`, `Révoquées`, `Désactivée`, …).
- Business units are `Unités commerciales`; no `sys_business_unit*`
label says `Département` (`bu-rename-consistency`).
## Verification
- `os i18n extract
packages/platform-objects/scripts/i18n-extract.config.ts
--locales=zh-CN,ja-JP,es-ES,zh-Hant,ar,fr --fill=default
--source-hashes`: regenerates the two `fr` bundles byte-identical and
leaves every other locale unchanged, before and after the merge of
`origin/main`.
- `vitest run` in platform-objects: 119 files, 1746 tests passed.
plugin-approvals `approval-status-vocabulary` (6), plugin-security
`people-org-assignment-nav-contribution` (5), service-settings
`setup-nav-hub-parity` (15), cli `platform-page-i18n-parity` (27) and
the new plugin-audit test (5) passed.
- platform-objects `typecheck`: exit 0.
- `dispatch-gates --ran` at dd9303a (after the merge of `origin/main`):
64 derived families, 64 run, 0 NOT-MEASURED, all exit 0 (including
`check:i18n`, `check:dts-closure`, `check:dual-build-cjs-loads`).
- `pnpm lint`: exit 0. "Lint · docs & code guards" lane: 52 of its 53
run steps exit 0 locally (including `check:i18n-stale-fill` and
`check:cli-command-ids`); the 53rd is `lane-verdict.mjs`, which reads
`GITHUB_JOB` and only measures in CI.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
---------
Co-authored-by: Claude <noreply@anthropic.com>1 parent 300f740 commit 2f05a46
37 files changed
Lines changed: 7492 additions & 48 deletions
File tree
- .changeset
- packages
- platform-objects
- scripts
- src
- apps
- dashboards
- translations
- identity
- metadata-translations
- pages
- plugins
- plugin-approvals/src/translations
- plugin-audit/src
- plugin-security/src
- services/service-settings/src
| 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 | | |
| |||
223 | 223 | | |
224 | 224 | | |
225 | 225 | | |
| 226 | + | |
226 | 227 | | |
227 | 228 | | |
228 | 229 | | |
229 | 230 | | |
230 | 231 | | |
231 | 232 | | |
| 233 | + | |
232 | 234 | | |
233 | 235 | | |
234 | 236 | | |
| |||
253 | 255 | | |
254 | 256 | | |
255 | 257 | | |
| 258 | + | |
256 | 259 | | |
257 | 260 | | |
258 | 261 | | |
| |||
355 | 358 | | |
356 | 359 | | |
357 | 360 | | |
| 361 | + | |
358 | 362 | | |
359 | 363 | | |
360 | 364 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| 35 | + | |
35 | 36 | | |
36 | 37 | | |
37 | 38 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
60 | | - | |
| 60 | + | |
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
| 50 | + | |
50 | 51 | | |
51 | 52 | | |
52 | 53 | | |
53 | 54 | | |
54 | 55 | | |
55 | 56 | | |
| 57 | + | |
56 | 58 | | |
57 | 59 | | |
58 | 60 | | |
59 | 61 | | |
60 | 62 | | |
61 | 63 | | |
| 64 | + | |
62 | 65 | | |
63 | 66 | | |
64 | 67 | | |
| |||
133 | 136 | | |
134 | 137 | | |
135 | 138 | | |
136 | | - | |
| 139 | + | |
137 | 140 | | |
138 | | - | |
| 141 | + | |
139 | 142 | | |
140 | 143 | | |
141 | 144 | | |
142 | 145 | | |
143 | 146 | | |
| 147 | + | |
144 | 148 | | |
145 | 149 | | |
146 | 150 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
20 | 21 | | |
21 | | - | |
| 22 | + | |
22 | 23 | | |
23 | 24 | | |
24 | 25 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
112 | 112 | | |
113 | 113 | | |
114 | 114 | | |
| 115 | + | |
115 | 116 | | |
116 | 117 | | |
117 | | - | |
| 118 | + | |
118 | 119 | | |
119 | 120 | | |
120 | 121 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
| 63 | + | |
63 | 64 | | |
64 | | - | |
| 65 | + | |
65 | 66 | | |
66 | 67 | | |
67 | 68 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
| |||
24 | 25 | | |
25 | 26 | | |
26 | 27 | | |
| 28 | + | |
27 | 29 | | |
28 | 30 | | |
29 | 31 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| 30 | + | |
30 | 31 | | |
31 | 32 | | |
32 | 33 | | |
33 | 34 | | |
34 | 35 | | |
35 | 36 | | |
36 | 37 | | |
| 38 | + | |
37 | 39 | | |
38 | 40 | | |
39 | 41 | | |
| |||
0 commit comments