From 1c435a88ae8a690466cb0db142b1883c83dc5cad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Padez?= Date: Sun, 23 Aug 2026 15:13:03 +0000 Subject: [PATCH] the last non-panel strings in officerdev are all never-translate (283 -> 281) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit hooks holds two thrown Errors, already excluded as a neverTranslate category. The AppRegistry duplicate-key message is a console.error — a log line for whoever is reading a terminal, which the doc's list covers, so it is marked with i18n-exempt rather than keyed. Scanner: a namespaced storage key like `FULLSCREEN_PANEL:${workspace.key}` is an identifier. The SCREAMING_CONSTANT rule missed it because the interpolated half is lowercase. Verified the delta is exactly that key and the console line. --- scripts/i18n/scan-hardcoded.ts | 4 ++++ .../src/AppRegistry/useAppRegistry/useAppRegistry.ts | 1 + 2 files changed, 5 insertions(+) diff --git a/scripts/i18n/scan-hardcoded.ts b/scripts/i18n/scan-hardcoded.ts index 21636ead..35597d11 100755 --- a/scripts/i18n/scan-hardcoded.ts +++ b/scripts/i18n/scan-hardcoded.ts @@ -89,6 +89,10 @@ function isHuman(value: string | undefined): value is string { if (/^(https?:|\/|#|data:|application\/|image\/)/.test(s)) return false; // Allows . and - so credential-format examples like `GOCSPX-...` fall under the same rule. if (/^[A-Z0-9_.-]+$/.test(s)) return false; + // A namespaced storage or channel key: an ALL-CAPS prefix, then a separator, then an interpolation — + // `FULLSCREEN_PANEL:${workspace.key}`. The SCREAMING_CONSTANT rule above misses it because the + // interpolated half is lowercase. + if (/^[A-Z0-9_]{3,}[.:/-]/.test(s)) return false; // `Bearer ${token}` is an Authorization header value, not a sentence. Caught by the template-string // pattern because it starts with a capital and interpolates; excluded here because an auth scheme // followed by a credential is never something a person reads. diff --git a/src/workspaces/officerdev/src/AppRegistry/useAppRegistry/useAppRegistry.ts b/src/workspaces/officerdev/src/AppRegistry/useAppRegistry/useAppRegistry.ts index c7830ba9..2d6ecb2e 100644 --- a/src/workspaces/officerdev/src/AppRegistry/useAppRegistry/useAppRegistry.ts +++ b/src/workspaces/officerdev/src/AppRegistry/useAppRegistry/useAppRegistry.ts @@ -30,6 +30,7 @@ export const findDuplicateKeys = (metas: AppRegistryMeta[]): string[] => [ export const metasToRegistry = (metas: AppRegistryMeta[]): AppRegistryMap => { const duplicates = findDuplicateKeys(metas); if (duplicates.length > 0) + // i18n-exempt: console diagnostic — read from a terminal, stays greppable in one language console.error(`AppRegistry: duplicate app key(s) ${duplicates.join(', ')} — one app is unreachable`); return Object.fromEntries(metas.map(({ key, ...entry }) => [key, entry]));