search-field demo: clear button text follows the locale

The demo hardcoded the visible Clear button label inline:

    <SearchField.ClearTrigger>Clear</SearchField.ClearTrigger>

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) <noreply@anthropic.com>
active-uix
dev 5 months ago
parent 332ef63177
commit fd9fb633e0

@ -13,7 +13,7 @@ export const searchFieldLangs = {
en: "Search" en: "Search"
}, },
clear: { clear: {
es: "Borrar búsqueda", es: 'Borrar',
en: "Clear search" en: 'Clear'
} }
} satisfies LangNode; } satisfies LangNode;

@ -145,7 +145,9 @@
onClear={() => (lastSubmit = 'cleared')} onClear={() => (lastSubmit = 'cleared')}
> >
<SearchField.Input /> <SearchField.Input />
<SearchField.ClearTrigger>Clear</SearchField.ClearTrigger> <SearchField.ClearTrigger>
{uix.langs.ts('#?components.search-field.clear|Clear')}
</SearchField.ClearTrigger>
</SearchField> </SearchField>
</div> </div>
</div> </div>

Loading…
Cancel
Save

Powered by TurnKey Linux.