From 9a78fdc62feef6f76c8e7964b40d5ba75093b3da Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 3 Aug 2026 07:40:08 +0000 Subject: [PATCH] fix(i18n): drop the undeclared `name:` key from all nine i18n-extract configs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Claude-Session: https://claude.ai/code/session_015Br2xsJsczFsTR9bvbh2Ny --- ...8n-extract-configs-drop-undeclared-name.md | 28 +++++++++++++++++++ .../scripts/i18n-extract.config.ts | 2 -- .../scripts/i18n-extract.config.ts | 1 - .../scripts/i18n-extract.config.ts | 1 - .../scripts/i18n-extract.config.ts | 1 - .../scripts/i18n-extract.config.ts | 1 - .../scripts/i18n-extract.config.ts | 1 - .../scripts/i18n-extract.config.ts | 1 - .../scripts/i18n-extract.config.ts | 1 - .../scripts/i18n-extract.config.ts | 1 - 10 files changed, 28 insertions(+), 10 deletions(-) create mode 100644 .changeset/i18n-extract-configs-drop-undeclared-name.md diff --git a/.changeset/i18n-extract-configs-drop-undeclared-name.md b/.changeset/i18n-extract-configs-drop-undeclared-name.md new file mode 100644 index 0000000000..09a5dc86f7 --- /dev/null +++ b/.changeset/i18n-extract-configs-drop-undeclared-name.md @@ -0,0 +1,28 @@ +--- +--- + +chore(i18n): drop the undeclared `name:` key from all nine `scripts/i18n-extract.config.ts` + +Releases nothing — build-time-only extract fixtures (`scripts/` is not in any +package's published `files`), no runtime or published behaviour changes. + +Every one of the nine extract configs opened its `defineStack({ … })` with a +`name:` that the stack schema does not declare, so `ObjectStackDefinitionSchema` +dropped the value at load and the #4167 unknown-stack-key lint reported it — +once per package, on every `pnpm check:i18n` run, in a run that was otherwise +fully green: + +``` +defineStack: stack.name: 'name' is not a declared stack key, so its value is dropped at load — did you mean 'pages'? +``` + +The lint was right and the configs were wrong: nothing has ever read a stack's +top-level `name` — `os i18n extract` receives the *parsed* `defineStack` result, +from which the key is already gone — so the nine values were inert. The fix is +at the producer (#4736 decision A: delete the nine keys), not a new authorable +key in `packages/spec` to accommodate one typo copied nine times. + +Extraction output is unchanged: after the deletion a full +`node scripts/check-i18n-bundles.mjs --write` regenerates all 40 bundles across +the nine packages with a byte-identical result, and `pnpm check:i18n` stays +green — now without the warning. diff --git a/packages/platform-objects/scripts/i18n-extract.config.ts b/packages/platform-objects/scripts/i18n-extract.config.ts index 809dca195d..953ed36007 100644 --- a/packages/platform-objects/scripts/i18n-extract.config.ts +++ b/packages/platform-objects/scripts/i18n-extract.config.ts @@ -178,8 +178,6 @@ import { jaJP } from '../src/apps/translations/ja-JP.js'; import { esES } from '../src/apps/translations/es-ES.js'; export default defineStack({ - name: 'platform-objects-i18n-extract', - objects: [ // Identity SysUser, diff --git a/packages/plugins/plugin-approvals/scripts/i18n-extract.config.ts b/packages/plugins/plugin-approvals/scripts/i18n-extract.config.ts index 337b52e11e..7e7da2c900 100644 --- a/packages/plugins/plugin-approvals/scripts/i18n-extract.config.ts +++ b/packages/plugins/plugin-approvals/scripts/i18n-extract.config.ts @@ -27,7 +27,6 @@ import { jaJPObjects } from '../src/translations/ja-JP.objects.generated.js'; import { esESObjects } from '../src/translations/es-ES.objects.generated.js'; export default defineStack({ - name: 'plugin-approvals-i18n-extract', objects: [SysApprovalRequest, SysApprovalAction, SysApprovalDelegation] as any, translations: [ { en: { objects: enObjects } }, diff --git a/packages/plugins/plugin-audit/scripts/i18n-extract.config.ts b/packages/plugins/plugin-audit/scripts/i18n-extract.config.ts index 997f19fec7..55ed32d744 100644 --- a/packages/plugins/plugin-audit/scripts/i18n-extract.config.ts +++ b/packages/plugins/plugin-audit/scripts/i18n-extract.config.ts @@ -22,7 +22,6 @@ import { jaJPObjects } from '../src/translations/ja-JP.objects.generated.js'; import { esESObjects } from '../src/translations/es-ES.objects.generated.js'; export default defineStack({ - name: 'plugin-audit-i18n-extract', objects: [SysAuditLog, SysActivity, SysComment] as any, translations: [ { en: { objects: enObjects } }, diff --git a/packages/plugins/plugin-security/scripts/i18n-extract.config.ts b/packages/plugins/plugin-security/scripts/i18n-extract.config.ts index 47dad85865..227e086839 100644 --- a/packages/plugins/plugin-security/scripts/i18n-extract.config.ts +++ b/packages/plugins/plugin-security/scripts/i18n-extract.config.ts @@ -24,7 +24,6 @@ import { jaJPObjects } from '../src/translations/ja-JP.objects.generated.js'; import { esESObjects } from '../src/translations/es-ES.objects.generated.js'; export default defineStack({ - name: 'plugin-security-i18n-extract', objects: [SysPosition, SysCapability, SysPermissionSet, SysUserPermissionSet, SysPositionPermissionSet, SysUserPosition] as any, translations: [ { en: { objects: enObjects } }, diff --git a/packages/plugins/plugin-sharing/scripts/i18n-extract.config.ts b/packages/plugins/plugin-sharing/scripts/i18n-extract.config.ts index 2782f06f95..0ae05eb244 100644 --- a/packages/plugins/plugin-sharing/scripts/i18n-extract.config.ts +++ b/packages/plugins/plugin-sharing/scripts/i18n-extract.config.ts @@ -20,7 +20,6 @@ import { jaJPObjects } from '../src/translations/ja-JP.objects.generated.js'; import { esESObjects } from '../src/translations/es-ES.objects.generated.js'; export default defineStack({ - name: 'plugin-sharing-i18n-extract', objects: [SysRecordShare, SysSharingRule, SysShareLink] as any, translations: [ { en: { objects: enObjects } }, diff --git a/packages/plugins/plugin-webhooks/scripts/i18n-extract.config.ts b/packages/plugins/plugin-webhooks/scripts/i18n-extract.config.ts index e36a892006..f94ae7b1fd 100644 --- a/packages/plugins/plugin-webhooks/scripts/i18n-extract.config.ts +++ b/packages/plugins/plugin-webhooks/scripts/i18n-extract.config.ts @@ -23,7 +23,6 @@ import { jaJPObjects } from '../src/translations/ja-JP.objects.generated.js'; import { esESObjects } from '../src/translations/es-ES.objects.generated.js'; export default defineStack({ - name: 'plugin-webhooks-i18n-extract', objects: [SysWebhook] as any, translations: [ { en: { objects: enObjects } }, diff --git a/packages/services/service-messaging/scripts/i18n-extract.config.ts b/packages/services/service-messaging/scripts/i18n-extract.config.ts index 4bf88f444f..866bf3224d 100644 --- a/packages/services/service-messaging/scripts/i18n-extract.config.ts +++ b/packages/services/service-messaging/scripts/i18n-extract.config.ts @@ -27,7 +27,6 @@ import { jaJPObjects } from '../src/translations/ja-JP.objects.generated.js'; import { esESObjects } from '../src/translations/es-ES.objects.generated.js'; export default defineStack({ - name: 'service-messaging-i18n-extract', objects: [ InboxMessage, NotificationReceipt, diff --git a/packages/services/service-realtime/scripts/i18n-extract.config.ts b/packages/services/service-realtime/scripts/i18n-extract.config.ts index 51e3749d9a..d9858bc875 100644 --- a/packages/services/service-realtime/scripts/i18n-extract.config.ts +++ b/packages/services/service-realtime/scripts/i18n-extract.config.ts @@ -20,7 +20,6 @@ import { jaJPObjects } from '../src/translations/ja-JP.objects.generated.js'; import { esESObjects } from '../src/translations/es-ES.objects.generated.js'; export default defineStack({ - name: 'service-realtime-i18n-extract', objects: [SysPresence] as any, translations: [ { en: { objects: enObjects } }, diff --git a/packages/services/service-storage/scripts/i18n-extract.config.ts b/packages/services/service-storage/scripts/i18n-extract.config.ts index 9966fa0e71..3876bffbf7 100644 --- a/packages/services/service-storage/scripts/i18n-extract.config.ts +++ b/packages/services/service-storage/scripts/i18n-extract.config.ts @@ -23,7 +23,6 @@ import { jaJPObjects } from '../src/translations/ja-JP.objects.generated.js'; import { esESObjects } from '../src/translations/es-ES.objects.generated.js'; export default defineStack({ - name: 'service-storage-i18n-extract', objects: [SystemFile, SystemUploadSession] as any, translations: [ { en: { objects: enObjects } },