the last non-panel strings in officerdev are all never-translate (283 -> 281)
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.
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -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]));
|
||||
|
||||
Reference in New Issue
Block a user