/** * translations-check — validate the texts/idlangref discipline across UIX. * * Runs five independent checks and exits non-zero if any of them fails: * * 1. **Morfo `texts:` shape**: every value is an absolute idlangref * (`'#?…|fallback'`). Component-scoped refs (`#?components.{kebab}.…`) must * match the morfo's own `kebab`. * * 2. **Compiled ref coverage**: every `v.translationRef` / `v.commonRef` / * `v.langRef` in a morfo's aria/data contract — as NORMALIZED by the real * compiler (`compileMorfo`, the same path the runtime resolves) — points to * a catalog leaf. This is the check that catches the silent-fallback class: * `v.translationRef('prevMonth')` with a catalog key `prev-month` compiles, * runs, and ships the English fallback on every locale (measured 2026-08-10 * in chronos: five labels). `texts:` is a declaration, never a lookup table, * so only the compiled key can be validated. * * 3. **Component catalog coverage**: every component-scoped idlangref in * source points into `src/uix/langs/components/{kebab}.ts`. The dotted path * must resolve to a leaf `LangRecord` (object whose values are strings). * * 4. **Common catalog coverage**: every `#?common.…` idlangref points into * `src/uix/langs/common.ts`. * * 5. **Orphan detection**: every leaf in the component catalogs is referenced * by a `morfo.texts` entry, a compiled morfo ref, or a source file. Orphan * entries are surfaced as warnings (not errors) so consumers can remove * them safely. * * Also enforces: * - No raw `translations:` field survives on any morfo. * - No source file (.ts / .svelte under src/uix) declares an idlangref to a * nonexistent path. * * The catalogs and morfos are IMPORTED (they are pure data modules) and morfos * are compiled with the real `compileMorfo` — never re-parsed with regex. The * previous implementation regex-evaluated the catalog sources and its comment * stripper corrupted any string containing `//` (a `https://` URL crashed the * whole run), while the class it was credited with catching — translationRef * call sites — was never scanned at all: a `v.translationRef('key')` contains * no `#?` literal until the compiler normalizes it. Validating the compiled * contract closes both holes at once. * * `.ts` sources are scanned via the TypeScript AST (string literals only, so a * `//` inside a string can never eat the rest of the line and comments never * produce false references). `.svelte` sources get their `