diff --git a/src/uix/eidos/components/words/AUDIT.md b/src/uix/eidos/components/words/AUDIT.md index 954511683..999805283 100644 --- a/src/uix/eidos/components/words/AUDIT.md +++ b/src/uix/eidos/components/words/AUDIT.md @@ -70,5 +70,8 @@ verificar en navegador, y con el enfoque validado → generalizar tokens + barre - [ ] A — resto del vocabulario: triar los 41 huérfanos (cablear `rail-*`/`toolbar-*`/… o podar) - [ ] B — resto del barrido: tamaños bespoke (swatch/checkbox/anchos/sidebar 16rem×3)→tokens, padding `--space-*` - [ ] C — centralizar las 3 paletas de color -- [ ] D — fixes API (` diff --git a/src/uix/eidos/components/words/words.svelte b/src/uix/eidos/components/words/words.svelte index f127ede15..97a0a7c99 100644 --- a/src/uix/eidos/components/words/words.svelte +++ b/src/uix/eidos/components/words/words.svelte @@ -13,7 +13,6 @@ * (builder-style, always visible), a slide-in drawer, a popover, or * none. The same `` body is reused across all of them. */ - import { onMount } from 'svelte'; import { ActiveEidos } from '$uix/eidos'; import * as Words from '$soma/components/words'; import { Button } from '$uix/eidos/components/button'; @@ -48,15 +47,14 @@ // client pass emit different markup and hydration bails. Defer the // editor to the client; SSR + first paint render the empty frame. let mounted = $state(false); - onMount(() => { + // Client-only activation + one-time langs registration. Reads nothing + // reactive, so this $effect runs exactly once on mount (the Svelte 5 way, + // no lifecycle import). Register the inspector's localized strings into the + // active langs schema — without this every label resolves to the inline + // English fallback regardless of locale. `extend` deep-merges so app-level + // overrides at the same path applied AFTER mount still win. + $effect(() => { mounted = true; - // Register the inspector's localized strings into the active - // langs schema. Without this every label resolves to the inline - // English fallback regardless of the active locale — declaring - // idlangrefs alone never localizes, the bundle must be extended. - // `extend` deep-merges so app-level overrides at the same path - // applied AFTER mount still win (the engine warns on leaf - // overwrites in DEV). eidos.langs.extend('components.words.inspector', WORDS_INSPECTOR_BUNDLE); eidos.langs.extend('components.words.menu', WORDS_MENU_BUNDLE); });