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]));