Align langs diagnostic wording

active-uix
dev 5 months ago
parent e2ba371beb
commit 71e057652e

@ -32,6 +32,9 @@ Actualizacion 2026-05-14:
- `src/uix/contracts.test.ts` ahora incluye guardias de regresion para que
`ActiveUix` no vuelva a bootear Soma/Eidos, los providers Soma no usen
`registerContract/registerPart`, y la shell `/uix` no escriba `prefs.theme`.
- Naming `langs`: constantes runtime y diagnosticos ya usan `langs` /
`langs.mono`; se corrigieron menciones documentales residuales `[lang]` y
`lang.mono`.
- Commits nuevos empujados:
- `694eb5c5` — `Clarify prefs projection contract`
- `223cdf9e` — `Align sema docs with channel ownership`
@ -44,12 +47,14 @@ Actualizacion 2026-05-14:
- `2df58074` — `Use local fonts in UIX docs`
- `8ad04714` — `Refresh UIX architecture docs`
- commit actual — `Add UIX architecture regression guards`
- commit actual — `Align langs diagnostic wording`
- Validado de nuevo:
- `npx vitest run src/uix/contracts.test.ts src/arts/prefs/test/dom-projection.test.ts src/uix/active-uix/active-uix.svelte.test.ts src/uix/eidos/active-eidos.test.ts src/uix/soma/runtime.svelte.test.ts` -> 79 tests OK.
- `npx vitest run src/uix/sema/engine.test.ts src/uix/soma/runtime.svelte.test.ts` -> 48 tests OK.
- `npx vitest run src/uix/eidos/active-eidos-config.test.ts src/uix/eidos/generated-css.test.ts src/uix/eidos/active-eidos.test.ts src/uix/contracts.test.ts` -> 52 tests OK.
- `npm run check` -> 0 errores, 0 warnings.
- `npx vitest run src/uix/contracts.test.ts` -> 12 tests OK.
- `npm run check` tras wording `langs` -> 0 errores, 0 warnings.
- Playwright `/uix`: toggle dark actualiza `html[data-theme="base-dark"]`,
`html[data-mode="dark"]` y mantiene `html[data-density="comfortable"]`;
sin `pageerror`, sin errores de consola y sin `requestfailed`.

@ -312,7 +312,7 @@ const unsub = langs.onSchemaChange(() => {
extend below an existing translation leaf, or replace a branch with a
leaf, is rejected loudly because the resulting shape is broken.
- **Leaf ↔ leaf** (silent overwrite): the new value replaces the existing
one and a DEV warning is emitted under category `lang` —
one and a DEV warning is emitted under category `langs` —
`extend(): leaf at "<path>" was overwritten silently. Last write wins`.
The intended use of `extend()` is route-level lazy loading where each
module owns a unique namespace; collisions usually indicate two modules
@ -320,7 +320,7 @@ const unsub = langs.onSchemaChange(() => {
```ts
langs.extend('common', { ok: { es: 'Sí', en: 'Yes' } });
// DEV: [lang] extend(): leaf at "common.ok" was overwritten silently.
// DEV: [langs] extend(): leaf at "common.ok" was overwritten silently.
// Last write wins — register namespaces uniquely or check for
// collisions before extending.
```
@ -375,7 +375,7 @@ is normally synchronized from `prefs.language`; `Format` uses `prefs.locale`
instead.
In DEV the mono langs adapter warns once per unresolved path via the supplied logger
under category `lang.mono` — strong signal that the caller forgot to
under category `langs.mono` — strong signal that the caller forgot to
configure real translations or to add `|fallback` text. Calls that include
`|fallback` are silent.

@ -49,7 +49,7 @@ export const DEFAULT_MONO_LOCALE: SupportedLocale = 'en';
* In DEV the mono langs adapter warns (deduplicated by path, once per path) when
* `t()` / `ts()` returns a path-shaped value verbatim — strong signal that
* the caller forgot to configure `langs` or to add `|fallback` text. Warnings
* flow through the supplied logger under category `lang.mono`. Calls that
* flow through the supplied logger under category `langs.mono`. Calls that
* include `|fallback` are silent because the caller intentionally provided
* fallback text.
*/

@ -1095,7 +1095,7 @@ This is O(N) per mutation (copies the whole Map), looks like a bug to future rea
Three classes of bug cannot be caught by `svelte-check` or HTTP 200 — they all require either a runtime grep or a real browser. They must be run every time a component, demo, or lang entry is touched.
1. **Translation namespace grep.** soma's namespace is `components.{kebab-name}.*` (or `common.*` for shared strings). Any `soma.…` or other prefix inside a quoted translation path is a bug that logs `[lang] Translation key not found` at runtime. Check with:
1. **Translation namespace grep.** soma's namespace is `components.{kebab-name}.*` (or `common.*` for shared strings). Any `soma.…` or other prefix inside a quoted translation path is a bug that logs `[langs] Translation key not found` at runtime. Check with:
```sh
grep -rn "['\"]soma\.[a-z-]" src --include=!*.md

Loading…
Cancel
Save

Powered by TurnKey Linux.