diff --git a/plugin-designs/research-map-plus-grid/research-map-plus-grid.vue b/plugin-designs/research-map-plus-grid/research-map-plus-grid.vue index aac865d90..e1d3a45cb 100644 --- a/plugin-designs/research-map-plus-grid/research-map-plus-grid.vue +++ b/plugin-designs/research-map-plus-grid/research-map-plus-grid.vue @@ -444,7 +444,13 @@ function pushToChildren() { // every push. MEASURED: the map stayed English on a live en->ar switch while the composite // around it changed. The leaf's own chain is fully reactive and was never at fault — it is // reactive to its own prop, and its prop was frozen. - if (hostLang.value) cfg.lang = hostLang.value + // BOTH KEYS, and `locale` is the one that decides. Every reader takes locale FIRST and falls + // back to lang — ProfileLoader.vue:189 and people-groups-grid.vue:273/380 all read + // `config.locale || config.lang`. Writing only `lang` is therefore correct exactly while no + // child config carries a `locale`, and silently stops working the day one does: a stale locale + // from a boot copy or a host-list path would shadow every fresh lang we push, forever. Writing + // both keeps the two in step whatever put them there. + if (hostLang.value) { cfg.lang = hostLang.value; cfg.locale = hostLang.value } map.setAttribute('profile-config', JSON.stringify(cfg)) } const grid = rootEl.querySelector('people-groups-grid') @@ -461,8 +467,9 @@ function pushToChildren() { if (hostLang.value) { let gcfg = {} try { gcfg = JSON.parse(grid.getAttribute('profile-config') || '{}') } catch (_) { gcfg = {} } - if (gcfg.lang !== hostLang.value) { + if (gcfg.lang !== hostLang.value || gcfg.locale !== hostLang.value) { gcfg.lang = hostLang.value + gcfg.locale = hostLang.value grid.setAttribute('profile-config', JSON.stringify(gcfg)) } }