From 53ed778d71a07dcde2181c129f871e9f7138012b Mon Sep 17 00:00:00 2001 From: Doxa Maps Date: Tue, 29 Sep 2026 12:14:08 +0000 Subject: [PATCH] PPLR Data Maps: the fullscreen button is named in the page's language rega's L15 (e7f343d4c, ar + zh): every PPLR map view's fullscreen button read "Toggle fullscreen" in English, title and aria-label. It is PPLR's own control (FullscreenToggleControl in src/utils/pplrMap.js, not MapLibre's), and it wrote the English itself. It now takes the shared buttons.toggleFullscreen, already translated in all 11 locales, when the map is built. --- plugin-designs/pplr-data-maps/src/utils/pplrMap.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/plugin-designs/pplr-data-maps/src/utils/pplrMap.js b/plugin-designs/pplr-data-maps/src/utils/pplrMap.js index 937803a6e..476f36794 100644 --- a/plugin-designs/pplr-data-maps/src/utils/pplrMap.js +++ b/plugin-designs/pplr-data-maps/src/utils/pplrMap.js @@ -441,8 +441,11 @@ export class FullscreenToggleControl { this._btn = document.createElement('button') this._btn.type = 'button' this._btn.className = 'mapboxgl-ctrl-fullscreen' - this._btn.setAttribute('aria-label', 'Toggle fullscreen') - this._btn.title = 'Toggle fullscreen' + // The shared, translated name (buttons.toggleFullscreen), in the page's language when the map is + // built. rega saw the English "Toggle fullscreen" in ar and zh on every PPLR map view. + const label = tStatic('buttons.toggleFullscreen') || 'Toggle fullscreen' + this._btn.setAttribute('aria-label', label) + this._btn.title = label this._btn.innerHTML = '' this._btn.addEventListener('click', () => this._toggle()) this._sync = () => {