Skip to content

Commit 9a78fdc

Browse files
committed
fix(i18n): drop the undeclared name: key from all nine i18n-extract configs
All nine `scripts/i18n-extract.config.ts` opened their `defineStack({ … })` with a top-level `name:` that `ObjectStackDefinitionSchema` does not declare. The parse dropped the value at load and the #4167 unknown-stack-key lint reported it once per package on every `pnpm check:i18n` run — a warning that appeared in an otherwise fully green run, which is exactly how a team learns to read warnings as noise. The lint was correct; the configs were not. Nothing has ever read a stack's top-level `name`: `os i18n extract` is handed the *parsed* `defineStack` result, from which the key is already gone before the extractor starts. So the fix belongs at the producer (delete the nine keys), not in `packages/spec` as a new authorable key invented to accommodate one typo copied nine times (Prime Directive #12 — fix the metadata, not the runtime). Extraction output is unchanged and verified, not assumed: after the deletion `node scripts/check-i18n-bundles.mjs --write` regenerates all 40 bundles across the nine packages byte-identically (`git status` clean for every `src/translations/**`), and `pnpm check:i18n` stays green — now silent. Fixes #4736 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015Br2xsJsczFsTR9bvbh2Ny
1 parent 25784cf commit 9a78fdc

10 files changed

Lines changed: 28 additions & 10 deletions

File tree

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
---
2+
---
3+
4+
chore(i18n): drop the undeclared `name:` key from all nine `scripts/i18n-extract.config.ts`
5+
6+
Releases nothing — build-time-only extract fixtures (`scripts/` is not in any
7+
package's published `files`), no runtime or published behaviour changes.
8+
9+
Every one of the nine extract configs opened its `defineStack({ … })` with a
10+
`name:` that the stack schema does not declare, so `ObjectStackDefinitionSchema`
11+
dropped the value at load and the #4167 unknown-stack-key lint reported it —
12+
once per package, on every `pnpm check:i18n` run, in a run that was otherwise
13+
fully green:
14+
15+
```
16+
defineStack: stack.name: 'name' is not a declared stack key, so its value is dropped at load — did you mean 'pages'?
17+
```
18+
19+
The lint was right and the configs were wrong: nothing has ever read a stack's
20+
top-level `name``os i18n extract` receives the *parsed* `defineStack` result,
21+
from which the key is already gone — so the nine values were inert. The fix is
22+
at the producer (#4736 decision A: delete the nine keys), not a new authorable
23+
key in `packages/spec` to accommodate one typo copied nine times.
24+
25+
Extraction output is unchanged: after the deletion a full
26+
`node scripts/check-i18n-bundles.mjs --write` regenerates all 40 bundles across
27+
the nine packages with a byte-identical result, and `pnpm check:i18n` stays
28+
green — now without the warning.

packages/platform-objects/scripts/i18n-extract.config.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,8 +178,6 @@ import { jaJP } from '../src/apps/translations/ja-JP.js';
178178
import { esES } from '../src/apps/translations/es-ES.js';
179179

180180
export default defineStack({
181-
name: 'platform-objects-i18n-extract',
182-
183181
objects: [
184182
// Identity
185183
SysUser,

packages/plugins/plugin-approvals/scripts/i18n-extract.config.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ import { jaJPObjects } from '../src/translations/ja-JP.objects.generated.js';
2727
import { esESObjects } from '../src/translations/es-ES.objects.generated.js';
2828

2929
export default defineStack({
30-
name: 'plugin-approvals-i18n-extract',
3130
objects: [SysApprovalRequest, SysApprovalAction, SysApprovalDelegation] as any,
3231
translations: [
3332
{ en: { objects: enObjects } },

packages/plugins/plugin-audit/scripts/i18n-extract.config.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ import { jaJPObjects } from '../src/translations/ja-JP.objects.generated.js';
2222
import { esESObjects } from '../src/translations/es-ES.objects.generated.js';
2323

2424
export default defineStack({
25-
name: 'plugin-audit-i18n-extract',
2625
objects: [SysAuditLog, SysActivity, SysComment] as any,
2726
translations: [
2827
{ en: { objects: enObjects } },

packages/plugins/plugin-security/scripts/i18n-extract.config.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ import { jaJPObjects } from '../src/translations/ja-JP.objects.generated.js';
2424
import { esESObjects } from '../src/translations/es-ES.objects.generated.js';
2525

2626
export default defineStack({
27-
name: 'plugin-security-i18n-extract',
2827
objects: [SysPosition, SysCapability, SysPermissionSet, SysUserPermissionSet, SysPositionPermissionSet, SysUserPosition] as any,
2928
translations: [
3029
{ en: { objects: enObjects } },

packages/plugins/plugin-sharing/scripts/i18n-extract.config.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ import { jaJPObjects } from '../src/translations/ja-JP.objects.generated.js';
2020
import { esESObjects } from '../src/translations/es-ES.objects.generated.js';
2121

2222
export default defineStack({
23-
name: 'plugin-sharing-i18n-extract',
2423
objects: [SysRecordShare, SysSharingRule, SysShareLink] as any,
2524
translations: [
2625
{ en: { objects: enObjects } },

packages/plugins/plugin-webhooks/scripts/i18n-extract.config.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ import { jaJPObjects } from '../src/translations/ja-JP.objects.generated.js';
2323
import { esESObjects } from '../src/translations/es-ES.objects.generated.js';
2424

2525
export default defineStack({
26-
name: 'plugin-webhooks-i18n-extract',
2726
objects: [SysWebhook] as any,
2827
translations: [
2928
{ en: { objects: enObjects } },

packages/services/service-messaging/scripts/i18n-extract.config.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ import { jaJPObjects } from '../src/translations/ja-JP.objects.generated.js';
2727
import { esESObjects } from '../src/translations/es-ES.objects.generated.js';
2828

2929
export default defineStack({
30-
name: 'service-messaging-i18n-extract',
3130
objects: [
3231
InboxMessage,
3332
NotificationReceipt,

packages/services/service-realtime/scripts/i18n-extract.config.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ import { jaJPObjects } from '../src/translations/ja-JP.objects.generated.js';
2020
import { esESObjects } from '../src/translations/es-ES.objects.generated.js';
2121

2222
export default defineStack({
23-
name: 'service-realtime-i18n-extract',
2423
objects: [SysPresence] as any,
2524
translations: [
2625
{ en: { objects: enObjects } },

packages/services/service-storage/scripts/i18n-extract.config.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ import { jaJPObjects } from '../src/translations/ja-JP.objects.generated.js';
2323
import { esESObjects } from '../src/translations/es-ES.objects.generated.js';
2424

2525
export default defineStack({
26-
name: 'service-storage-i18n-extract',
2726
objects: [SystemFile, SystemUploadSession] as any,
2827
translations: [
2928
{ en: { objects: enObjects } },

0 commit comments

Comments
 (0)