Big Picture's grid took its language from the page URL, not from Big Picture

The grid is mounted inside Big Picture as a component, so it shares Big Picture's host, and its
direction is written onto Big Picture itself. Its profile-config carried only the list, so its
language fell through to ?lang= on the page. An English page opened with ?lang=ar therefore laid
the whole of Big Picture out right-to-left, English included.

The grid now receives the host's language under both keys, locale and lang.
This commit is contained in:
Doxa Maps 2026-09-29 22:26:49 +00:00
parent c8fde78522
commit f4c026501d

View file

@ -364,9 +364,19 @@ const mapboxToken = computed(() => hostToken.value || sharedToken.value || '')
provide('mapboxToken', mapboxToken)
// The host's people-group LIST (library/lists/), threaded like the engine: into the dashboard's
// provided config below, and to the grid as the only key of its profile-config.
// provided config below, and into the grid's profile-config.
const hostList = computed(() => (typeof hostConfig.value?.list === 'string' ? hostConfig.value.list : ''))
const gridConfig = computed(() => (hostList.value ? JSON.stringify({ list: hostList.value }) : ''))
// ★ AND THE HOST'S LANGUAGE, under both keys because each reader prefers one. The grid is mounted as
// a COMPONENT, so it shares this element's host, and its reflectDir writes onto Big Picture itself.
// Given no locale here, its language fell through to the page URL. On an English page opened with
// ?lang=ar, the grid set rtl on the whole of Big Picture, so English was laid out backwards
// (measured 2026-09-29 on the Deep Research page, before and after the dir-clear alike).
const gridConfig = computed(() => {
const c = {}
if (hostList.value) c.list = hostList.value
if (hostLang.value) { c.locale = hostLang.value; c.lang = hostLang.value }
return Object.keys(c).length ? JSON.stringify(c) : ''
})
const SHARE_LEAF = 'dashboard-plus-grid/dashboard-plus-grid/index.html'