fix(i18n): toast, boot labels and AI tool text found in review

- The Space Missions cancellation failure toast read "[object Object]" in
  every language: the options object was passed as the message. The English
  message is the second argument again, the translation the third.
- Header text is translated before panel chrome builds its collapse labels,
  so the dock and display toggles no longer read "Expand VISUAL PRESETS" in
  another language.
- The voice "show data layers" result keeps the English layer name
  (row data-layer-name), not the translated row text.
- The Google 3D unavailable reason is translated in full.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
German KhokhlovandClaude Opus 5.5 committed 2026-10-13 20:07:09 +04:00
1 parent 9d01f9bfcd
commit 0c647a791b
7 files changed
+27 -6

No files matched your search

+6
View File
@@ -129,6 +129,10 @@ const PANEL_LABELS = {
'local-firms': msg('Active Fires'),
};
function englishPanelLabel(layer) {
return PANEL_LABELS[layer.id] || LAYER_NAME_KEYS[layer.id] || layer.name;
}
// The panel's own English names win, as before i18n; module names otherwise.
function panelLabel(layer) {
if (PANEL_LABELS[layer.id]) return t(PANEL_LABELS[layer.id]);
@@ -378,6 +382,8 @@ export class LayerPanel {
const row = document.createElement('div');
row.className = 'data-toggle-row';
row.dataset.layerId = layer.id;
// English name for voice tools, which must not receive translated text.
row.dataset.layerName = englishPanelLabel(layer);
const topRow = document.createElement('div');
topRow.className = 'data-toggle-top';