fix(i18n): restore English output changed by the i18n foundation

A side-by-side English comparison with main found text the branch changed:
- Layer list names: #601 let its own catalog names win over the panel's
  English names, so "Live Vessels" read "Live AIS Vessels", "Bike Share"
  "Bikeshare", "Cameras" "CCTV", "Data Centers" "Datacenters", "Active Fires"
  "FIRMS Active Fires". The panel names win again.
- HUD feed-state suffix is "UNAVAILABLE LIVE AIS VESSELS" again (Russian keeps
  its colon); the mission panel aria-label is "Selected Space Mission" again;
  scene shot timing is "4.0s + 0.9s" again.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
German KhokhlovandClaude Opus 5.5 committed 2026-10-13 20:00:03 +04:00
1 parent f3da0e1761
commit a28e29e05e
7 files changed
+22 -13

No files matched your search

+3 -2
View File
@@ -129,10 +129,11 @@ const PANEL_LABELS = {
'local-firms': msg('Active Fires'),
};
// 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]);
const key = LAYER_NAME_KEYS[layer.id];
if (key) return t(key);
return PANEL_LABELS[layer.id] ? t(PANEL_LABELS[layer.id]) : layer.name;
return key ? t(key) : layer.name;
}
// English module names (layer.name) that other surfaces print, such as the
+1 -1
View File
@@ -327,5 +327,5 @@ test('the unavailable chip may abbreviate, but its accessible name keeps the ful
});
assert.equal(button.textContent, 'UNAVAILABLE');
assert.equal(button.dataset.feedState, 'unavailable');
assert.match(attrs.get('aria-label'), /^FIRMS Active Fires: UNAVAILABLE\./);
assert.match(attrs.get('aria-label'), /^Active Fires: UNAVAILABLE\./);
});
+8 -4
View File
@@ -1,6 +1,5 @@
/** Scene panel elements and text-only project presentation. */
import { msg, t } from '../i18n/index.js';
import { formatQuantity } from './unitLabels.js';
import { formatNumber, msg, t } from '../i18n/index.js';
// Labels for what a shot stores; anything else shows as stored. Style names
// match STYLE_STATUS_LABELS in visualPresets.js, which this package cannot
@@ -145,11 +144,16 @@ export function renderSceneShots(
? t(DETECTION_MODE_LABELS[mode])
: mode;
const seconds = (value) =>
formatQuantity(value, 's', {
formatNumber(value, {
minimumFractionDigits: 1,
maximumFractionDigits: 1,
});
meta.textContent = `${styleLabel} · ${modeLabel} · ${seconds(shot.durationSec)} + ${seconds(shot.holdSec)}`;
// English keeps its compact "4.0s + 0.9s"; other languages space the unit.
const timing = t('{duration}s + {hold}s', {
duration: seconds(shot.durationSec),
hold: seconds(shot.holdSec),
});
meta.textContent = `${styleLabel} · ${modeLabel} · ${timing}`;
row.appendChild(top);
row.appendChild(meta);
element.appendChild(row);