From fd9fb633e07f10e1497c79288d6f07ab91b85a1f Mon Sep 17 00:00:00 2001 From: dev Date: Thu, 21 May 2026 01:47:30 +0200 Subject: [PATCH] search-field demo: clear button text follows the locale MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The demo hardcoded the visible Clear button label inline: Clear So the toolbar's locale toggle (ES/EN) only swapped the aria-label via the morfo's translationRef, not the visible text. With locale=ES the panel showed a Spanish UI everywhere except the literal "Clear". Replace with `uix.langs.ts('#?components.search-field.clear|Clear')` so the visible button picks up the active catalog entry. Catalog strings shortened to just `Borrar` / `Clear` (one-word action label that fits the inline-button affordance — the previous "Borrar búsqueda" was too long for the visible chrome and wrapped in two lines). The full phrase still reads naturally for aria-label. Co-Authored-By: Claude Opus 4.7 (1M context) --- src/uix/langs/components/search-field.ts | 4 ++-- web/routes/uix/components/search-field/+page.svelte | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/uix/langs/components/search-field.ts b/src/uix/langs/components/search-field.ts index e78ea9c31..f92474f2c 100644 --- a/src/uix/langs/components/search-field.ts +++ b/src/uix/langs/components/search-field.ts @@ -13,7 +13,7 @@ export const searchFieldLangs = { en: "Search" }, clear: { - es: "Borrar búsqueda", - en: "Clear search" + es: 'Borrar', + en: 'Clear' } } satisfies LangNode; diff --git a/web/routes/uix/components/search-field/+page.svelte b/web/routes/uix/components/search-field/+page.svelte index 6a013aa81..eac5bc40a 100644 --- a/web/routes/uix/components/search-field/+page.svelte +++ b/web/routes/uix/components/search-field/+page.svelte @@ -145,7 +145,9 @@ onClear={() => (lastSubmit = 'cleared')} > - Clear + + {uix.langs.ts('#?components.search-field.clear|Clear')} +