#!/usr/bin/env tsx /** * Settings-schema text travels with a catalog key (D863, D1111). * * A `label` / `description` / `title` literal in a settings schema with no * sibling `labelKey` / `descriptionKey` / `titleKey` reaches every operator in * English. The finding is exactly what the label codemod would still add * (`scripts/i18n/add-label-keys.ts`), counted per package. * * Not judged yet: custom actions, live-info and record-kind declarations; the * codemod does not read them, and the pin widens with it. * * The count is pinned per package and may only shrink * (`scripts/i18n/baselines/check-schema-text-keyed.json`). * * npx tsx scripts/check-schema-text-keyed.ts # judge the tree * npx tsx scripts/check-schema-text-keyed.ts --update # lower the pin after a migration */ import { isEntryPoint, productSources, REPO_ROOT, runFence } from './i18n/lib/fence-runner.ts' import { findUnkeyedSchemaText } from './i18n/lib/text-fences.ts' function main(): void { const argv = process.argv.slice(2) process.exit( runFence( { name: 'check-schema-text-keyed', rule: 'settings-schema text without a catalog key; run scripts/i18n/add-label-keys.ts on the file and write the translation:', findings: findUnkeyedSchemaText(productSources(REPO_ROOT)), }, argv, ), ) } if (isEntryPoint(import.meta.url)) main()