mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-04 02:14:01 +00:00
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:
1 parent
f3da0e1761
commit
a28e29e05e
7 files changed
+22
-13
No files matched your search
+1
-1
@@ -113,7 +113,7 @@ function localizedProvenanceTag(provenance) {
|
||||
? t(FEED_STATE_LABELS[provenance.state])
|
||||
: provenance.state.toUpperCase();
|
||||
if (!provenance.names.length) return state;
|
||||
return t('{state}: {layers}', {
|
||||
return t('{state} {layers}', {
|
||||
state,
|
||||
layers: provenance.names
|
||||
.map((name) => localizeLayerName(name).toUpperCase())
|
||||
|
||||
@@ -2010,7 +2010,6 @@
|
||||
"Box and images cleared": "Recuadro e imágenes borrados",
|
||||
"Box is {size} wide · limit {limit}": "El recuadro mide {size} · límite {limit}",
|
||||
"View is {size} wide · limit {limit}": "La vista mide {size} · límite {limit}",
|
||||
"{state}: {layers}": "{state}: {layers}",
|
||||
"{mode} · {band} · {locality} | {region} | ALT {alt} | WINDOW {window} | SUN {sun}° | ONA {ona}° | {zone}": "{mode} · {band} · {locality} | {region} | ALT {alt} | VENTANA {window} | SUN {sun}° | ONA {ona}° | {zone}",
|
||||
"Frame unavailable; previous observation retained": "Fotograma no disponible; se mantiene la observación anterior",
|
||||
"Weather imagery unavailable": "Imágenes meteorológicas no disponibles",
|
||||
@@ -2023,5 +2022,8 @@
|
||||
"Globe imagery unavailable": "Imágenes del globo no disponibles",
|
||||
"Globe field image unavailable": "Imagen del campo en el globo no disponible",
|
||||
"status chip|UNAVAILABLE": "NO DISP.",
|
||||
"Uses registered content or linked media. Those external files are not included in a scene bundle. Their original notices still apply.": "Usa contenido registrado o medios vinculados. Esos archivos externos no se incluyen en un paquete de escena. Sus avisos originales siguen vigentes."
|
||||
"Uses registered content or linked media. Those external files are not included in a scene bundle. Their original notices still apply.": "Usa contenido registrado o medios vinculados. Esos archivos externos no se incluyen en un paquete de escena. Sus avisos originales siguen vigentes.",
|
||||
"{state} {layers}": "{state}: {layers}",
|
||||
"Selected Space Mission": "Misión espacial seleccionada",
|
||||
"{duration}s + {hold}s": "{duration} s + {hold} s"
|
||||
}
|
||||
@@ -2042,7 +2042,6 @@
|
||||
"Box and images cleared": "Область и снимки сброшены",
|
||||
"Box is {size} wide · limit {limit}": "Область шириной {size} · предел {limit}",
|
||||
"View is {size} wide · limit {limit}": "Вид шириной {size} · предел {limit}",
|
||||
"{state}: {layers}": "{state}: {layers}",
|
||||
"{mode} · {band} · {locality} | {region} | ALT {alt} | WINDOW {window} | SUN {sun}° | ONA {ona}° | {zone}": "{mode} · {band} · {locality} | {region} | ALT {alt} | ОКНО {window} | SUN {sun}° | ONA {ona}° | {zone}",
|
||||
"Frame unavailable; previous observation retained": "Кадр недоступен; показано предыдущее наблюдение",
|
||||
"Weather imagery unavailable": "Погодные снимки недоступны",
|
||||
@@ -2055,5 +2054,8 @@
|
||||
"Globe imagery unavailable": "Снимки глобуса недоступны",
|
||||
"Globe field image unavailable": "Изображение поля на глобусе недоступно",
|
||||
"status chip|UNAVAILABLE": "НЕДОСТ.",
|
||||
"Uses registered content or linked media. Those external files are not included in a scene bundle. Their original notices still apply.": "Используется зарегистрированный контент или связанные медиафайлы. Эти внешние файлы не входят в архив сцены. Их исходные уведомления по-прежнему действуют."
|
||||
"Uses registered content or linked media. Those external files are not included in a scene bundle. Their original notices still apply.": "Используется зарегистрированный контент или связанные медиафайлы. Эти внешние файлы не входят в архив сцены. Их исходные уведомления по-прежнему действуют.",
|
||||
"{state} {layers}": "{state}: {layers}",
|
||||
"Selected Space Mission": "Выбранная космическая миссия",
|
||||
"{duration}s + {hold}s": "{duration} с + {hold} с"
|
||||
}
|
||||
@@ -470,7 +470,7 @@ export function createPanel({ state: layerState, services, parts, source }) {
|
||||
layerState._missionPanel.className = 'context-space-mission-detail';
|
||||
layerState._missionPanel.setAttribute(
|
||||
'aria-label',
|
||||
t('SELECTED SPACE MISSION'),
|
||||
t('Selected Space Mission'),
|
||||
);
|
||||
layerState._missionPanel.innerHTML = `<div class="space-mission-view-header"><span>${t('SELECTED SPACE MISSION')}</span><button type="button" data-mission-close title="${t('Show all missions')}" aria-label="${t('Deselect mission')}">×</button></div><div class="space-mission-detail"><strong data-mission-title>${t('MISSION')}</strong><span data-mission-field data-mission-provider></span><span data-mission-field>${t('STATUS · ')}<b data-mission-status></b></span><span data-mission-field>${t('LAUNCH SITE · ')}<b data-mission-site></b></span><span data-mission-field>${t('LAUNCH TIME · ')}<b data-mission-time></b></span><span data-mission-field>${t('ORBIT · ')}<b data-mission-orbit></b></span><span>${t('ASCENT PATH · ')}<b data-mission-ascent-source></b></span><span data-mission-field>${t('CURRENT DISTANCE FROM EARTH · ')}<b data-mission-distance></b></span><span data-mission-field>${t('SATELLITE SPEED · ')}<b data-mission-speed></b></span></div><section class="mission-data-section"><h4>${t('PAYLOAD')}</h4><div class="mission-table-scroll"><table class="mission-data-table"><thead><tr><th>${t('NAME')}</th><th>${t('TYPE')}</th><th>${t('DESTINATION')}</th></tr></thead><tbody data-mission-payloads></tbody></table></div></section><section class="mission-data-section" data-mission-stages-section><h4>${t('STAGE / RE-ENTRY / RECOVERY')}</h4><div class="mission-table-scroll"><table class="mission-data-table"><thead><tr><th>${t('STAGE')}</th><th>${t('STATUS')}</th><th>${t('FINAL POSITION')}</th></tr></thead><tbody data-mission-stages></tbody></table></div></section><div class="mission-replay-speed-control"><div class="mission-replay-speed-header"><label for="space-mission-replay-speed">${t('REPLAY SPEED')}</label><output class="gev-slider-value" for="space-mission-replay-speed" data-mission-replay-speed-output>1×</output></div><input id="space-mission-replay-speed" class="gev-quantitative-slider" type="range" min="0.25" max="4" step="0.25" value="1" data-mission-replay-speed aria-label="${t('Replay speed multiplier')}"><div class="mission-replay-speed-scale" aria-hidden="true"><span>0.25×</span><span>1×</span><span>4×</span></div></div><div class="mission-action-row"><button type="button" class="mission-focus-button" data-mission-focus>${t('FOCUS')}</button><button type="button" class="mission-replay-button" data-mission-replay aria-pressed="false">${t('REPLAY ASCENT')}</button></div><div class="space-mission-nav"><button type="button" class="mission-nav-button" data-mission-prev title="${t('Previous mission')}"><span aria-hidden="true">‹</span> ${t('PREV')}</button><span class="mission-nav-index" data-mission-index>—</span><button type="button" class="mission-nav-button" data-mission-next title="${t('Next mission')}">${t('NEXT')} <span aria-hidden="true">›</span></button></div><button type="button" class="panel-layer-toggle" data-mission-show-all>${t('SHOW ALL / DESELECT')}</button>`;
|
||||
layerState._missionPanel
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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\./);
|
||||
});
|
||||
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user