mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-05 19:04:02 +00:00
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:
1 parent
9d01f9bfcd
commit
0c647a791b
7 files changed
+27
-6
No files matched your search
@@ -569,10 +569,11 @@ export class StyleManager extends ShellFacade {
|
||||
});
|
||||
this._initUI();
|
||||
this._initMapStackControl();
|
||||
// Headers first: panel chrome builds its toggle labels from them.
|
||||
this._applyRuntimeStaticHeaderText();
|
||||
this._initPanelChrome();
|
||||
this._initLocaleSelector();
|
||||
this._sizeDisplayLabelColumn();
|
||||
this._applyRuntimeStaticHeaderText();
|
||||
this._initLeftPanelAdaptiveLayout();
|
||||
this._initRightPanelAdaptiveLayout();
|
||||
this._initRadioPanel();
|
||||
|
||||
@@ -69,6 +69,7 @@ export function _handleContextLayerChange(change) {
|
||||
);
|
||||
return true;
|
||||
},
|
||||
'Space Missions cancellation could not restore the previous layer state', // i18n-ignore: English message; the toast shows localizedMessage
|
||||
{
|
||||
localizedMessage: t(
|
||||
'Space Missions cancellation could not restore the previous layer state',
|
||||
|
||||
@@ -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';
|
||||
|
||||
Reference in new issue
Block a user