From 71e057652e2fd414ba3e8c4fbda959e8eaac17c5 Mon Sep 17 00:00:00 2001 From: dev Date: Thu, 14 May 2026 22:16:19 +0200 Subject: [PATCH] Align langs diagnostic wording --- continue.md | 5 +++++ src/arts/langs/README.md | 6 +++--- src/arts/langs/mono-langs.svelte.ts | 2 +- src/uix/soma/COMPONENT_GUIDE.md | 2 +- 4 files changed, 10 insertions(+), 5 deletions(-) diff --git a/continue.md b/continue.md index 18718e13a..80fa92622 100644 --- a/continue.md +++ b/continue.md @@ -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`. diff --git a/src/arts/langs/README.md b/src/arts/langs/README.md index 26731f705..7cfc5c18d 100644 --- a/src/arts/langs/README.md +++ b/src/arts/langs/README.md @@ -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 "" 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. diff --git a/src/arts/langs/mono-langs.svelte.ts b/src/arts/langs/mono-langs.svelte.ts index a005626ab..af07571fd 100644 --- a/src/arts/langs/mono-langs.svelte.ts +++ b/src/arts/langs/mono-langs.svelte.ts @@ -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. */ diff --git a/src/uix/soma/COMPONENT_GUIDE.md b/src/uix/soma/COMPONENT_GUIDE.md index ffb5f14b9..2550c1b32 100644 --- a/src/uix/soma/COMPONENT_GUIDE.md +++ b/src/uix/soma/COMPONENT_GUIDE.md @@ -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