mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-05 10:53:59 +00:00
Merge origin/main: GNSS integrity, geo file import and cockpit emergencies meet i18n
Conflicts resolved by keeping both sides: the Events group gains gnss-integrity with a translated label, the cockpit aircraft line shows main's transponder emergency through a localized formatter (cockpitMath.js stays i18n-free, like the Context scope line), and the boundary lists keep both the i18n modules and main's new data modules. Main's new UI is translated into es and ru: the GNSS Integrity row, legend and notes; geo file import (button, hints, list actions, every import error, with numbers passed as placeholders); transponder status names. Also formats kartaview/viewer.js so format:check passes. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
commit
8029747b7e
88 files changed
+11991
-137
No files matched your search
@@ -13,6 +13,7 @@ import {
|
||||
compassDivisions,
|
||||
formatAltitudeRulerTick,
|
||||
formatCompassDivision,
|
||||
formatCockpitEmergency,
|
||||
formatSpeedRulerTick,
|
||||
normalizeHeading,
|
||||
relativeBearing,
|
||||
@@ -25,6 +26,22 @@ import {
|
||||
setCockpitRollingValue,
|
||||
} from './cockpitPresentation.js';
|
||||
|
||||
/** A transponder status name (src/data/aircraftEmergency.js) for the HUD. */
|
||||
const emergencyLabel = ({ name }) => t(name).toUpperCase();
|
||||
|
||||
/** The emergency line in the active language (see cockpitMath.js). */
|
||||
const LOCALIZED_EMERGENCY = Object.freeze({
|
||||
squawk: (parts) =>
|
||||
t('SQUAWK {code} · {status}', {
|
||||
code: parts.squawk,
|
||||
status: emergencyLabel(parts),
|
||||
}),
|
||||
adsb: (parts) =>
|
||||
parts.priority
|
||||
? t('ADS-B PRIORITY · {status}', { status: emergencyLabel(parts) })
|
||||
: t('ADS-B EMERGENCY · {status}', { status: emergencyLabel(parts) }),
|
||||
});
|
||||
|
||||
export function updateHud(
|
||||
info,
|
||||
nowMs = performance.now(),
|
||||
@@ -138,13 +155,25 @@ export function updateHud(
|
||||
: info.stale
|
||||
? t('STALE FEED')
|
||||
: t('LIVE TRACK');
|
||||
this.aircraftMeta.textContent = t(
|
||||
'{aircraftClass} · {feedState} · COURSE ALIGNED',
|
||||
{
|
||||
aircraftClass:
|
||||
info.layerId === 'military' ? t('MILITARY') : t('COMMERCIAL'),
|
||||
feedState,
|
||||
},
|
||||
const aircraftClass =
|
||||
info.layerId === 'military' ? t('MILITARY') : t('COMMERCIAL');
|
||||
const emergency = formatCockpitEmergency(
|
||||
info.emergency,
|
||||
LOCALIZED_EMERGENCY,
|
||||
);
|
||||
this.aircraftMeta.textContent = emergency
|
||||
? t('{aircraftClass} · {emergency} · {feedState}', {
|
||||
aircraftClass,
|
||||
emergency,
|
||||
feedState,
|
||||
})
|
||||
: t('{aircraftClass} · {feedState} · COURSE ALIGNED', {
|
||||
aircraftClass,
|
||||
feedState,
|
||||
});
|
||||
this.aircraftMeta.classList.toggle(
|
||||
'emergency',
|
||||
info.emergency?.severity === 'emergency',
|
||||
);
|
||||
}
|
||||
this.updateRoute(info);
|
||||
|
||||
Reference in new issue
Block a user