diff --git a/plugin-designs/big-picture/src/components/BpResearchHeader.vue b/plugin-designs/big-picture/src/components/BpResearchHeader.vue index 8a5fe649d..cc277c374 100644 --- a/plugin-designs/big-picture/src/components/BpResearchHeader.vue +++ b/plugin-designs/big-picture/src/components/BpResearchHeader.vue @@ -39,6 +39,19 @@ import { ref, reactive, watch, computed, onMounted, getCurrentInstance } from 'v // SHARED search primitives (one source of truth for BOTH cap-2 grid + cap-1 dashboard). import SearchBar from '@map/components/search/SearchBar.vue' import FilterDropdown from '@map/components/search/FilterDropdown.vue' +import { tStatic } from '@map/i18n/index.js' + +// ★ THIS HEADER HAD NO i18n AT ALL, and it is the top of Big Picture. Every label below was an +// English literal passed as a PROP — FilterDropdown itself translates nothing, it renders what the +// caller hands it, so a perfectly localized component showed "Region" on an Arabic page. Read +// through tStatic rather than useI18n, for the reason the rest of this tree gives: these components +// mount inside custom elements that install no i18n plugin, and an unguarded useI18n() throws on +// the way in and takes the whole header with it. +// +// The grid namespace first, because this header drives the cap-2 grid and its sibling reads the +// same keys; dashboard.* second; the English literal last, so a missing key degrades to what +// shipped rather than to a key name. +const L = (key, en) => tStatic('grid.' + key) || tStatic('dashboard.' + key) || en const props = defineProps({ // live count of matched groups, pushed back down by the composite for display. @@ -160,22 +173,22 @@ onMounted(loadOptions)
C?Eo(c,f,h,!0,!1,P):X(u,d,b,f,h,k,v,y,P)},Pt=(c,u,d,b,f,h,k,v,y)=>{let _=0;const C=u.length;let P=c.length-1,A=C-1;for(;_<=P&&_<=A;){const T=c[_],G=u[_]=y?je(u[_]):Ne(u[_]);if(Ro(T,G))M(T,G,d,null,f,h,k,v,y);else break;_++}for(;_<=P&&_<=A;){const T=c[P],G=u[A]=y?je(u[A]):Ne(u[A]);if(Ro(T,G))M(T,G,d,null,f,h,k,v,y);else break;P--,A--}if(_>P){if(_<=A){const T=A+1,G=T