From d208f1dcd17e770883c0c3a987ccd5c3324e9307 Mon Sep 17 00:00:00 2001 From: dev Date: Sat, 6 Jun 2026 14:42:36 +0200 Subject: [PATCH] =?UTF-8?q?fix(words):=20API=20contract=20=E2=80=94=20drop?= =?UTF-8?q?=20empty=20 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); });