Commit aff9e56
Closes the fillable half of #3762. Follows #3370 → #3753 → #3768.
Nine packages own a translation bundle; ONE was wired into a drift check. The
other eight shipped a `scripts/i18n-extract.config.ts` that nothing ever ran,
and four had already drifted — plugin-security / plugin-audit / plugin-sharing
/ plugin-webhooks, 4 locales each out of date. Exactly the silent staleness
`pnpm check:i18n` exists to prevent, sitting one directory outside the only
path it guarded.
Translated: plugin-security (45 strings/locale), plugin-webhooks (15),
plugin-audit (8), plugin-sharing (7), service-storage (7) — 246 translations,
zero untranslated declared strings across zh-CN / ja-JP / es-ES. Most were
newly VISIBLE rather than newly missing: #3753 taught the coverage detector to
walk action `params`, `resultDialog`, `listViews`, object `description`, field
`help`/`placeholder`. Wording was harvested from the repo's own bundles first
(1382 unambiguous en→locale mappings scraped from what is already translated),
so `Created At` is `创建时间` here because that is what it is everywhere else;
only 59 strings had no precedent and were written by hand. Protocol tokens are
deliberately identical across locales: GET/POST/PUT/PATCH/DELETE, ETag, ACL,
URL.
`scripts/check-i18n-bundles.mjs` replaces the single-package `pnpm check:i18n`
and covers all nine (40 bundles). It does not restate each package's command —
it parses the regenerate command out of that config's own docstring and runs
exactly that, plus `--check`, so the documented command and the gate cannot
diverge. Same anti-drift principle as making the coverage detector share the
extractor's walker in #3753: one source, not two that agree today.
The #3768 coverage ratchet grows the same way, `examples/*` → twelve configs:
app-showcase / app-todo / app-crm at 456 / 212 / 97, platform-objects at 231,
and the other eight packages at 0 — meaning the ratchet IS the strict gate for
them, any regression immediately red rather than merely visible.
Both gates were verified to bite, not merely run: deleting a key block the
schema still declares reports DRIFTED and exits 1, restoring exits 0 (a
hand-edited translation correctly does NOT trip it — merge mode preserves it,
and the gate is about schema drift); the ratchet was proven in #3768 (97 → 99,
exit 1).
A real truncation bug this exposed: wiring the ratchet to platform-objects
failed on unparseable JSON whose output was exactly 65536 bytes — one pipe
buffer. `console.log(big)` followed by `process.exit(1)` tears the process down
before an async pipe write drains; interactively it looks perfect because
stdout to a TTY is synchronous, but piped — i.e. every scripted consumer — it
silently yields invalid JSON. `emitJson` (packages/cli/src/utils/format.ts)
awaits the write callback and sets `process.exitCode` instead; `lint`,
`i18n check` and `i18n extract` use it, and `os lint --json` on
platform-objects goes from 65536 truncated bytes to 234603 that parse. ~30
other CLI commands share the pattern and are NOT touched here — a mechanical
sweep that could not be verified command-by-command in this change. The ratchet
also captures to a file rather than a pipe regardless, since a gate that can
read a truncated payload and report a smaller number is worse than no gate.
The nine documented regenerate commands gain `--no-metadata-forms` (#3768) —
the Studio metadata-form baseline belongs to platform-objects alone, not a copy
in every plugin.
Not in scope: platform-objects' own 77-per-locale gap is `apps.*` /
`dashboards.*` navigation and widget labels, which live outside the `objects`
subtree, so the package's `--objects-only` extract cannot scaffold them — which
is why `--check` reports in sync while coverage reports 77 missing. That needs
an emit decision (drop `--objects-only`, or a companion `.apps.generated.ts`)
before any translating; it stays in #3762 and the 231 is frozen in the baseline
meanwhile. Also filed: #3778.
Co-authored-by: Jack Zhuang <277994282+os-zhuang@users.noreply.github.com>
Co-authored-by: Claude <noreply@anthropic.com>
1 parent 7687f7b commit aff9e56
38 files changed
Lines changed: 1067 additions & 110 deletions
File tree
- .changeset
- .github/workflows
- packages
- cli/src
- commands
- i18n
- utils
- plugins
- plugin-audit
- scripts
- src/translations
- plugin-security
- scripts
- src/translations
- plugin-sharing
- scripts
- src/translations
- plugin-webhooks
- scripts
- src/translations
- services
- service-messaging/scripts
- service-realtime/scripts
- service-storage
- scripts
- src/translations
- scripts
| 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 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
262 | 262 | | |
263 | 263 | | |
264 | 264 | | |
265 | | - | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
266 | 273 | | |
267 | 274 | | |
268 | 275 | | |
269 | 276 | | |
270 | 277 | | |
271 | 278 | | |
272 | 279 | | |
273 | | - | |
274 | | - | |
275 | | - | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
276 | 283 | | |
277 | 284 | | |
278 | | - | |
279 | | - | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
280 | 289 | | |
281 | 290 | | |
282 | 291 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
188 | 188 | | |
189 | 189 | | |
190 | 190 | | |
191 | | - | |
| 191 | + | |
192 | 192 | | |
193 | 193 | | |
194 | 194 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
| 30 | + | |
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
15 | 16 | | |
16 | 17 | | |
17 | 18 | | |
| |||
77 | 78 | | |
78 | 79 | | |
79 | 80 | | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | | - | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
86 | 85 | | |
87 | 86 | | |
88 | 87 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
16 | 17 | | |
17 | 18 | | |
18 | 19 | | |
| |||
159 | 160 | | |
160 | 161 | | |
161 | 162 | | |
162 | | - | |
| 163 | + | |
163 | 164 | | |
164 | 165 | | |
165 | 166 | | |
166 | 167 | | |
167 | 168 | | |
168 | 169 | | |
169 | 170 | | |
170 | | - | |
| 171 | + | |
171 | 172 | | |
172 | 173 | | |
173 | 174 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| 28 | + | |
28 | 29 | | |
29 | 30 | | |
30 | 31 | | |
| |||
672 | 673 | | |
673 | 674 | | |
674 | 675 | | |
675 | | - | |
| 676 | + | |
676 | 677 | | |
677 | 678 | | |
678 | 679 | | |
| |||
682 | 683 | | |
683 | 684 | | |
684 | 685 | | |
685 | | - | |
686 | | - | |
| 686 | + | |
687 | 687 | | |
688 | 688 | | |
689 | 689 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 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 | + | |
10 | 35 | | |
11 | 36 | | |
12 | 37 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| |||
Lines changed: 17 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
40 | 44 | | |
41 | 45 | | |
42 | 46 | | |
| |||
73 | 77 | | |
74 | 78 | | |
75 | 79 | | |
76 | | - | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
77 | 85 | | |
78 | 86 | | |
79 | 87 | | |
| |||
140 | 148 | | |
141 | 149 | | |
142 | 150 | | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
143 | 159 | | |
144 | 160 | | |
145 | 161 | | |
| |||
0 commit comments