Take main before landing
Some checks are pending
build-gate / build (push) Waiting to run

This commit is contained in:
doxa-maps-88655c70 2026-09-25 03:20:00 +00:00
commit f40ce70e64

View file

@ -38,7 +38,15 @@ const props = defineProps({
// two visible strings — the clear button and the empty state — were English literals, and one of
// them ('No options found') was ALREADY catalogued in eleven locales elsewhere in this repo, so
// the translation existed and this component was ignoring it.
const { t } = useI18n()
//
// ★ i18n IS OPTIONAL HERE, NOT REQUIRED. useI18n() THROWS ("Need to install with `app.use`
// function") when the host element never installed vue-i18n — and people-groups-grid deliberately
// doesn't (its labels arrive through its `t` prop). The unguarded call blanked the grid standalone,
// in the studio and inside every composite that nests it (measured 2026-09-25: 2 DOM nodes, page
// error on mount). Use the host's translations when it has them, English otherwise.
const FALLBACK = { 'buttons.clearSelection': 'Clear selection', 'buttons.noOptions': 'No options found' }
let t = (key) => FALLBACK[key] || key
try { t = useI18n().t } catch (_) { /* no i18n on this host: keep the English fallback */ }
const emit = defineEmits(['filter-change', 'filter-clear'])