diff --git a/changelog.d/1773-context-panel.md b/changelog.d/1773-context-panel.md new file mode 100644 index 000000000..cf2bf3d1c --- /dev/null +++ b/changelog.d/1773-context-panel.md @@ -0,0 +1,5 @@ +- Rebuild Context around one card for whatever is picked (facts, route, + weather, local news and what is nearby) and a description of the view when + nothing is; Contacts, Space Missions and Radio stay in it, and the Labels + and 3D aircraft settings move into its Properties tab while their layers + are on (manjunath22466, samehkhamis, #1773). diff --git a/docs/CURRENT-STATE.md b/docs/CURRENT-STATE.md index c4eb13b6b..166e537b9 100644 --- a/docs/CURRENT-STATE.md +++ b/docs/CURRENT-STATE.md @@ -898,6 +898,41 @@ and touch screens, while the rails are hidden (clean view, recording), and it follows the rails' sides in a right-to-left language. On a phone, Visual is in the More sheet with the dock's Visual Presets, as before. +## Context panel — November 16, 2026 + +Context leads with one card for whatever is picked. A click on anything a +layer can identify (`src/ui/entityContextBridge.js`, through +`src/data/pickedContext.js`) opens its card (`src/ui/stores/entityCard.js`, +`src/ui/views/panels/EntityCard.vue`): the item's facts from its record, a +route with progress for a flight, an altitude graph, the weather, local +time and news where it is, and the flights, vessels, hazards and warnings +within the radius the panel sets (25 to 2,500 km). Aircraft, satellites and +vessels are followed as they are picked; the card says Following only while +the camera follows the card's own item, and closing the card lets go. +Aircraft and satellites offer Enter Cockpit and Enter orbital view; transit +vehicles show their motion and fleet. A camera's card shows its latest frame +from the CCTV panel. + +With nothing picked, the panel describes the view +(`src/ui/views/panels/ViewContext.vue`): the place under the middle of the +screen and the towns around it from the Wikidata cities pack, the height, +the local solar time and daylight, what is in view per layer with live +counts and breakdowns, and the same weather and hazards. A search field in +the header narrows every list. Expanded, Context becomes a full-height +column at the right edge (the left edge right to left) and the map credits +stop short of it. + +The Contacts and Space Missions modes and the Radio strip stay in the +panel's main tab, below the card. When Contacts follows the aircraft the +card shows, its list sits inside the card. Turning Radio or Launches on +opens Context. The Properties tab holds the Labels and 3D aircraft +settings from Visual while a layer they act on is on. + +Context does its reading only while its panel is open. Weather and news +come through the regional brief service; earthquakes, tropical storms and +fire perimeters come from the same feeds as their layers, cached for five +minutes; satellite fire hits only while the FIRMS layer is on. + ## Wikidata cities pack — November 15, 2026 `src/data/local_data/wikidata_cities/cities.json` bundles 31,827 settlements of diff --git a/index.html b/index.html index 924b85588..fcc5f79cf 100644 --- a/index.html +++ b/index.html @@ -26,7 +26,7 @@ with the sources: src/materialSymbolsSubset.test.mjs fails when a source names a glyph this list is missing, because a missing glyph does not draw a box — the ligature never forms and the element renders the literal word. --> - +
diff --git a/scripts/package-boundaries.json b/scripts/package-boundaries.json index e882b9977..8db0d6c70 100644 --- a/scripts/package-boundaries.json +++ b/scripts/package-boundaries.json @@ -250,7 +250,33 @@ "src/ui/stores/worldTime.js", "src/ui/views/panels/WorldTimeline.vue", "src/ui/surfaceKeyboard.js", - "src/scenes/storyTags.js" + "src/scenes/storyTags.js", + "src/ui/contextLayerTabs.js", + "src/ui/contextSearch.js", + "src/ui/layerNames.js", + "src/ui/views/panels/AltitudeGraph.vue", + "src/ui/stores/omnibar.js", + "src/ui/views/panels/SunDial.vue", + "src/ui/views/panels/CctvPreview.vue", + "src/data/contextStore.js", + "src/data/entityContext.js", + "src/ui/stores/entityCard.js", + "src/ui/contextRadius.js", + "src/layers/firms/source.js", + "src/layers/earthquakes/records.js", + "src/ui/views/panels/ViewContext.vue", + "src/layers/earthquakes/source.js", + "src/layers/cyclones/source.js", + "src/i18n/marker.js", + "src/sources/httpBody.js", + "src/layers/perimeters/source.js", + "src/ui/spotConditions.js", + "src/ui/views/panels/SpotConditions.vue", + "src/data/wikidataCities.js", + "src/ui/views/panels/EntityCard.vue", + "src/data/aircraftEmergency.js", + "src/data/aircraftClass.js", + "src/data/entityRecords.js" ], "external": ["vue", "pinia", "vue-i18n"] }, @@ -1521,7 +1547,6 @@ "src/ui/stores/cockpit.js", "src/ui/stores/locale.js", "src/ui/stores/providerSettings.js", - "src/ui/stores/sceneSharing.js", "src/ui/stores/voice.js", "src/ui/stores/location.js", "src/ui/stores/display.js", @@ -1601,7 +1626,17 @@ "src/render/vectorBase/style.js", "src/render/vectorBase/paint.js", "src/render/vectorBase/expressions.js", - "src/time/frameWait.js" + "src/time/frameWait.js", + "src/ui/stores/omnibar.js", + "src/data/contextStore.js", + "src/data/pickedContext.js", + "src/data/entityContext.js", + "src/data/aircraftClass.js", + "src/data/aircraftEmergency.js", + "src/ui/stores/entityCard.js", + "src/ui/entityContextBridge.js", + "src/data/trackingClickGesture.js", + "src/ui/stores/sceneSharing.js" ], "external": [ "cesium", @@ -3989,7 +4024,8 @@ "src/ui/stores/voice.js", "src/ui/vueRuntime.js", "src/ui/stores/pointerReticle.js", - "src/ui/i18n.js" + "src/ui/i18n.js", + "src/ui/stores/omnibar.js" ], "external": ["vue", "pinia", "vue-i18n"] }, @@ -5404,7 +5440,11 @@ "src/data/courseFromFixes.js", "src/time/frameWait.js", "src/scenes/storyTags.js", - "src/scenes/storyThumb.js" + "src/scenes/storyThumb.js", + "src/ui/stores/omnibar.js", + "src/data/entityContext.js", + "src/ui/stores/entityCard.js", + "src/ui/entityContextBridge.js" ], "external": [ "hls.js", @@ -6849,7 +6889,8 @@ "src/ui/vueRuntime.js", "src/ui/stores/voice.js", "src/ui/stores/pointerReticle.js", - "src/ui/i18n.js" + "src/ui/i18n.js", + "src/ui/stores/omnibar.js" ], "external": ["vue", "pinia", "vue-i18n"] }, diff --git a/src/app/controls.js b/src/app/controls.js index bec189ed3..bb53381c4 100644 --- a/src/app/controls.js +++ b/src/app/controls.js @@ -38,6 +38,7 @@ export function createApplicationControls({ ...services, ...operations.surface.controlServices, searchAndFlyTo: operations.searchAndFlyTo, + pickWorldFromScreen: operations.annotationResolver?.pickWorldFromScreen, fetchRegionalBrief: (...args) => operations.requests.regional.getBrief(...args), ...catalogControlServices(catalog), diff --git a/src/contextTabKeyboard.test.mjs b/src/contextTabKeyboard.test.mjs index 9ebd0e384..4d5872199 100644 --- a/src/contextTabKeyboard.test.mjs +++ b/src/contextTabKeyboard.test.mjs @@ -152,7 +152,7 @@ test('Context async action buttons remain focused while busy', () => { assert.match(clearButton, /:aria-busy=/); }); -test('Context header holds only its title, edge switch and collapse control', () => { +test('Context header holds its title, search, expand, edge switch and collapse control', () => { const panel = html.match( /
0, `unbalanced functional pseudo-class in "${selector}"`); @@ -116,7 +119,9 @@ function specificity(selector) { classes += (rest.match(/\[[^\]]*\]/g) || []).length; types += (rest.match(/::[\w-]+/g) || []).length; classes += (rest.replace(/::[\w-]+/g, '').match(/:[\w-]+/g) || []).length; - types += (rest.replace(/\[[^\]]*\]/g, '').match(/(?:^|[\s>+~])[a-zA-Z][\w-]*/g) || []).length; + types += ( + rest.replace(/\[[^\]]*\]/g, '').match(/(?:^|[\s>+~])[a-zA-Z][\w-]*/g) || [] + ).length; return [ids, classes, types]; } @@ -165,7 +170,11 @@ function flattenRules(source) { rules.push({ order: rules.length, media: [...mediaStack], - parts: splitTopLevel(head, ',').map((part) => part.trim().replace(/\(\s+/g, '(').replace(/\s+\)/g, ')')).filter(Boolean), + parts: splitTopLevel(head, ',') + .map((part) => + part.trim().replace(/\(\s+/g, '(').replace(/\s+\)/g, ')'), + ) + .filter(Boolean), decls, }); index = close + 1; @@ -217,14 +226,37 @@ const RECOGNIZED = new Set([ '#command-dock.dock-has-two-pinned-trays #control-panel.dock-pinned-top.dock-pinned:not(.collapsed) .dock-popover-content', ]); -const ELEMENT_KEYS = ['#cesium-credits', '#command-dock', '#right-context-rail', '.dock-popover-content']; +const DOCKED_RAIL = 'body.context-docked #right-context-rail'; +const ELEMENT_KEYS = [ + '#cesium-credits', + '#command-dock', + '#right-context-rail', + '.dock-popover-content', +]; // Any of these on a modelled element's own box changes the geometry this pin // reasons about, so each occurrence must be recognized and vetted. const GUARDED_PROPS = new Set([ - 'bottom', 'top', 'inset', 'inset-block', 'inset-block-end', 'inset-inline', 'inset-inline-end', - 'margin', 'margin-bottom', 'margin-block', 'margin-block-end', 'all', - 'height', 'min-height', 'max-height', 'position', 'transform', 'translate', 'scale', 'zoom', + 'bottom', + 'top', + 'inset', + 'inset-block', + 'inset-block-end', + 'inset-inline', + 'inset-inline-end', + 'margin', + 'margin-bottom', + 'margin-block', + 'margin-block-end', + 'all', + 'height', + 'min-height', + 'max-height', + 'position', + 'transform', + 'translate', + 'scale', + 'zoom', ]); // Custom properties allowed inside a modelled offset. Each is a pinned-tray @@ -290,7 +322,10 @@ function parseMediaCondition(condition) { function appliesAt(rule, width, label) { return rule.media.every((condition) => { const maxWidth = parseMediaCondition(condition); - assert.ok(maxWidth !== null, `unmodelled media condition "${condition}" gates ${label}`); + assert.ok( + maxWidth !== null, + `unmodelled media condition "${condition}" gates ${label}`, + ); return width <= maxWidth; }); } @@ -305,13 +340,26 @@ function resolve(candidates, prop, width, label) { if (!candidates.includes(part)) continue; for (const decl of rule.decls) { if (decl.prop !== prop) continue; - const contender = { decl, part, order: rule.order, spec: specificity(part) }; - if (!winner) { winner = contender; continue; } - const byImportance = Number(contender.decl.important) - Number(winner.decl.important); + const contender = { + decl, + part, + order: rule.order, + spec: specificity(part), + }; + if (!winner) { + winner = contender; + continue; + } + const byImportance = + Number(contender.decl.important) - Number(winner.decl.important); const bySpecificity = compareSpecificity(contender.spec, winner.spec); - if (byImportance > 0 - || (byImportance === 0 && bySpecificity > 0) - || (byImportance === 0 && bySpecificity === 0 && contender.order > winner.order)) { + if ( + byImportance > 0 || + (byImportance === 0 && bySpecificity > 0) || + (byImportance === 0 && + bySpecificity === 0 && + contender.order > winner.order) + ) { winner = contender; } } @@ -325,10 +373,26 @@ function resolve(candidates, prop, width, label) { function toPx(value, viewportHeight, where) { const trimmed = value.trim(); const inner = /^calc\(/.test(trimmed) ? trimmed.slice(5, -1) : trimmed; - assert.doesNotMatch(inner, /\bcalc\(/, `nested calc() in ${where}: "${value}"`); - assert.doesNotMatch(inner, /\b(min|max|clamp|env|attr|round|mod)\(/, `unmodelled function in ${where}: "${value}"`); - assert.doesNotMatch(inner, /[*/]/, `unmodelled operator in ${where}: "${value}"`); - assert.doesNotMatch(inner, /\s-\s/, `unmodelled subtraction in ${where}: "${value}"`); + assert.doesNotMatch( + inner, + /\bcalc\(/, + `nested calc() in ${where}: "${value}"`, + ); + assert.doesNotMatch( + inner, + /\b(min|max|clamp|env|attr|round|mod)\(/, + `unmodelled function in ${where}: "${value}"`, + ); + assert.doesNotMatch( + inner, + /[*/]/, + `unmodelled operator in ${where}: "${value}"`, + ); + assert.doesNotMatch( + inner, + /\s-\s/, + `unmodelled subtraction in ${where}: "${value}"`, + ); let total = 0; for (const raw of splitTopLevel(inner, '+')) { const term = raw.trim(); @@ -336,40 +400,60 @@ function toPx(value, viewportHeight, where) { if (term === '100%') continue; // the tray's own panel height, added separately if (term.startsWith('var(')) { const name = term.slice(4, term.lastIndexOf(')')).split(',')[0].trim(); - assert.ok(VETTED_VARS.has(name), `unvetted custom property ${name} in ${where}: "${value}"`); + assert.ok( + VETTED_VARS.has(name), + `unvetted custom property ${name} in ${where}: "${value}"`, + ); if (name === '--world-timeline-lift') total += liftPx; continue; // proven non-negative; 0 is the conservative floor } - assert.match(term, /^-?[\d.]+(px|rem|vh)$/, `unmodelled length term "${term}" in ${where}: "${value}"`); + assert.match( + term, + /^-?[\d.]+(px|rem|vh)$/, + `unmodelled length term "${term}" in ${where}: "${value}"`, + ); const number = Number.parseFloat(term); if (term.endsWith('rem')) total += number * REM_PX; - else if (term.endsWith('vh')) total += number * viewportHeight / 100; + else if (term.endsWith('vh')) total += (number * viewportHeight) / 100; else total += number; } return total; } -const WIDTHS = [1440, 1024, 980, 900, 830, 800, 760, 721, 720, 700, 640, 600, 480, 375]; +const WIDTHS = [ + 1440, 1024, 980, 900, 830, 800, 760, 721, 720, 700, 640, 600, 480, 375, +]; const HEIGHTS = [500, 560, 640, 700, 800, 900, 1000, 1080, 1200, 1440, 1600]; -const CREDIT_SELECTORS = ['#cesium-credits', 'body:not(.ui-clean-view):not(.recording-mode) #cesium-credits']; -const MINIMAL_HUD_CREDIT = "body:not(.ui-clean-view):not(.recording-mode):has(#intel-hud[data-variant='minimal'].active) #cesium-credits"; -const TRAY_ORDINARY = ['#command-dock .dock-popover-content', '#command-dock #location-bar .dock-popover-content']; +const CREDIT_SELECTORS = [ + '#cesium-credits', + 'body:not(.ui-clean-view):not(.recording-mode) #cesium-credits', +]; +const MINIMAL_HUD_CREDIT = + "body:not(.ui-clean-view):not(.recording-mode):has(#intel-hud[data-variant='minimal'].active) #cesium-credits"; +const TRAY_ORDINARY = [ + '#command-dock .dock-popover-content', + '#command-dock #location-bar .dock-popover-content', +]; const TRAY_SCENARIOS = [ { name: 'ordinary tray', offset: TRAY_ORDINARY }, { name: 'one pinned tray', - offset: [...TRAY_ORDINARY, - '#command-dock.dock-has-pinned-tray #location-bar:not(.collapsed):not(.dock-pinned) .dock-popover-content'], + offset: [ + ...TRAY_ORDINARY, + '#command-dock.dock-has-pinned-tray #location-bar:not(.collapsed):not(.dock-pinned) .dock-popover-content', + ], stackVar: '--dock-pinned-stack-height', }, { name: 'two pinned trays (upper)', - offset: [...TRAY_ORDINARY, + offset: [ + ...TRAY_ORDINARY, // The stock form still governs above 900px; the ID form is what keeps it // ahead of the ordinary narrow rule below it. '#command-dock.dock-has-two-pinned-trays .dock-pinned-top.dock-pinned:not(.collapsed) .dock-popover-content', - '#command-dock.dock-has-two-pinned-trays #location-bar.dock-pinned-top.dock-pinned:not(.collapsed) .dock-popover-content'], + '#command-dock.dock-has-two-pinned-trays #location-bar.dock-pinned-top.dock-pinned:not(.collapsed) .dock-popover-content', + ], stackVar: '--dock-lower-pinned-height', }, ]; @@ -382,12 +466,18 @@ function creditTopPx(width, height) { function trayBottomPx(scenario, width, height) { const dock = resolve(['#command-dock'], 'bottom', width, 'command dock'); const offset = resolve(scenario.offset, 'bottom', width, scenario.name); - const margin = resolve(['#command-dock #location-bar:not(.collapsed) .dock-popover-content'], - 'margin-bottom', width, 'open tray margin'); - return toPx(dock.decl.value, height, 'dock bottom') - + COMPACT_DOCK_HEIGHT_PX - + toPx(offset.decl.value, height, `${scenario.name} offset`) - + toPx(margin.decl.value, height, 'tray margin'); + const margin = resolve( + ['#command-dock #location-bar:not(.collapsed) .dock-popover-content'], + 'margin-bottom', + width, + 'open tray margin', + ); + return ( + toPx(dock.decl.value, height, 'dock bottom') + + COMPACT_DOCK_HEIGHT_PX + + toPx(offset.decl.value, height, `${scenario.name} offset`) + + toPx(margin.decl.value, height, 'tray margin') + ); } // ── Fail-closed guards ────────────────────────────────────────────────────── @@ -395,15 +485,31 @@ function trayBottomPx(scenario, width, height) { test('the specificity calculator itself is pinned', () => { const cases = [ ['#cesium-credits', [1, 0, 0]], - ['body:not(.ui-clean-view):not(.recording-mode) #cesium-credits', [1, 2, 1]], + [ + 'body:not(.ui-clean-view):not(.recording-mode) #cesium-credits', + [1, 2, 1], + ], ['#command-dock #location-bar .dock-popover-content', [2, 1, 0]], - ['#command-dock.dock-has-pinned-tray #location-bar:not(.collapsed):not(.dock-pinned) .dock-popover-content', [2, 4, 0]], - ['#command-dock.dock-has-two-pinned-trays #location-bar.dock-pinned-top.dock-pinned:not(.collapsed) .dock-popover-content', [2, 5, 0]], - ['#command-dock.dock-has-two-pinned-trays .dock-pinned-top.dock-pinned:not(.collapsed) .dock-popover-content', [1, 5, 0]], + [ + '#command-dock.dock-has-pinned-tray #location-bar:not(.collapsed):not(.dock-pinned) .dock-popover-content', + [2, 4, 0], + ], + [ + '#command-dock.dock-has-two-pinned-trays #location-bar.dock-pinned-top.dock-pinned:not(.collapsed) .dock-popover-content', + [2, 5, 0], + ], + [ + '#command-dock.dock-has-two-pinned-trays .dock-pinned-top.dock-pinned:not(.collapsed) .dock-popover-content', + [1, 5, 0], + ], ['#command-dock .dock-popover-content::after', [1, 1, 1]], ]; for (const [selector, expected] of cases) { - assert.deepEqual(specificity(selector), expected, `specificity of "${selector}"`); + assert.deepEqual( + specificity(selector), + expected, + `specificity of "${selector}"`, + ); } }); @@ -412,28 +518,46 @@ test('the model refuses every cascade construct it cannot resolve', () => { for (const { rule, part } of ownBoxEntries()) { const guarded = rule.decls.filter((decl) => GUARDED_PROPS.has(decl.prop)); if (!guarded.length) continue; + // Expanded Context covers the right edge top to bottom; the credit row + // stops short of it instead (the docked-Context test below). + if (part === DOCKED_RAIL) continue; if (!RECOGNIZED.has(part)) { - complaints.push(`unrecognized selector positions a modelled element: "${part}" (${guarded.map((d) => d.prop).join(', ')})`); + complaints.push( + `unrecognized selector positions a modelled element: "${part}" (${guarded.map((d) => d.prop).join(', ')})`, + ); continue; } for (const condition of rule.media) { if (parseMediaCondition(condition) === null) { - complaints.push(`unmodelled media condition "${condition}" on "${part}"`); + complaints.push( + `unmodelled media condition "${condition}" on "${part}"`, + ); } } if (rule.media.length > 1) { - complaints.push(`nested media queries on "${part}": ${rule.media.join(' && ')}`); + complaints.push( + `nested media queries on "${part}": ${rule.media.join(' && ')}`, + ); } for (const decl of guarded) { // Measurement is synchronous and restored before returning or painting. // Only these two exact declarations earn the exemption tested below. - const railMeasurement = part === '#right-context-rail[data-rail-measuring]' - && ((decl.prop === 'height' && decl.value === 'auto') - || (decl.prop === 'max-height' && decl.value === 'none')); - if (decl.important && !railMeasurement) complaints.push(`!important on ${decl.prop} of "${part}"`); - if (decl.prop === 'inset' || decl.prop === 'margin' || decl.prop === 'all' - || decl.prop.startsWith('inset-') || decl.prop.startsWith('margin-block')) { - complaints.push(`shorthand ${decl.prop} on "${part}" — the model reads longhands only`); + const railMeasurement = + part === '#right-context-rail[data-rail-measuring]' && + ((decl.prop === 'height' && decl.value === 'auto') || + (decl.prop === 'max-height' && decl.value === 'none')); + if (decl.important && !railMeasurement) + complaints.push(`!important on ${decl.prop} of "${part}"`); + if ( + decl.prop === 'inset' || + decl.prop === 'margin' || + decl.prop === 'all' || + decl.prop.startsWith('inset-') || + decl.prop.startsWith('margin-block') + ) { + complaints.push( + `shorthand ${decl.prop} on "${part}" — the model reads longhands only`, + ); } if (decl.prop === 'height' || decl.prop === 'max-height') { // A capped height can override `bottom` and invalidate the measured @@ -442,68 +566,159 @@ test('the model refuses every cascade construct it cannot resolve', () => { // modelled band by the rail clearance test) and `.layout-focus` // (proven inapplicable at <=720px by the mobile-mode test), plus // synchronous measurement, which is removed before any paint. - const railOwn = part === '#right-context-rail' && decl.prop === 'max-height'; + const railOwn = + part === '#right-context-rail' && decl.prop === 'max-height'; const railFocus = part === '#right-context-rail.layout-focus'; - if (!railOwn && !railFocus && !railMeasurement) complaints.push(`${decl.prop}: ${decl.value} on "${part}"`); + if (!railOwn && !railFocus && !railMeasurement) + complaints.push(`${decl.prop}: ${decl.value} on "${part}"`); } - if (decl.prop === 'transform' && /translateY|translate3d|matrix|scale\(/.test(decl.value)) { + if ( + decl.prop === 'transform' && + /translateY|translate3d|matrix|scale\(/.test(decl.value) + ) { const identity = decl.value === 'translateY(0) scale(1)'; - const closedTray = part === '#command-dock .dock-popover-content' - && decl.value === 'translateY(0.55rem) scale(0.985)'; - if (!identity && !closedTray) complaints.push(`vertical transform on "${part}": ${decl.value}`); + const closedTray = + part === '#command-dock .dock-popover-content' && + decl.value === 'translateY(0.55rem) scale(0.985)'; + if (!identity && !closedTray) + complaints.push(`vertical transform on "${part}": ${decl.value}`); } - if (decl.prop === 'translate' || decl.prop === 'scale' || decl.prop === 'zoom') { - complaints.push(`${decl.prop} on "${part}" moves the box outside the model`); + if ( + decl.prop === 'translate' || + decl.prop === 'scale' || + decl.prop === 'zoom' + ) { + complaints.push( + `${decl.prop} on "${part}" moves the box outside the model`, + ); } } } - assert.deepEqual(complaints, [], `the attribution model cannot resolve:\n ${complaints.join('\n ')}\n`); + assert.deepEqual( + complaints, + [], + `the attribution model cannot resolve:\n ${complaints.join('\n ')}\n`, + ); }); test('custom properties inside modelled offsets are provably non-negative', () => { // The model evaluates them at 0, which is only a conservative floor if they // can never go negative. Both writers are checked: CSS and the JS. - const declared = RULES.flatMap((rule) => rule.decls.filter((decl) => VETTED_VARS.has(decl.prop))); - assert.ok(declared.length >= VETTED_VARS.size, 'every vetted custom property needs a CSS default'); + const declared = RULES.flatMap((rule) => + rule.decls.filter((decl) => VETTED_VARS.has(decl.prop)), + ); + assert.ok( + declared.length >= VETTED_VARS.size, + 'every vetted custom property needs a CSS default', + ); for (const decl of declared) { - assert.doesNotMatch(decl.value, /-\s*\d/, `${decl.prop} has a negative CSS default: ${decl.value}`); - const shape = FIXED_LENGTH_VARS.has(decl.prop) ? /^(0|\d+px)$/ : /^(0|0px)$/; - assert.match(decl.value, shape, `${decl.prop} default is not a vetted shape: ${decl.value}`); + assert.doesNotMatch( + decl.value, + /-\s*\d/, + `${decl.prop} has a negative CSS default: ${decl.value}`, + ); + const shape = FIXED_LENGTH_VARS.has(decl.prop) + ? /^(0|\d+px)$/ + : /^(0|0px)$/; + assert.match( + decl.value, + shape, + `${decl.prop} default is not a vetted shape: ${decl.value}`, + ); } - const layout = fs.readFileSync(new URL('./ui/panelLayoutController.js', import.meta.url), 'utf8'); + const layout = fs.readFileSync( + new URL('./ui/panelLayoutController.js', import.meta.url), + 'utf8', + ); const start = layout.indexOf('_updateCommandDockTrayStack() {'); assert.ok(start > 0, '_updateCommandDockTrayStack is missing'); - const writer = layout.slice(start, layout.indexOf(' _scheduleAdaptivePanelLayout(', start)); + const writer = layout.slice( + start, + layout.indexOf(' _scheduleAdaptivePanelLayout(', start), + ); // Every value traces back to a rect height, floored at 0 and rounded up. - assert.match(writer, /const locationHeight =\s*[\s\S]{0,180}?getBoundingClientRect\(\)\.height\s*\|\| 0;/); - assert.match(writer, /const presetsHeight =\s*[\s\S]{0,180}?getBoundingClientRect\(\)\.height\s*\|\| 0;/); - assert.match(writer, /const lowerPinnedHeight =\s*[\s\S]{0,220}?getBoundingClientRect\(\)\.height\s*\|\| 0;/); - assert.match(writer, /const locationHeightPx = Math\.ceil\(locationHeight\);/); + assert.match( + writer, + /const locationHeight =\s*[\s\S]{0,180}?getBoundingClientRect\(\)\.height\s*\|\| 0;/, + ); + assert.match( + writer, + /const presetsHeight =\s*[\s\S]{0,180}?getBoundingClientRect\(\)\.height\s*\|\| 0;/, + ); + assert.match( + writer, + /const lowerPinnedHeight =\s*[\s\S]{0,220}?getBoundingClientRect\(\)\.height\s*\|\| 0;/, + ); + assert.match( + writer, + /const locationHeightPx = Math\.ceil\(locationHeight\);/, + ); assert.match(writer, /const presetsHeightPx = Math\.ceil\(presetsHeight\);/); - assert.match(writer, /'--dock-location-pinned-height',\s*`\$\{locationHeightPx\}px`/); - assert.match(writer, /'--dock-presets-pinned-height',\s*`\$\{presetsHeightPx\}px`/); - assert.match(writer, /'--dock-lower-pinned-height',\s*`\$\{Math\.ceil\(lowerPinnedHeight\)\}px`/); + assert.match( + writer, + /'--dock-location-pinned-height',\s*`\$\{locationHeightPx\}px`/, + ); + assert.match( + writer, + /'--dock-presets-pinned-height',\s*`\$\{presetsHeightPx\}px`/, + ); + assert.match( + writer, + /'--dock-lower-pinned-height',\s*`\$\{Math\.ceil\(lowerPinnedHeight\)\}px`/, + ); assert.match(writer, /'--dock-pinned-stack-height', stackHeight/); - assert.match(writer, /const stackHeight =\s*pinnedCount > 1[\s\S]{0,160}?`calc\(\$\{locationHeightPx\}px \+ \$\{presetsHeightPx\}px \+ 1\.2rem\)`/); + assert.match( + writer, + /const stackHeight =\s*pinnedCount > 1[\s\S]{0,160}?`calc\(\$\{locationHeightPx\}px \+ \$\{presetsHeightPx\}px \+ 1\.2rem\)`/, + ); }); test('the inputs behind the measured constants are unchanged', () => { // 28px credit / 62px dock are measured, not derived. Guard the CSS that // determines them so a change forces a re-measure instead of a silent drift. - const creditBase = RULES.find((rule) => rule.parts.length === 1 && rule.parts[0] === '#cesium-credits'); + const creditBase = RULES.find( + (rule) => rule.parts.length === 1 && rule.parts[0] === '#cesium-credits', + ); assert.ok(creditBase, '#cesium-credits base rule is missing'); - const declOf = (rule, prop) => rule.decls.find((decl) => decl.prop === prop)?.value; - assert.equal(declOf(creditBase, 'font-size'), '10px', 'credit font-size drives its measured 28px height'); - assert.equal(declOf(creditBase, 'white-space'), 'nowrap', 'a wrapping credit is taller than the measured 28px'); - for (const prop of ['height', 'min-height', 'max-height', 'line-height', 'padding']) { - assert.equal(declOf(creditBase, prop), undefined, `#cesium-credits gained ${prop}; re-measure CREDIT_HEIGHT_PX`); + const declOf = (rule, prop) => + rule.decls.find((decl) => decl.prop === prop)?.value; + assert.equal( + declOf(creditBase, 'font-size'), + '10px', + 'credit font-size drives its measured 28px height', + ); + assert.equal( + declOf(creditBase, 'white-space'), + 'nowrap', + 'a wrapping credit is taller than the measured 28px', + ); + for (const prop of [ + 'height', + 'min-height', + 'max-height', + 'line-height', + 'padding', + ]) { + assert.equal( + declOf(creditBase, prop), + undefined, + `#cesium-credits gained ${prop}; re-measure CREDIT_HEIGHT_PX`, + ); } // Only `min-height` may floor the dock — that direction only ADDS clearance. for (const { rule, part } of ownBoxEntries()) { if (part !== '#command-dock') continue; for (const decl of rule.decls) { - assert.notEqual(decl.prop, 'height', 'a fixed dock height invalidates COMPACT_DOCK_HEIGHT_PX'); - assert.notEqual(decl.prop, 'max-height', 'a capped dock height invalidates COMPACT_DOCK_HEIGHT_PX'); + assert.notEqual( + decl.prop, + 'height', + 'a fixed dock height invalidates COMPACT_DOCK_HEIGHT_PX', + ); + assert.notEqual( + decl.prop, + 'max-height', + 'a capped dock height invalidates COMPACT_DOCK_HEIGHT_PX', + ); } } }); @@ -514,23 +729,44 @@ test('the full-width rail cannot inherit a height that overrides its floor', () // over-constrained. It is safe only because the rail's layout pass switches // to a mobile mode at the SAME breakpoint and removes both the class and the // custom property. Pin that, or the exemption above is unearned. - const rail = fs.readFileSync(path.join(ROOT, 'src', 'ui', 'rightPanelRail.js'), 'utf8'); + const rail = fs.readFileSync( + path.join(ROOT, 'src', 'ui', 'rightPanelRail.js'), + 'utf8', + ); const gate = rail.indexOf("windowRef.matchMedia('(max-width: 720px)')"); - assert.ok(gate > 0, 'the rail layout pass no longer keys off (max-width: 720px)'); - const mobileBranch = rail.slice(gate, rail.indexOf("layoutMode = 'mobile'", gate) + 40); + assert.ok( + gate > 0, + 'the rail layout pass no longer keys off (max-width: 720px)', + ); + const mobileBranch = rail.slice( + gate, + rail.indexOf("layoutMode = 'mobile'", gate) + 40, + ); assert.match(mobileBranch, /stack\.classList\.remove\('layout-focus'\)/); - assert.match(mobileBranch, /stack\.style\.removeProperty\('--right-stack-max-height'\)/); + assert.match( + mobileBranch, + /stack\.style\.removeProperty\('--right-stack-max-height'\)/, + ); }); test('right rail measurement cannot persist into a painted attribution layout', () => { - const rail = fs.readFileSync(path.join(ROOT, 'src', 'ui', 'rightPanelRail.js'), 'utf8'); + const rail = fs.readFileSync( + path.join(ROOT, 'src', 'ui', 'rightPanelRail.js'), + 'utf8', + ); const start = rail.indexOf("stack.setAttribute('data-rail-measuring', '')"); - const end = rail.indexOf("stack.removeAttribute('data-rail-measuring')", start); + const end = rail.indexOf( + "stack.removeAttribute('data-rail-measuring')", + start, + ); assert.ok(start > rail.indexOf("layoutMode = 'mobile'")); assert.ok(end > start); const measurement = rail.slice(start, end); assert.match(measurement, /try \{[\s\S]*\} finally \{/); - assert.doesNotMatch(measurement, /\b(?:await|return|yield)\b|requestAnimationFrame|setTimeout/); + assert.doesNotMatch( + measurement, + /\b(?:await|return|yield)\b|requestAnimationFrame|setTimeout/, + ); }); // ── Clearance ─────────────────────────────────────────────────────────────── @@ -545,15 +781,22 @@ test('every open dock tray clears the required credit at every modelled viewport for (const scenario of TRAY_SCENARIOS) { for (const width of WIDTHS.filter((w) => w <= 900)) { for (const height of HEIGHTS) { - const clearance = trayBottomPx(scenario, width, height) - creditTopPx(width, height); + const clearance = + trayBottomPx(scenario, width, height) - creditTopPx(width, height); if (clearance < MIN_CLEARANCE_PX) { - failures.push(`${scenario.name} @ ${width}x${height} lift ${lift}: ${clearance.toFixed(1)}px`); + failures.push( + `${scenario.name} @ ${width}x${height} lift ${lift}: ${clearance.toFixed(1)}px`, + ); } } } } }); - assert.deepEqual(failures, [], `a dock tray re-enters the credit band:\n ${failures.join('\n ')}\n`); + assert.deepEqual( + failures, + [], + `a dock tray re-enters the credit band:\n ${failures.join('\n ')}\n`, + ); }); test('a pinned tray still stacks above its sibling at narrow widths', () => { @@ -580,33 +823,100 @@ test('the full-width context rail clears the required credit at every modelled v if (decl.prop === 'bottom') anchors.push({ rule, decl }); } } - assert.equal(anchors.length, 1, 'the rail has exactly one bottom anchor to reason about'); - assert.equal(parseMediaCondition(anchors[0].rule.media[0]), 720, 'the rail only goes full-width below 720px'); + assert.equal( + anchors.length, + 1, + 'the rail has exactly one bottom anchor to reason about', + ); + assert.equal( + parseMediaCondition(anchors[0].rule.media[0]), + 720, + 'the rail only goes full-width below 720px', + ); const failures = []; for (const width of WIDTHS.filter((w) => w <= 720)) { // `bottom` only governs the floor while the box is not height-capped: // top + bottom + a resolved height is over-constrained and drops `bottom`. assert.equal( - resolve(['#right-context-rail'], 'max-height', width, 'context rail').decl.value, + resolve(['#right-context-rail'], 'max-height', width, 'context rail').decl + .value, 'none', `at ${width}px the rail is height-capped, so its bottom anchor no longer decides its floor`, ); eachLift((lift) => { for (const height of HEIGHTS) { - const rail = resolve(['#right-context-rail'], 'bottom', width, 'context rail'); - const clearance = toPx(rail.decl.value, height, 'rail bottom') - creditTopPx(width, height); - if (clearance < MIN_CLEARANCE_PX) failures.push(`${width}x${height} lift ${lift}: ${clearance.toFixed(1)}px`); + const rail = resolve( + ['#right-context-rail'], + 'bottom', + width, + 'context rail', + ); + const clearance = + toPx(rail.decl.value, height, 'rail bottom') - + creditTopPx(width, height); + if (clearance < MIN_CLEARANCE_PX) + failures.push( + `${width}x${height} lift ${lift}: ${clearance.toFixed(1)}px`, + ); } }); } - assert.deepEqual(failures, [], `context rail re-enters the credit band at ${failures.join(', ')}`); + assert.deepEqual( + failures, + [], + `context rail re-enters the credit band at ${failures.join(', ')}`, + ); +}); + +test('expanded Context and the credit row never overlap', () => { + const docked = RULES.filter((rule) => rule.parts.includes(DOCKED_RAIL)); + assert.equal( + docked.length, + 1, + 'expanded Context has exactly one rule for its column', + ); + assert.deepEqual( + docked[0].media, + [], + 'the expanded column applies at every width', + ); + const decl = (prop) => docked[0].decls.find((d) => d.prop === prop)?.value; + assert.equal(decl('right'), '0'); + assert.equal(decl('width'), 'var(--context-dock-width)'); + // The credit row starts under 3rem from the left and may run to its + // max-width: with 3rem and the column's width taken off, it ends short of + // the column. + for (const base of [CREDIT_SELECTORS[1], MINIMAL_HUD_CREDIT]) { + const selector = base.replace('body:not(', 'body.context-docked:not('); + assert.ok(compareSpecificity(specificity(selector), specificity(base)) > 0); + for (const width of WIDTHS) { + const left = resolve([base], 'left', width, 'credit').decl.value; + const rem = /^(\d*\.?\d+)rem$/.exec(left); + assert.ok( + rem && Number(rem[1]) < 3, + `at ${width}px the credit starts at ${left}`, + ); + assert.equal( + resolve([base, selector], 'max-width', width, 'docked credit').decl + .value, + 'calc(100vw - 3rem - var(--context-dock-width))', + `at ${width}px the credit row can run under expanded Context`, + ); + } + } }); test('the dock anchor changes at 720px — the 2vh cancellation is band-limited', () => { const lift = 'var(--world-timeline-lift, 0px)'; - assert.equal(resolve(['#command-dock'], 'bottom', 800, 'dock').decl.value, `calc(2vh + ${lift})`); - assert.equal(resolve(['#command-dock'], 'bottom', 720, 'dock').decl.value, `calc(8px + ${lift})`); + assert.equal( + resolve(['#command-dock'], 'bottom', 800, 'dock').decl.value, + `calc(2vh + ${lift})`, + ); + assert.equal( + resolve(['#command-dock'], 'bottom', 720, 'dock').decl.value, + `calc(8px + ${lift})`, + ); assert.equal( resolve(CREDIT_SELECTORS, 'bottom', 720, 'credit').decl.value, `calc(2vh + 5rem + ${lift})`, @@ -617,10 +927,16 @@ test('the dock anchor changes at 720px — the 2vh cancellation is band-limited' test('the minimal-HUD credit variant tracks the ordinary one', () => { // It is MORE specific, so if the two ever diverge the model reads the wrong // anchor while the browser paints the other. - assert.ok(compareSpecificity(specificity(MINIMAL_HUD_CREDIT), specificity(CREDIT_SELECTORS[1])) > 0); + assert.ok( + compareSpecificity( + specificity(MINIMAL_HUD_CREDIT), + specificity(CREDIT_SELECTORS[1]), + ) > 0, + ); for (const width of WIDTHS) { assert.equal( - resolve([MINIMAL_HUD_CREDIT], 'bottom', width, 'minimal-HUD credit').decl.value, + resolve([MINIMAL_HUD_CREDIT], 'bottom', width, 'minimal-HUD credit').decl + .value, resolve(CREDIT_SELECTORS, 'bottom', width, 'credit').decl.value, `the minimal-HUD credit anchor diverges at ${width}px`, ); @@ -628,25 +944,81 @@ test('the minimal-HUD credit variant tracks the ordinary one', () => { }); test('the tray only spans the credit corner at the widths the model covers', () => { - const widened = RULES.filter((rule) => rule.parts.includes('#command-dock .dock-popover-content') - && rule.decls.some((decl) => decl.prop === 'width' && decl.value.includes('--dock-popover-mobile-width'))); + const widened = RULES.filter( + (rule) => + rule.parts.includes('#command-dock .dock-popover-content') && + rule.decls.some( + (decl) => + decl.prop === 'width' && + decl.value.includes('--dock-popover-mobile-width'), + ), + ); assert.equal(widened.length, 1); assert.equal(parseMediaCondition(widened[0].media[0]), 900); }); test('the credit line is never suppressed to make room', () => { - const creditBlocks = [...css.matchAll(/#cesium-credits[^{]*\{([^}]*)\}/g)].map((m) => m[1]); + const creditBlocks = [ + ...css.matchAll(/#cesium-credits[^{]*\{([^}]*)\}/g), + ].map((m) => m[1]); assert.ok(creditBlocks.length > 0); for (const block of creditBlocks) { - assert.doesNotMatch(block, /display\s*:\s*none/, 'the credit must never be display:none'); - assert.doesNotMatch(block, /visibility\s*:\s*hidden/, 'the credit must never be hidden'); - assert.doesNotMatch(block, /opacity\s*:\s*0(\D|$)/, 'the credit must never be faded out'); + assert.doesNotMatch( + block, + /display\s*:\s*none/, + 'the credit must never be display:none', + ); + assert.doesNotMatch( + block, + /visibility\s*:\s*hidden/, + 'the credit must never be hidden', + ); + assert.doesNotMatch( + block, + /opacity\s*:\s*0(\D|$)/, + 'the credit must never be faded out', + ); } - assert.match(css, /body\.ui-clean-view #cesium-credits,\s*\n\s*body\.recording-mode #cesium-credits \{[^}]*bottom: 36px;/); + assert.match( + css, + /body\.ui-clean-view #cesium-credits,\s*\n\s*body\.recording-mode #cesium-credits \{[^}]*bottom: 36px;/, + ); }); - test('OSM-derived layers never force the desktop credit row into a stack', () => { assert.doesNotMatch(css, /body:has\([^)]*alpr-cameras[^}]*#cesium-credits/); - assert.doesNotMatch(css, /#cesium-credits\s+\.cesium-credit-expand-link\s*\{[^}]*display:\s*block/); + assert.doesNotMatch( + css, + /#cesium-credits\s+\.cesium-credit-expand-link\s*\{[^}]*display:\s*block/, + ); +}); + +test('expanded Context keeps the credits beside it right to left and with the minimal HUD', () => { + const css = fs + .readFileSync( + path.join(ROOT, 'src', 'ui', 'styles', 'context-dock.css'), + 'utf8', + ) + .replace(/\/\*[\s\S]*?\*\//g, '') + .replace(/\s+/g, ' '); + const rule = (selectorPart, decl) => + new RegExp( + `${selectorPart}[^{}]*:is\\(#cesium-credits, #gev-credits\\) \\{[^}]*${decl}`, + ).test(css); + // Right to left the column docks to the left edge, where the credits start. + assert.ok( + rule( + "html\\[dir='rtl'\\] body\\.context-docked", + 'left: calc\\(36px \\+ var\\(--context-dock-width\\)\\)', + ), + 'right to left, the credits start past the expanded column', + ); + // The minimal HUD puts the credits bottom right, where the column docks. + assert.ok( + rule( + "^.*body\\.context-docked:not\\(\\.ui-clean-view\\):not\\(\\.recording-mode\\):has\\( #intel-hud\\[data-variant='minimal'\\]\\.active \\)", + 'right: calc\\(36px \\+ var\\(--context-dock-width\\)\\)', + ), + 'with the minimal HUD, the credits end before the expanded column', + ); }); diff --git a/src/data/entityContext.js b/src/data/entityContext.js new file mode 100644 index 000000000..dd38908e9 --- /dev/null +++ b/src/data/entityContext.js @@ -0,0 +1,1615 @@ +import { getContextStore } from './contextStore.js'; +import { msg } from '../i18n/marker.js'; +import { AIRCRAFT_CLASS_LABELS } from './aircraftClass.js'; +import { aircraftEmergency } from './aircraftEmergency.js'; + +/** + * One way to read any thing on the map, whichever layer holds it. + * + * Layers already list their loaded items through `getAnalystRecords()` (the + * records voice and the analyst answer from) and identify a clicked item + * through `resolvePickedContext()`. This module joins the two: it finds the + * record behind an identity, turns it into a card (title, kind, facts), lists + * the nearest items of the same kind and of other layers, and searches every + * enabled layer by name for the omnibar. + * + * It reads only; nothing here moves the camera or changes a layer. + */ + +/** + * How a layer's items are named and drawn, by layer id. `headline` names the + * fields that lead a card as its big figures, in order; `name` is what an + * item without a name of its own goes by. `kind` is also the English the card + * shows, through t(), for what the item is. + */ +const AIRCRAFT = { + kind: msg('aircraft'), + icon: 'flight', + moving: true, + headline: ['altitudeM', 'speedMps', 'heading'], +}; +const KINDS = Object.freeze({ + flights: AIRCRAFT, + military: AIRCRAFT, + 'local-adsb': AIRCRAFT, + 'ais-live-vessels': { + kind: msg('vessel'), + icon: 'directions_boat', + moving: true, + headline: ['speedKts', 'courseDeg', 'navStatus'], + }, + satellites: { + kind: msg('satellite'), + icon: 'satellite_alt', + moving: true, + headline: ['altitudeM', 'speedMps'], + }, + 'rocket-launches': { kind: msg('launch'), icon: 'rocket_launch' }, + 'local-firms': { + kind: msg('fire'), + icon: 'local_fire_department', + headline: ['frp', 'confidence'], + name: msg('Fire detection'), + }, + 'fire-perimeters': { + kind: msg('fire perimeter'), + icon: 'local_fire_department', + headline: ['acres', 'containedPct'], + }, + earthquakes: { + kind: msg('earthquake'), + icon: 'earthquake', + headline: ['magnitude', 'depthKm'], + }, + 'weather-cyclones': { + kind: msg('storm'), + icon: 'cyclone', + headline: ['windKt', 'pressureHpa'], + }, + 'air-quality': { + kind: msg('air quality station'), + icon: 'air', + headline: ['value', 'band'], + }, + 'military-installations': { kind: msg('installation'), icon: 'factory' }, + 'local-dams': { kind: msg('dam'), icon: 'factory', headline: ['capacity'] }, + 'local-datacenters': { + kind: msg('data centre'), + icon: 'factory', + headline: ['capacity'], + }, + 'osm-places': { kind: msg('place'), icon: 'location_on' }, + transit: { + kind: msg('vehicle'), + icon: 'train', + moving: true, + headline: ['speedMps', 'courseDeg'], + }, + bikeshare: { + kind: msg('bike station'), + icon: 'pedal_bike', + headline: ['bikesAvailable', 'docksAvailable'], + }, + 'alpr-cameras': { kind: msg('plate reader'), icon: 'videocam' }, + cctv: { kind: msg('camera'), icon: 'videocam' }, + 'drone-airspace': { + kind: msg('airspace'), + icon: 'pentagon', + headline: ['lowerAltitude', 'upperAltitude'], + }, + 'wildlife-sightings': { kind: msg('sighting'), icon: 'pets' }, +}); + +/** Fields a record may name itself by, best first. */ +const TITLE_FIELDS = [ + 'callsign', + 'name', + 'title', + 'label', + 'place', + 'registration', +]; +/** Fields that identify an item, for matching a click or a search. */ +// `key` is a layer's own key where it differs from the record's id (a +// transit vehicle is keyed by feed and vehicle, and named by its fleet number). +const KEY_FIELDS = ['icao24', 'mmsi', 'noradId', 'usgsId', 'id', 'key']; +/** + * How many records to ask a layer for when all are wanted. Layers read a + * missing or unbounded count as their own small default, so this is a number + * above any layer's size. + */ +const ALL_RECORDS = 100_000; +/** Fields searched by the omnibar, besides the key fields. */ +const SEARCH_FIELDS = [ + 'callsign', + 'name', + 'registration', + 'place', + 'operator', + 'icao24', + 'mmsi', +]; + +/** Never shown as facts: positions and identities already on the card. */ +const HIDDEN_FACTS = new Set([ + // Shown as the card's route line instead. + 'routeOrigin', + 'routeDestination', + 'routeFrom', + 'routeTo', + 'routeScheduled', + // Shown as the card's warning instead. + 'emergency', + 'emergencyKind', + 'emergencySource', + 'emergencyBroadcast', + 'tsunami', + 'warning', + 'alert', + 'advisory', + 'id', + 'lat', + 'lon', + 'latitude', + 'longitude', + 'name', + 'title', + 'label', + 'properties', + 'tags', + 'emergency', + 'emergencySource', + 'emergencyKind', + 'military', + // Repeats of what another fact already says, and feed bookkeeping. + 'vesselId', + 'typeCode', + 'group', + 'provider', + 'zone', + 'scale', + 'routeId', + 'building', + 'key', +]); + +/** Facts that lead the list when a record has them, in this order. */ +const FACT_ORDER = [ + 'callsign', + 'registration', + 'operator', + 'aircraftClass', + 'routeOrigin', + 'routeDestination', + 'altitudeM', + 'speedMps', + 'speedKts', + 'heading', + 'courseDeg', + 'squawk', + 'emergencyBroadcast', + 'shipType', + 'destination', + 'magnitude', + 'depthKm', + 'place', + 'frp', + 'confidence', + 'acres', + 'containedPct', + 'windKt', + 'pressureHpa', + 'classification', + 'value', + 'band', + 'risk', + 'bikesAvailable', + 'docksAvailable', + 'lowerAltitude', + 'upperAltitude', + 'satellite', + 'sensor', + 'noradId', + 'satelliteClass', + 'mmsi', + 'icao24', + 'capacity', + 'output', + 'river', + 'class', + 'kind', + 'originCountry', +]; + +/** Plain labels for record fields. Unlisted fields are spelled out. */ +const FACT_LABELS = Object.freeze({ + callsign: msg('Callsign'), + registration: msg('Registration'), + operator: msg('Operator'), + aircraftClass: msg('Aircraft class'), + routeOrigin: msg('From'), + routeDestination: msg('To'), + altitudeM: msg('Altitude'), + speedMps: msg('Speed'), + speedKts: msg('Speed'), + heading: msg('Heading'), + courseDeg: msg('Course'), + verticalRateMps: msg('Vertical rate'), + squawk: msg('Squawk'), + emergencyBroadcast: msg('Emergency'), + onGround: msg('On the ground'), + originCountry: msg('Country'), + lastContactAtMs: msg('Last contact'), + shipType: msg('Ship type'), + destination: msg('Destination'), + navStatus: msg('Status'), + magnitude: msg('Magnitude'), + depthKm: msg('Depth'), + timeMs: msg('Time'), + place: msg('Place'), + frp: msg('Fire power'), + confidence: msg('Confidence'), + satellite: msg('Satellite'), + sensor: msg('Sensor'), + acqTime: msg('Detected'), + acres: msg('Area'), + containedPct: msg('Contained'), + discoveredTime: msg('Discovered'), + category: msg('Type'), + windKt: msg('Wind'), + pressureHpa: msg('Pressure'), + classification: msg('Class'), + basin: msg('Basin'), + value: msg('Index'), + band: msg('Level'), + risk: msg('Health risk'), + bikesAvailable: msg('Bikes'), + docksAvailable: msg('Docks'), + lowerAltitude: msg('Floor'), + upperAltitude: msg('Ceiling'), + timesOfUse: msg('Active'), + mode: msg('Mode'), + noradId: msg('NORAD ID'), + satelliteClass: msg('Class'), + mmsi: msg('MMSI'), + icao24: msg('ICAO24'), + capacity: msg('Capacity'), + output: msg('Output'), + river: msg('River'), + class: msg('Class'), + kind: msg('Type'), + 'addr:city': msg('City'), + 'addr:state': msg('State'), + 'addr:country': msg('Country'), + 'addr:street': msg('Street'), + start_date: msg('Opened'), + height: msg('Height'), + 'plant:source': msg('Source'), + 'plant:output:electricity': msg('Output'), + 'generator:source': msg('Source'), + 'capacity:it_load': msg('IT load'), + waterway: msg('Waterway'), + military: msg('Military'), + landuse: msg('Land use'), + power: msg('Power'), + telecom: msg('Telecom'), +}); + +/** OSM bookkeeping tags that say nothing about the place itself. */ +const NOISE_TAG = + /^(name:|alt_name|old_name|official_name|short_name|osm_|source|note|fixme|check_date|ref:|wikimedia|wikipedia|wikidata|website|url|image|layer$|area$|type$|id$|@)|:wikidata$|:wikipedia$/; + +const MAX_FACTS = 8; +const EARTH_RADIUS_KM = 6371; + +const text = (value) => { + if (value === null || value === undefined) return ''; + if (typeof value === 'object') return ''; + const shown = String(value).trim(); + return shown === 'undefined' || shown === 'null' ? '' : shown; +}; + +const finite = (value) => + value === null || value === undefined || value === '' + ? null + : Number.isFinite(Number(value)) + ? Number(value) + : null; + +/** What a layer's items are, and the glyph that stands for them. */ +export function entityKind(layerId) { + return KINDS[layerId] || { kind: msg('feature'), icon: 'location_on' }; +} + +/** Latitude and longitude of a record, whichever names it uses. */ +export function recordPosition(record) { + const lat = finite(record?.lat ?? record?.latitude); + const lon = finite(record?.lon ?? record?.longitude); + return lat === null || lon === null ? null : { lat, lon }; +} + +/** The name a person would use for a record. */ +export function recordTitle(record) { + for (const field of TITLE_FIELDS) { + const value = text(record?.[field]); + if (value) return value; + } + // An unnamed site goes by its operator before a bare database number. + const id = text(record?.id); + const operator = text(record?.operator); + if (operator && (!id || /^\d+$/.test(id))) return operator; + return id; +} + +/** A key that stays the same for one item across feed refreshes. */ +export function recordKey(layerId, record) { + for (const field of KEY_FIELDS) { + const value = text(record?.[field]); + if (value) return `${layerId}:${value}`; + } + const at = recordPosition(record); + return at ? `${layerId}:${at.lat.toFixed(4)},${at.lon.toFixed(4)}` : ''; +} + +/** Great-circle distance in kilometres. */ +export function distanceKm(a, b) { + const rad = Math.PI / 180; + const dLat = (b.lat - a.lat) * rad; + const dLon = (b.lon - a.lon) * rad; + const h = + Math.sin(dLat / 2) ** 2 + + Math.cos(a.lat * rad) * Math.cos(b.lat * rad) * Math.sin(dLon / 2) ** 2; + return 2 * EARTH_RADIUS_KM * Math.asin(Math.min(1, Math.sqrt(h))); +} + +/** Spell out a field name: `originCountry` → `Origin country`. */ +function spellOut(field) { + const words = String(field) + .replace(/[_:]+/g, ' ') + .replace(/([a-z0-9])([A-Z])/g, '$1 $2') + .toLowerCase() + .trim(); + return words ? words[0].toUpperCase() + words.slice(1) : ''; +} + +const isEpochMs = (value) => + Number.isFinite(value) && value > 1e11 && value < 1e13; + +/** + * A fact's value as shown, or '' to leave it out. Units follow the field + * name's suffix, the convention the layers' records already use. + * @param {string} field + * @param {*} value + * @param {object} [options] + * @param {number} [options.nowMs] + * @returns {{value: string, words?: object, age?: number}|null} `value` is + * the English; `words` (see words()) is what the UI shows through t(). + */ +/** Codes the feeds use, in words. */ +const CODE_WORDS = Object.freeze({ + motion: { + moving: msg('Moving'), + stopped: msg('Stopped'), + waiting: msg('Waiting for update'), + 'no-fix': msg('No recent fix'), + }, + // GTFS-RT vehicle states, as the operator last reported them. + status: { + IN_TRANSIT_TO: msg('Heading to next stop'), + INCOMING_AT: msg('Arriving at a stop'), + STOPPED_AT: msg('Stopped at a stop'), + }, + occupancy: { + EMPTY: msg('Empty'), + MANY_SEATS_AVAILABLE: msg('Many seats free'), + FEW_SEATS_AVAILABLE: msg('Few seats free'), + STANDING_ROOM_ONLY: msg('Standing room only'), + CRUSHED_STANDING_ROOM_ONLY: msg('Crowded'), + FULL: msg('Full'), + NOT_ACCEPTING_PASSENGERS: msg('Not taking passengers'), + }, + classification: { + TD: msg('Tropical depression'), + TS: msg('Tropical storm'), + HU: msg('Hurricane'), + MH: msg('Major hurricane'), + TY: msg('Typhoon'), + STY: msg('Super typhoon'), + TC: msg('Tropical cyclone'), + SD: msg('Subtropical depression'), + SS: msg('Subtropical storm'), + PTC: msg('Post-tropical cyclone'), + }, + category: { WF: msg('Wildfire'), RX: msg('Prescribed burn') }, + basin: { + AL: msg('Atlantic'), + EP: msg('Eastern Pacific'), + CP: msg('Central Pacific'), + WP: msg('Western Pacific'), + IO: msg('Indian Ocean'), + SH: msg('Southern Hemisphere'), + }, + // Transit modes, as plainWord would spell the feed's codes. + mode: { + bus: msg('Bus'), + trolleybus: msg('Trolleybus'), + tram: msg('Tram'), + cable_tram: msg('Cable tram'), + subway: msg('Subway'), + monorail: msg('Monorail'), + rail: msg('Rail'), + funicular: msg('Funicular'), + aerial_lift: msg('Aerial lift'), + ferry: msg('Ferry'), + unknown: msg('Unknown'), + }, + aircraftClass: AIRCRAFT_CLASS_LABELS, +}); +/** + * A feed code in English words (`classification` `HU` → `Hurricane`), for the + * UI to show through t(); '' when the code has none. + */ +export function codeWord(field, code) { + return CODE_WORDS[field]?.[text(code)] || ''; +} +/** Code words whose English means something else elsewhere in the catalog. */ +const CODE_CONTEXTS = Object.freeze({ 'motion:stopped': 'vehicle motion' }); + +/** + * Words for the UI to show through t(): `{text, values?, context?, fixed?}` + * is English with `{placeholders}` (numbers in `values` are formatted for the + * language, with `fixed` decimals when given); `{date}` is a moment shown as + * a date. Each fact, insight and warning that has them keeps its English in + * `value` too, for search, matching and tests. + */ +function words(text, values, { context, fixed } = {}) { + const out = { text }; + if (values) out.values = values; + if (context) out.context = context; + if (fixed !== undefined) out.fixed = fixed; + return out; +} +const said = (value, text, values, options) => ({ + value, + words: words(text, values, options), +}); +/** A number rounded to at most `digits` decimals, as `round` shows it. */ +const roundTo = (n, digits = 0) => Number(n.toFixed(digits)); + +/** A feed's bare lowercase word as people write it: `data_center` → `Data center`. */ +function plainWord(shown) { + if (!/^[a-z][a-z_]*$/.test(shown)) return shown; + const words = shown.replace(/_/g, ' '); + return words[0].toUpperCase() + words.slice(1); +} + +/** An AIS ship type number as the kind of vessel it stands for. */ +function shipTypeName(code) { + const n = Number(code); + if (!Number.isInteger(n) || n < 1 || n > 99) return ''; + if (n === 30) return msg('Fishing'); + if (n === 31 || n === 32 || n === 52) return msg('Tug'); + if (n === 35) return msg('Military'); + if (n === 36) return msg('Sailing'); + if (n === 37) return msg('Pleasure craft'); + if (n === 50) return msg('Pilot vessel'); + if (n === 51) return msg('Search and rescue'); + if (n === 55) return msg('Law enforcement'); + if (n >= 40 && n <= 49) return msg('High-speed craft'); + if (n >= 60 && n <= 69) return msg('Passenger'); + if (n >= 70 && n <= 79) return msg('Cargo'); + if (n >= 80 && n <= 89) return msg('Tanker'); + return msg('Other'); +} + +export function formatFact( + field, + value, + { nowMs = Date.now(), kind = '' } = {}, +) { + if (field === 'shipType' && shipTypeName(value)) { + const name = shipTypeName(value); + return said(name, name); + } + if (value === true) return said('Yes', msg('Yes')); + if (value === false || value === null || value === undefined) return null; + const number = typeof value === 'number' ? value : null; + if (number !== null && !Number.isFinite(number)) return null; + const round = (n, digits = 0) => + n.toLocaleString('en-US', { maximumFractionDigits: digits }); + // A figure with its unit: English for the value, words for the UI. + const figure = (n, digits, text, english) => + said(english.replace('{n}', round(n, digits)), text, { + n: roundTo(n, digits), + }); + if (number !== null) { + if ( + /AtMs$|^timeMs$|^acqTime$|^observedMs$|^updatedTime$/.test(field) && + isEpochMs(number) + ) + return { value: '', age: Math.max(0, nowMs - number) }; + // Any other moment reads as a date. + if (/(Time|Ms|At)$/.test(field) && isEpochMs(number)) + return { + value: new Date(number).toLocaleDateString('en-GB', { + day: 'numeric', + month: 'short', + year: 'numeric', + timeZone: 'UTC', + }), + words: { date: number }, + }; + // Aviation altitudes read in feet; orbits in kilometres. + if (field === 'altitudeM') + return number >= 100_000 + ? figure(number / 1000, 0, msg('{n} km'), '{n} km') + : figure(number * 3.28084, 0, msg('{n} ft'), '{n} ft'); + // Orbital speeds read in km/s, road and rail in km/h, the rest in knots. + if (field === 'speedMps' && number >= 2000) + return figure(number / 1000, 2, msg('{n} km/s'), '{n} km/s'); + if (field === 'speedMps' && kind === 'vehicle') + return figure(number * 3.6, 0, msg('{n} km/h'), '{n} km/h'); + if (field === 'speedMps') + return figure(number * 1.94384, 0, msg('{n} kt'), '{n} kt'); + if (field === 'speedKts') return figure(number, 1, msg('{n} kt'), '{n} kt'); + if (field === 'verticalRateMps') + return figure(number * 196.85, 0, msg('{n} ft/min'), '{n} ft/min'); + if (/^(heading|courseDeg)$/.test(field)) + return figure(number, 0, msg('{n}°'), '{n}°'); + if (field === 'depthKm') return figure(number, 1, msg('{n} km'), '{n} km'); + if (field === 'magnitude') return figure(number, 1, msg('M {n}'), 'M {n}'); + if (field === 'frp') return figure(number, 1, msg('{n} MW'), '{n} MW'); + if (field === 'confidence' && number <= 1) + return figure(number * 100, 0, msg('{n}%'), '{n}%'); + if (/Pct$/.test(field)) return figure(number, 0, msg('{n}%'), '{n}%'); + if (/Kt$/.test(field)) return figure(number, 0, msg('{n} kt'), '{n} kt'); + if (/Hpa$/.test(field)) return figure(number, 0, msg('{n} hPa'), '{n} hPa'); + if (field === 'acres') + return figure(number, 0, msg('{n} acres'), '{n} acres'); + if (/Km$/.test(field)) return figure(number, 1, msg('{n} km'), '{n} km'); + if (/M$/.test(field)) return figure(number, 0, msg('{n} m'), '{n} m'); + // A bare number: only its digits follow the language. + return figure(number, 2, '{n}', '{n}'); + } + const raw = text(value); + if (!raw) return null; + const coded = CODE_WORDS[field]?.[raw]; + if (coded) + return said(coded, coded, null, { + context: CODE_CONTEXTS[`${field}:${raw}`], + }); + // Identifiers and names stay exactly as the feed gives them. + const verbatim = KEY_FIELDS.includes(field) || TITLE_FIELDS.includes(field); + const shown = verbatim ? raw : plainWord(raw); + return { value: shown.length > 80 ? `${shown.slice(0, 77)}…` : shown }; +} + +/** + * The facts a card lists for a record: known fields first, in a fixed order, + * then whatever else the record carries, up to a handful. + */ +export function recordFacts( + record, + { nowMs = Date.now(), skip = [], kind = '' } = {}, +) { + const facts = []; + let observedAgeMs = null; + const seen = new Set(skip); + const fields = [ + ...FACT_ORDER.filter((field) => field in (record || {})), + ...Object.keys(record || {}).filter((field) => !FACT_ORDER.includes(field)), + ]; + for (const field of fields) { + if (HIDDEN_FACTS.has(field) || seen.has(field)) continue; + seen.add(field); + const formatted = formatFact(field, record[field], { nowMs, kind }); + if (!formatted) continue; + if (formatted.age !== undefined) { + observedAgeMs ??= formatted.age; + continue; + } + if (facts.length < MAX_FACTS) + facts.push({ + field, + // An index goes by the scale it is on (AQHI, AQI). + label: + (field === 'value' && text(record.scale)) || + FACT_LABELS[field] || + spellOut(field), + value: formatted.value, + ...(formatted.words ? { words: formatted.words } : {}), + }); + } + return { facts, observedAgeMs }; +} + +/** Facts from a context-store record's properties (GeoJSON / OSM tags). */ +function propertyFacts(properties) { + const flat = { + ...(properties || {}), + ...(properties?.tags && typeof properties.tags === 'object' + ? properties.tags + : {}), + }; + const keep = {}; + for (const [field, value] of Object.entries(flat)) { + if (NOISE_TAG.test(field)) continue; + if (text(value)) keep[field] = value; + } + return recordFacts(keep); +} + +/** A reference link a record carries (Wikipedia, Wikidata or a website). */ +function recordLinks(record, properties) { + const flat = { + ...(properties || {}), + ...(properties?.tags && typeof properties.tags === 'object' + ? properties.tags + : {}), + ...(record || {}), + }; + const links = []; + const wikipedia = text(flat.wikipedia); + if (wikipedia) { + const [lang, ...title] = wikipedia.includes(':') + ? wikipedia.split(':') + : ['en', wikipedia]; + // The language part becomes the link's host, so only a language code is + // let through. + if (/^[a-z]{2,3}(-[a-z0-9]+)*$/.test(lang)) + links.push({ + kind: 'wikipedia', + label: msg('Wikipedia'), + href: `https://${lang}.wikipedia.org/wiki/${encodeURIComponent(title.join(':').replace(/ /g, '_'))}`, + }); + } + const wikidata = text(flat.wikidata); + if (/^Q\d+$/.test(wikidata)) + links.push({ + kind: 'wikidata', + label: msg('Wikidata'), + href: `https://www.wikidata.org/wiki/${wikidata}`, + }); + const website = text(flat.website); + if (/^https?:\/\//.test(website)) + links.push({ kind: 'website', label: msg('Website'), href: website }); + return links; +} + +/** Enabled layers, as the data manager lists them. */ +function enabledLayers(dataManager) { + try { + return (dataManager?.getAll?.() || []).filter((layer) => layer.enabled); + } catch { + return []; + } +} + +/** + * The items a layer has loaded, with a usable position. Empty while the layer + * is off or keeps no list. + */ +export function layerRecords(dataManager, layerId, maxCount = ALL_RECORDS) { + if (dataManager?.isEnabled && !dataManager.isEnabled(layerId)) return []; + let records = []; + try { + records = + dataManager?.layers + ?.get?.(layerId) + ?.module?.getAnalystRecords?.(maxCount) || []; + } catch { + records = []; + } + return records.filter((record) => recordPosition(record)); +} + +function layerName(dataManager, layerId) { + const layer = dataManager?.layers?.get?.(layerId); + return text(layer?.name) || text(layer?.module?.name) || layerId; +} + +const sameText = (a, b) => + Boolean(a) && Boolean(b) && a.toLowerCase() === b.toLowerCase(); + +/** + * The layer record behind an identity from a click, a search or the store: + * matched by key, then by name, then as the nearest item to its position. + * @param {object} dataManager + * @param {{layerId: string, id?: string, label?: string, lat?: number|null, lon?: number|null}} identity + * @returns {object|null} + */ +export function findRecord(dataManager, identity) { + const { layerId } = identity || {}; + if (!layerId) return null; + const records = layerRecords(dataManager, layerId); + if (!records.length) return null; + const id = text(identity.id); + const bare = id.startsWith(`${layerId}:`) ? id.slice(layerId.length + 1) : id; + const at = + finite(identity.lat) !== null && finite(identity.lon) !== null + ? { lat: Number(identity.lat), lon: Number(identity.lon) } + : null; + const nearest = (pool) => { + let best = null; + let bestKm = Infinity; + for (const record of pool) { + const km = distanceKm(at, recordPosition(record)); + if (km < bestKm) { + best = record; + bestKm = km; + } + } + return { best, bestKm }; + }; + const byKey = records.filter((record) => + KEY_FIELDS.some((field) => { + const value = text(record[field]); + return value && (sameText(value, id) || sameText(value, bare)); + }), + ); + // Sites can share a key (many are keyed by a name such as an operator's): + // of several, the one where the identity says it is. + if (byKey.length === 1 || (byKey.length && !at)) return byKey[0]; + if (byKey.length) return nearest(byKey).best; + const label = text(identity.label); + const byName = records.filter((record) => + SEARCH_FIELDS.some((field) => sameText(text(record[field]), label)), + ); + if (byName.length === 1 || (byName.length && !at)) return byName[0]; + if (!at) return null; + // A moving item is matched by its key or name above; guessing the nearest + // could name another craft. + if (!byName.length && entityKind(layerId).moving) return null; + const { best, bestKm } = nearest(byName.length ? byName : records); + // A static item a click names sits where it was drawn. + return bestKm <= 1 ? best : null; +} + +/** The context-store record for an identity, when the layer keeps one. */ +function storeRecord(identity) { + try { + const store = getContextStore(); + const direct = store.entities.get(String(identity.id)); + if (direct?.layerId === identity.layerId) return direct; + // Of several stored sites with the same name, the one at the identity's + // position; a name alone picks the first. + const at = recordPosition(identity); + let best = null; + let bestKm = Infinity; + for (const record of store.entities.values()) { + if (record?.layerId !== identity.layerId) continue; + if (sameText(text(record.properties?.mmsi), text(identity.id))) + return record; + if (!sameText(text(record.label), text(identity.label))) continue; + const where = recordPosition(record); + const km = at && where ? distanceKm(at, where) : best ? Infinity : 0; + if (km < bestKm) { + best = record; + bestKm = km; + } + } + if (best) return best; + } catch { + // No window in unit tests without a DOM. + } + return null; +} + +/** + * The card for one item. + * @param {object} dataManager + * @param {{layerId: string, id?: string, label?: string, lat?: number|null, lon?: number|null, record?: object}} identity + * @param {object} [options] + * @param {number} [options.nowMs] + * @returns {object|null} `{key, layerId, layerName, kind, icon, moving, title, lat, lon, facts, observedAgeMs, links, source}` + */ +/** What a transponder code means when it is one of the emergency codes. */ +const EMERGENCY_SQUAWKS = Object.freeze({ + 7500: msg('Hijack (squawk 7500)'), + 7600: msg('Radio failure (squawk 7600)'), + 7700: msg('Emergency (squawk 7700)'), +}); + +/** + * A record's warnings as `{value, words}`: the English and, for the ones this + * module words, what the UI shows through t(). A layer's own alert text has + * no words; it shows as the feed gives it. + */ +function warningEntries(record) { + if (!record) return []; + const found = []; + const kind = text(record.emergencyKind); + if (record.emergency === true || (kind && kind.toLowerCase() !== 'none')) { + // A known ADS-B emergency goes by its name; another word as given. + const named = kind ? aircraftEmergency({ emergency: kind })?.label : ''; + found.push( + kind + ? said(`Emergency: ${named || kind}`, msg('Emergency: {kind}'), { + kind: named ? words(named) : kind, + }) + : said('Emergency declared', msg('Emergency declared')), + ); + } + const squawk = EMERGENCY_SQUAWKS[Number(record.squawk)]; + if (squawk && !found.length) found.push(said(squawk, squawk)); + if (record.tsunami === true || Number(record.tsunami) === 1) + found.push(said('Tsunami warning issued', msg('Tsunami warning issued'))); + // `alert` is left out: feeds use it for a level (an earthquake's PAGER + // colour), not a warning to read out. + for (const field of ['warning', 'advisory']) { + const value = text(record[field]); + if (value && !found.some((entry) => entry.value === value)) + found.push({ value, words: null }); + } + return found; +} + +/** + * Warnings a record carries, most serious first: an aircraft emergency or + * emergency squawk, a tsunami flag, or a layer's own alert text. These lead + * the card, ahead of any facts. + * @param {?object} record + * @returns {string[]} In English; cards and alerts also carry their words. + */ +export function recordWarnings(record) { + return warningEntries(record).map((entry) => entry.value); +} + +/** What a routine transponder code says, for the codes with a meaning. */ +const SQUAWK_MEANINGS = Object.freeze({ + 1200: msg('VFR, no flight plan'), + 7000: msg('VFR conspicuity'), + 2000: msg('IFR, no code yet'), + 7500: msg('Hijack'), + 7600: msg('Radio failure'), + 7700: msg('Emergency'), +}); + +/** Speed of sound (m/s) at a height, from the standard atmosphere. */ +function speedOfSound(heightM) { + const kelvin = heightM < 11_000 ? 288.15 - 0.0065 * heightM : 216.65; + return 20.05 * Math.sqrt(kelvin); +} + +/** + * What can be worked out about a flight beyond its raw fields: its phase of + * flight, flight level, Mach number, what its squawk means and how fresh its + * signal is. For the callouts on the aircraft card, which show these rather + * than repeat the facts listed below them. + * @param {?object} record + * @param {{nowMs?: number}} [options] + * @returns {Array<{label: string, labelValues?: object, value: string, words?: object}>} + * `label` is English for t(), with `labelValues` filling its placeholders; + * `value` is the English and `words` what the UI shows (see words()). + */ +export function aircraftInsights(record, { nowMs = Date.now() } = {}) { + if (!record) return []; + const out = []; + const altitudeM = finite(record.altitudeM); + const climbMps = finite(record.verticalRateMps); + const speedMps = finite( + record.speedMps ?? + (finite(record.speedKts) !== null ? record.speedKts * 0.514444 : null), + ); + if (record.onGround === true) + out.push({ + label: msg('Phase'), + ...said('On the ground', msg('On the ground')), + }); + else if (climbMps !== null) { + const fpm = climbMps * 196.85; + const rate = Math.round(Math.abs(fpm) / 100) * 100; + out.push({ + label: msg('Phase'), + ...(fpm > 300 + ? said(`Climbing ${rate} ft/min`, msg('Climbing {n} ft/min'), { + n: rate, + }) + : fpm < -300 + ? said(`Descending ${rate} ft/min`, msg('Descending {n} ft/min'), { + n: rate, + }) + : said('Cruising, level', msg('Cruising, level'))), + }); + } + if (altitudeM !== null && altitudeM > 900) + out.push({ + label: msg('Flight level'), + value: `FL${String(Math.round((altitudeM * 3.28084) / 1000) * 10).padStart(3, '0')}`, + }); + if (speedMps !== null && altitudeM !== null && speedMps > 60) + out.push({ + label: msg('Mach'), + ...said( + `M ${(speedMps / speedOfSound(altitudeM)).toFixed(2)}`, + msg('M {n}'), + { n: roundTo(speedMps / speedOfSound(altitudeM), 2) }, + { fixed: 2 }, + ), + }); + const squawk = Number(record.squawk); + if (SQUAWK_MEANINGS[squawk]) + out.push({ + label: msg('Squawk {code}'), + labelValues: { code: String(record.squawk) }, + ...said(SQUAWK_MEANINGS[squawk], SQUAWK_MEANINGS[squawk]), + }); + const seen = finite(record.lastContactAtMs ?? record.timeMs); + if (seen !== null) { + const seconds = Math.max(0, Math.round((nowMs - seen) / 1000)); + out.push({ + label: msg('Signal'), + ...(seconds < 90 + ? said(`${seconds} s ago`, msg('{n} s ago'), { n: seconds }) + : said(`${Math.round(seconds / 60)} min ago`, msg('{n} min ago'), { + n: Math.round(seconds / 60), + })), + }); + } + return out; +} + +export function describeEntity( + dataManager, + identity, + { nowMs = Date.now() } = {}, +) { + if (!identity?.layerId) return null; + const { layerId } = identity; + const kind = entityKind(layerId); + const record = identity.record || findRecord(dataManager, identity); + // Sites drawn from GeoJSON keep their full tags in the context store; the + // layer's record holds only a summary of them. + const stored = + record && kind.moving + ? null + : storeRecord({ + ...identity, + label: identity.label || recordTitle(record), + }); + if (!record && !stored && !identity.label) return null; + + const at = + recordPosition(record) || + recordPosition(stored) || + recordPosition(identity); + const fromRecord = record + ? recordFacts(record, { nowMs, kind: kind.kind }) + : null; + const fromStore = stored ? propertyFacts(stored.properties) : null; + const facts = [...(fromRecord?.facts || [])]; + for (const fact of fromStore?.facts || []) { + if (facts.length >= MAX_FACTS) break; + const same = facts.some( + (known) => + known.label.toLowerCase() === fact.label.toLowerCase() || + known.value.toLowerCase() === fact.value.toLowerCase(), + ); + if (!same) facts.push(fact); + } + // An item with only a database number goes by what it is. + const ownTitle = recordTitle(record); + const title = + (kind.name && (!ownTitle || ownTitle === text(record?.id)) + ? kind.name + : ownTitle) || + text(stored?.label) || + text(stored?.properties?.name) || + text(identity.label) || + layerName(dataManager, layerId); + const key = record + ? recordKey(layerId, record) + : `${layerId}:${text(identity.id) || title}`; + const warnings = warningEntries(record); + const aircraftClass = + kind.kind === 'aircraft' ? text(record?.aircraftClass) || null : null; + return { + key, + layerId, + layerName: text(stored?.layerName) || layerName(dataManager, layerId), + kind: kind.kind, + icon: kind.icon, + moving: Boolean(kind.moving), + // The fields that lead the card as its big figures. + headline: kind.headline || [], + title, + // The kind's own name, when the item goes by it, for the UI to translate. + titleWords: kind.name && title === kind.name ? words(kind.name) : null, + lat: at?.lat ?? null, + lon: at?.lon ?? null, + altitudeM: finite(record?.altitudeM ?? identity.altitudeM), + facts: facts.filter((fact) => fact.value !== title), + warnings: warnings.map((entry) => entry.value), + // The same warnings for the UI to show: words, or null to show as given. + warningWords: warnings.map((entry) => entry.words), + // For the aircraft card's model and route line. + aircraftClass, + // Its class's English name, for the UI to translate; null when unknown. + aircraftClassName: AIRCRAFT_CLASS_LABELS[aircraftClass] || null, + insights: + kind.kind === 'aircraft' ? aircraftInsights(record, { nowMs }) : [], + operator: text(record?.operator) || null, + heading: finite(record?.heading ?? record?.course), + speedMps: finite( + record?.speedMps ?? + (finite(record?.speedKts) !== null ? record.speedKts * 0.514444 : null), + ), + route: + text(record?.routeOrigin) || text(record?.routeDestination) + ? { + from: text(record?.routeOrigin) || '—', + to: text(record?.routeDestination) || '—', + verified: true, + // Airport positions, when known, for the route globe. + fromAt: record?.routeFrom || null, + toAt: record?.routeTo || null, + } + : record?.routeScheduled + ? { + // Scheduled for the flight number but not where the plane is: + // shown as unverified, and never drawn on the globe. + from: text(record.routeScheduled.from) || '—', + to: text(record.routeScheduled.to) || '—', + verified: false, + fromAt: null, + toAt: null, + } + : null, + observedAgeMs: fromRecord?.observedAgeMs ?? null, + links: recordLinks(record, stored?.properties), + source: text(stored?.source) || null, + // What the card was built from: the layer's own record, the store's + // properties, or only the click's identity. + basis: record ? 'record' : stored ? 'store' : 'identity', + identity: { + layerId, + id: record + ? recordKey(layerId, record).slice(layerId.length + 1) + : text(identity.id), + label: title, + lat: at?.lat ?? null, + lon: at?.lon ?? null, + }, + }; +} + +/** + * What is near an item: the closest items of its own layer, and the closest + * item of each other enabled layer. + * @param {object} dataManager + * @param {{layerId: string, key: string, lat: number|null, lon: number|null}} card + * @param {object} [options] + * @param {number} [options.limit] + * @param {number} [options.radiusKm] + * @returns {{same: Array, other: Array}} + */ +export function nearbyEntities( + dataManager, + card, + { limit = 5, radiusKm = 500 } = {}, +) { + const empty = { same: [], other: [] }; + if (!card || card.lat === null || card.lon === null) return empty; + const here = { lat: card.lat, lon: card.lon }; + const row = (layerId, record, km) => ({ + key: recordKey(layerId, record), + layerId, + layerName: layerName(dataManager, layerId), + icon: entityKind(layerId).icon, + kind: entityKind(layerId).kind, + title: recordTitle(record) || layerName(dataManager, layerId), + distanceKm: km, + identity: { + layerId, + id: recordKey(layerId, record).slice(layerId.length + 1), + label: recordTitle(record), + ...recordPosition(record), + record, + }, + }); + const nearest = (layerId, count) => { + const found = []; + for (const record of layerRecords(dataManager, layerId)) { + const key = recordKey(layerId, record); + if (key === card.key) continue; + const km = distanceKm(here, recordPosition(record)); + if (km > radiusKm) continue; + found.push({ record, km }); + } + return found + .sort((a, b) => a.km - b.km) + .slice(0, count) + .map(({ record, km }) => row(layerId, record, km)); + }; + const same = nearest(card.layerId, limit); + const other = enabledLayers(dataManager) + .filter((layer) => layer.id !== card.layerId) + .map((layer) => nearest(layer.id, 1)[0]) + .filter(Boolean) + .sort((a, b) => a.distanceKm - b.distanceKm) + .slice(0, limit); + return { same, other }; +} + +/** + * What the loaded layers have within a radius of a point, in the groups every + * Context card lists: aircraft, vessels, and the closest item of each other + * enabled layer. Each group is nearest first; `count` is how many are inside + * the radius, of which `items` holds the first few. + * @param {object} dataManager + * @param {{lat: number, lon: number}} here + * @param {object} [options] + * @param {number} [options.radiusKm] + * @param {number} [options.limit] Rows per group. + * @param {string} [options.excludeKey] A record to leave out (the selected one). + * @param {string[]} [options.excludeLayers] Layers already presented by another section. + * @returns {{flights: {count: number, items: Array}, vessels: {count: number, items: Array}, other: Array}} + */ +export function nearbyByKind( + dataManager, + here, + { + radiusKm = 250, + limit = 4, + excludeKey = '', + excludeLayers = [], + query = '', + } = {}, +) { + const needle = text(query).toLowerCase(); + const groups = { + flights: { count: 0, items: [] }, + vessels: { count: 0, items: [] }, + other: [], + }; + if (!here || !Number.isFinite(here.lat) || !Number.isFinite(here.lon)) + return groups; + const found = { aircraft: [], vessel: [] }; + const other = []; + for (const layer of enabledLayers(dataManager)) { + if (excludeLayers.includes(layer.id)) continue; + const kind = entityKind(layer.id).kind; + const group = found[kind]; + let closest = null; + for (const record of layerRecords(dataManager, layer.id)) { + if (excludeKey && recordKey(layer.id, record) === excludeKey) continue; + const km = distanceKm(here, recordPosition(record)); + if (!(km <= radiusKm)) continue; + if (needle && !recordMatches(record, needle, layer.name)) continue; + if (group) group.push({ layerId: layer.id, record, km }); + // A search lists every match, not only each layer's closest item. + else if (needle) other.push({ layerId: layer.id, record, km }); + else if (!closest || km < closest.km) + closest = { layerId: layer.id, record, km }; + } + if (closest) other.push(closest); + } + const row = ({ layerId, record, km }) => ({ + key: recordKey(layerId, record), + layerId, + layerName: layerName(dataManager, layerId), + icon: entityKind(layerId).icon, + title: recordTitle(record) || layerName(dataManager, layerId), + distanceKm: km, + identity: { + layerId, + id: recordKey(layerId, record).slice(layerId.length + 1), + label: recordTitle(record), + ...recordPosition(record), + record, + }, + }); + const nearest = (rows) => ({ + count: rows.length, + items: rows + .sort((a, b) => a.km - b.km) + .slice(0, limit) + .map(row), + }); + groups.flights = nearest(found.aircraft); + groups.vessels = nearest(found.vessel); + groups.other = other + .sort((a, b) => a.km - b.km) + .slice(0, limit) + .map(row); + return groups; +} + +/** Counts of records by a label, largest first, the tail folded into "Other". */ +function tallyBy(records, labelOf, { keep = 4 } = {}) { + const counts = new Map(); + for (const record of records) { + const label = labelOf(record) || 'Unknown'; + counts.set(label, (counts.get(label) || 0) + 1); + } + const sorted = [...counts].sort((a, b) => b[1] - a[1]); + const parts = sorted + .slice(0, keep) + .map(([label, count]) => ({ label, count })); + const rest = sorted.slice(keep).reduce((sum, [, count]) => sum + count, 0); + if (rest) { + // A label that is itself "Other" takes the tail, so the name shows once. + const other = parts.find((part) => part.label === 'Other'); + if (other) other.count += rest; + else parts.push({ label: msg('Other'), count: rest }); + } + return parts.sort((a, b) => b.count - a.count); +} + +const AIRCRAFT_CLASS_NAMES = { + airliner: msg('Airliners'), + widebody: msg('Widebodies'), + bizjet: msg('Business jets'), + light: msg('Light aircraft'), + helicopter: msg('Helicopters'), + turboprop: msg('Turboprops'), + fastjet: msg('Fast jets'), + quadjet: msg('Four-engine jets'), +}; + +/** + * What a layer's items are made of, for Context: one or two ways of splitting + * them, each a list of labelled counts that add up to `total`. Aircraft split + * into civilian in the air, military in the air and on the ground, then by + * type of aircraft; vessels by type of ship; satellites by class; earthquakes + * by magnitude. Counts cover the records the layer hands out (it may cap + * them), inside `rect` when one is given. + * @param {object} dataManager + * @param {string} layerId + * @param {{rect?: ?{west: number, south: number, east: number, north: number}}} [options] + * @returns {?{total: number, splits: Array<{title: string, parts: Array<{label: string, count: number}>}>}} + * null when the layer has nothing to split or no split is known for it. + */ +export function layerBreakdown(dataManager, layerId, { rect = null } = {}) { + const kind = entityKind(layerId).kind; + if ( + !['aircraft', 'vessel', 'satellite', 'earthquake', 'vehicle'].includes(kind) + ) + return null; + let records = layerRecords(dataManager, layerId); + if (rect) { + const wraps = rect.west > rect.east; + records = records.filter((record) => { + const at = recordPosition(record); + return ( + at.lat >= rect.south && + at.lat <= rect.north && + (wraps + ? at.lon >= rect.west || at.lon <= rect.east + : at.lon >= rect.west && at.lon <= rect.east) + ); + }); + } + if (!records.length) return null; + const splits = []; + if (kind === 'aircraft') { + const ground = records.filter((record) => record.onGround === true).length; + const military = records.filter( + (record) => record.onGround !== true && record.military === true, + ).length; + splits.push({ + title: msg('Status'), + parts: [ + { + label: msg('Civilian, in the air'), + count: records.length - ground - military, + }, + { label: msg('Military, in the air'), count: military }, + { label: msg('On the ground'), count: ground }, + ].filter((part) => part.count), + }); + splits.push({ + title: msg('Type'), + parts: tallyBy( + records, + (record) => + AIRCRAFT_CLASS_NAMES[record.aircraftClass] || + plainWord(text(record.aircraftClass)), + ), + }); + } else if (kind === 'vessel') { + splits.push({ + title: msg('Type'), + parts: tallyBy(records, (record) => shipTypeName(record.shipType)), + }); + } else if (kind === 'vehicle') { + // What the display shows each vehicle doing, then what kind it is, who + // runs it, the operator's own report and crowding where the feed has it. + // Feeds of vehicle positions carry no timetable, so early or late is not + // something these records can say. + const word = (field) => (record) => CODE_WORDS[field][record[field]] || ''; + splits.push({ + title: msg('Motion'), + parts: tallyBy(records, word('motion')), + }); + splits.push({ + title: msg('Mode'), + parts: tallyBy( + records, + (record) => + CODE_WORDS.mode[record.mode] || plainWord(text(record.mode)), + ), + }); + const operators = tallyBy(records, (record) => text(record.operator)); + if (operators.length > 1) + splits.push({ title: msg('Operator'), parts: operators }); + const reported = records.filter( + (record) => CODE_WORDS.status[record.status], + ); + if (reported.length) + splits.push({ + title: msg('Last reported'), + parts: tallyBy(reported, word('status')), + }); + const crowded = records.filter( + (record) => CODE_WORDS.occupancy[record.occupancy], + ); + if (crowded.length) + splits.push({ + title: msg('Crowding'), + parts: tallyBy(crowded, word('occupancy')), + }); + } else if (kind === 'satellite') { + splits.push({ + title: msg('Class'), + parts: tallyBy(records, (record) => + plainWord(text(record.satelliteClass || record.group)), + ), + }); + } else { + const band = (record) => { + const m = finite(record.magnitude); + return m === null + ? '' + : m >= 6 + ? msg('M6 and above') + : m >= 5 + ? msg('M5 to 6') + : m >= 4 + ? msg('M4 to 5') + : msg('Below M4'); + }; + splits.push({ title: msg('Magnitude'), parts: tallyBy(records, band) }); + } + return { + total: records.length, + splits: splits.filter((split) => split.parts.length), + }; +} + +/** + * Whether a record holds the searched text in any of its text fields, or in + * its layer's name. + * @param {object} record + * @param {string} needle Lower case; '' matches everything. + * @param {string} [layerLabel] + * @returns {boolean} + */ +export function recordMatches(record, needle, layerLabel = '') { + if (!needle) return true; + if (text(layerLabel).toLowerCase().includes(needle)) return true; + for (const value of Object.values(record || {})) { + if (typeof value === 'string' && value.toLowerCase().includes(needle)) + return true; + } + return false; +} + +/** + * Items in enabled layers whose name or id starts with the typed text, best + * first. A whole-word match beats a match inside a word. + * @param {object} dataManager + * @param {string} query + * @param {object} [options] + * @param {number} [options.limit] + * @param {{lat: number, lon: number}|null} [options.near] Ties go to the closer item. + * @returns {Array} + */ +export function searchEntities( + dataManager, + query, + { limit = 4, near = null } = {}, +) { + const needle = text(query).toLowerCase(); + if (needle.length < 2) return []; + const inWord = new RegExp( + `(^|[^a-z0-9])${needle.replace(/[.*+?^${}()|[\]\\]/g, '\\$&')}`, + ); + const found = []; + for (const layer of enabledLayers(dataManager)) { + for (const record of layerRecords(dataManager, layer.id)) { + let score = 0; + for (const field of [...SEARCH_FIELDS, ...KEY_FIELDS]) { + const value = text(record[field]).toLowerCase(); + if (!value) continue; + const hit = + value === needle + ? 3 + : value.startsWith(needle) + ? 2 + : needle.length >= 3 && inWord.test(value) + ? 1 + : 0; + score = Math.max(score, hit); + } + if (!score) continue; + const at = recordPosition(record); + found.push({ + score, + km: near ? distanceKm(near, at) : 0, + key: recordKey(layer.id, record), + layerId: layer.id, + layerName: layerName(dataManager, layer.id), + icon: entityKind(layer.id).icon, + title: recordTitle(record) || layer.id, + identity: { + layerId: layer.id, + id: recordKey(layer.id, record).slice(layer.id.length + 1), + label: recordTitle(record), + ...at, + record, + }, + }); + } + } + const seen = new Set(); + return found + .sort((a, b) => b.score - a.score || a.km - b.km) + .filter((item) => !seen.has(item.key) && seen.add(item.key)) + .slice(0, limit); +} + +/** + * What the loaded layers have inside a view: for each enabled layer with + * anything in the rectangle, how many and the few closest to the view's + * centre, as rows the Context panel can open. Layers with the most in view + * come first. + * @param {object} dataManager + * @param {{west: number, south: number, east: number, north: number}} rect Degrees. + * @param {{lat: number, lon: number}} center + * @param {object} [options] + * @param {number} [options.perLayer] Closest items to list for each layer. + * @returns {Array<{layerId: string, layerName: string, icon: string, count: number, items: Array}>} + */ +export function viewSummary( + dataManager, + rect, + center, + { perLayer = 3, query = '' } = {}, +) { + if (!rect || !center) return []; + const needle = text(query).toLowerCase(); + const wraps = rect.west > rect.east; + const inside = (at) => + at && + at.lat >= rect.south && + at.lat <= rect.north && + (wraps + ? at.lon >= rect.west || at.lon <= rect.east + : at.lon >= rect.west && at.lon <= rect.east); + const groups = []; + for (const layer of enabledLayers(dataManager)) { + const found = []; + for (const record of layerRecords(dataManager, layer.id)) { + const at = recordPosition(record); + if (!inside(at)) continue; + if (needle && !recordMatches(record, needle, layer.name)) continue; + found.push({ record, km: distanceKm(center, at) }); + } + if (!found.length) continue; + found.sort((a, b) => a.km - b.km); + groups.push({ + layerId: layer.id, + layerName: layerName(dataManager, layer.id), + icon: entityKind(layer.id).icon, + count: found.length, + items: found.slice(0, perLayer).map(({ record, km }) => ({ + key: recordKey(layer.id, record), + title: recordTitle(record) || layerName(dataManager, layer.id), + distanceKm: km, + identity: { + layerId: layer.id, + id: recordKey(layer.id, record).slice(layer.id.length + 1), + label: recordTitle(record), + ...recordPosition(record), + record, + }, + })), + }); + } + return groups.sort((a, b) => b.count - a.count); +} + +/** + * A layer's items inside an area that pass a test, closest to the area's + * middle first: how many, and the first few as rows the omnibox and Context + * can open. The area is a rectangle in degrees, or a radius around a point. + * @param {object} dataManager + * @param {string} layerId + * @param {object} area + * @param {{lat: number, lon: number}} area.center + * @param {?{west: number, south: number, east: number, north: number}} [area.rect] + * @param {number} [area.radiusKm] Used when there is no rectangle. + * @param {(record: object) => boolean} [area.test] + * @param {number} [area.limit] + * @returns {{count: number, items: Array}} + */ +export function layerMatches( + dataManager, + layerId, + { center, rect = null, radiusKm = 60, test = () => true, limit = 8 }, +) { + const found = []; + const wraps = rect && rect.west > rect.east; + for (const record of layerRecords(dataManager, layerId)) { + const at = recordPosition(record); + if (!at) continue; + if (rect) { + const inLon = wraps + ? at.lon >= rect.west || at.lon <= rect.east + : at.lon >= rect.west && at.lon <= rect.east; + if (!inLon || at.lat < rect.south || at.lat > rect.north) continue; + } + const km = distanceKm(center, at); + if (!rect && km > radiusKm) continue; + if (!test(record)) continue; + found.push({ record, km }); + } + found.sort((a, b) => a.km - b.km); + return { + count: found.length, + items: found.slice(0, limit).map(({ record, km }) => ({ + key: recordKey(layerId, record), + title: recordTitle(record) || layerName(dataManager, layerId), + icon: entityKind(layerId).icon, + distanceKm: km, + identity: { + layerId, + id: recordKey(layerId, record).slice(layerId.length + 1), + label: recordTitle(record), + ...recordPosition(record), + record, + }, + })), + }; +} + +/** + * Loaded records near a point that carry a warning (an aircraft squawking an + * emergency, a quake with a tsunami flag, an advisory), nearest first. These + * are what each feed broadcasts, not confirmed incidents. + */ +export function alertsNear( + dataManager, + here, + { radiusKm = 400, limit = 4 } = {}, +) { + if (!here || !Number.isFinite(here.lat) || !Number.isFinite(here.lon)) + return []; + const found = []; + for (const layer of enabledLayers(dataManager)) { + for (const record of layerRecords(dataManager, layer.id)) { + const warnings = warningEntries(record); + if (!warnings.length) continue; + const km = distanceKm(here, recordPosition(record)); + if (!(km <= radiusKm)) continue; + found.push({ + key: recordKey(layer.id, record), + icon: entityKind(layer.id).icon, + title: recordTitle(record) || layerName(dataManager, layer.id), + text: warnings[0].value, + // What the UI shows for it: words, or null to show `text` as given. + words: warnings[0].words, + distanceKm: km, + identity: { + layerId: layer.id, + id: recordKey(layer.id, record).slice(layer.id.length + 1), + label: recordTitle(record), + ...recordPosition(record), + record, + }, + }); + } + } + return found.sort((a, b) => a.distanceKm - b.distanceKm).slice(0, limit); +} diff --git a/src/data/entityContext.test.mjs b/src/data/entityContext.test.mjs new file mode 100644 index 000000000..8a04c7294 --- /dev/null +++ b/src/data/entityContext.test.mjs @@ -0,0 +1,257 @@ +import { test } from 'node:test'; +import assert from 'node:assert/strict'; +import { + aircraftInsights, + describeEntity, + findRecord, + formatFact, + layerBreakdown, + nearbyEntities, + recordTitle, + recordWarnings, + searchEntities, + viewSummary, +} from './entityContext.js'; + +/** A data manager over fixed layer records. */ +function manager(layers) { + const map = new Map( + Object.entries(layers).map(([id, { name, records }]) => [ + id, + { id, name, enabled: true, module: { getAnalystRecords: () => records } }, + ]), + ); + return { + layers: map, + isEnabled: (id) => map.get(id)?.enabled === true, + getAll: () => [...map.values()], + }; +} + +const flights = Array.from({ length: 2500 }, (_, i) => ({ + id: `FLT${i}`, + icao24: `a${String(i).padStart(5, '0')}`, + callsign: `FLT${i}`, + lat: 34 + i * 0.001, + lon: -118, + altitudeM: 10000, +})); +const dams = [ + { id: 'Grand Coulee Dam', name: 'Grand Coulee Dam', lat: 47.957, lon: -118.981, operator: 'Bureau of Reclamation' }, + { id: '123456', name: null, lat: 47.9, lon: -118.9, operator: 'Some Utility' }, +]; +const dm = manager({ + flights: { name: 'Live Flights', records: flights }, + 'local-dams': { name: 'Dams', records: dams }, +}); + +test('a click identity finds its record by key, past the first 2000 records', () => { + const record = findRecord(dm, { layerId: 'flights', id: 'a02400', lat: 0, lon: 0 }); + assert.equal(record?.callsign, 'FLT2400'); +}); + +test('a transit click finds its vehicle by the layer key and reads its state', () => { + const buses = manager({ + transit: { + name: 'Transit', + records: [ + { + id: 'M634', + key: 'capmetro-austin:M634', + route: '801', + operator: 'CapMetro', + status: 'IN_TRANSIT_TO', + lat: 30.2, + lon: -97.7, + }, + ], + }, + }); + const card = describeEntity(buses, { + layerId: 'transit', + id: 'capmetro-austin:M634', + lat: 30.21, + lon: -97.71, + }); + assert.equal(card?.title, 'M634'); + const facts = Object.fromEntries(card.facts.map((fact) => [fact.label, fact.value])); + assert.equal(facts.Operator, 'CapMetro'); + assert.equal(facts.Status, 'Heading to next stop'); + assert.equal(facts.Key, undefined, 'the layer key is not shown'); +}); + +test('transit vehicles break down by motion, mode and reported state', () => { + const at = { lat: 30.2, lon: -97.7 }; + const buses = manager({ + transit: { + name: 'Transit', + records: [ + { id: '1', mode: 'bus', motion: 'moving', status: 'IN_TRANSIT_TO', ...at }, + { id: '2', mode: 'bus', motion: 'stopped', status: 'STOPPED_AT', ...at }, + { id: '3', mode: 'rail', motion: 'moving', occupancy: 'FULL', ...at }, + ], + }, + }); + const breakdown = layerBreakdown(buses, 'transit'); + assert.equal(breakdown.total, 3); + const split = (title) => + Object.fromEntries(breakdown.splits.find((item) => item.title === title).parts.map((part) => [part.label, part.count])); + assert.deepEqual(split('Motion'), { Moving: 2, Stopped: 1 }); + assert.deepEqual(split('Mode'), { Bus: 2, Rail: 1 }); + assert.deepEqual(split('Last reported'), { 'Heading to next stop': 1, 'Stopped at a stop': 1 }); + assert.deepEqual(split('Crowding'), { Full: 1 }); +}); + +test('a moving item never borrows a nearby craft when its key is unknown', () => { + const record = findRecord(dm, { layerId: 'flights', id: 'zzzzzz', label: 'NOPE', lat: 34.0004, lon: -118.05 }); + assert.equal(record, null); +}); + +test('an unnamed site goes by its operator, not its database number', () => { + assert.equal(recordTitle(dams[1]), 'Some Utility'); +}); + +test('a card lists facts with units and keeps the title out of them', () => { + const card = describeEntity(dm, { layerId: 'flights', id: 'a00001' }); + assert.equal(card.title, 'FLT1'); + assert.equal(card.kind, 'aircraft'); + assert.ok(card.facts.some((fact) => fact.label === 'Altitude' && fact.value === '32,808 ft')); + assert.ok(!card.facts.some((fact) => fact.value === 'FLT1')); +}); + +test('nearby lists the closest of the same kind and one of each other layer', () => { + const card = describeEntity(dm, { layerId: 'local-dams', id: 'Grand Coulee Dam' }); + const { same, other } = nearbyEntities(dm, card, { radiusKm: 2000 }); + assert.equal(same[0].title, 'Some Utility'); + assert.equal(other.length, 1); + assert.equal(other[0].layerId, 'flights'); +}); + +test('search ranks an exact name first and needs two characters', () => { + assert.deepEqual(searchEntities(dm, 'f'), []); + const [first] = searchEntities(dm, 'FLT12'); + assert.equal(first.title, 'FLT12'); + assert.equal(searchEntities(dm, 'coulee')[0]?.title, 'Grand Coulee Dam'); +}); + +test('fact formatting follows the field suffix', () => { + assert.equal(formatFact('speedMps', 100).value, '194 kt'); + // Orbital speeds read in km/s, road and rail in km/h. + assert.equal(formatFact('speedMps', 7670).value, '7.67 km/s'); + assert.equal(formatFact('speedMps', 10, { kind: 'vehicle' }).value, '36 km/h'); + // Units follow the field's suffix; feed codes and bare words read as words. + assert.equal(formatFact('containedPct', 96).value, '96%'); + assert.equal(formatFact('windKt', 30).value, '30 kt'); + assert.equal(formatFact('pressureHpa', 1009).value, '1,009 hPa'); + assert.equal(formatFact('classification', 'TD').value, 'Tropical depression'); + assert.equal(formatFact('telecom', 'data_center').value, 'Data center'); + assert.equal(formatFact('icao24', 'abcdef').value, 'abcdef'); + assert.equal(formatFact('shipType', 70).value, 'Cargo'); + assert.equal(formatFact('shipType', 'Tanker').value, 'Tanker'); + assert.equal(formatFact('discoveredTime', Date.UTC(2026, 5, 29)).value, '29 Jun 2026'); + assert.equal(formatFact('updatedTime', 1_700_000_000_000, { nowMs: 1_700_000_060_000 }).age, 60_000); + assert.equal(formatFact('altitudeM', 420000).value, '420 km'); + assert.equal(formatFact('confidence', 0.82).value, '82%'); + assert.equal(formatFact('onGround', false), null); + assert.equal(formatFact('lastContactAtMs', 1_700_000_000_000, { nowMs: 1_700_000_060_000 }).age, 60_000); +}); + +test('warnings lead with an emergency, then the squawk code, and stay out of the facts', () => { + assert.deepEqual(recordWarnings({ emergency: true, emergencyKind: 'medical' }), ['Emergency: medical']); + assert.deepEqual(recordWarnings({ squawk: '7600' }), ['Radio failure (squawk 7600)']); + assert.deepEqual(recordWarnings({ squawk: '1200', emergencyKind: 'none' }), []); + assert.deepEqual(recordWarnings({ tsunami: 1 }), ['Tsunami warning issued']); + const urgent = manager({ + flights: { name: 'Live Flights', records: [{ id: 'X1', icao24: 'x00001', callsign: 'X1', lat: 1, lon: 1, emergency: true, emergencyKind: 'fuel' }] }, + }); + const card = describeEntity(urgent, { layerId: 'flights', id: 'x00001' }); + assert.deepEqual(card.warnings, ['Emergency: fuel']); + assert.ok(!card.facts.some((fact) => /emergency/i.test(fact.label))); +}); + +test('the view summary counts each layer inside the view, closest to the middle first', () => { + const groups = viewSummary( + dm, + { west: -119, south: 34, east: -117, north: 34.5 }, + { lat: 34.1, lon: -118 }, + { perLayer: 2 }, + ); + assert.equal(groups.length, 1); + assert.equal(groups[0].layerId, 'flights'); + assert.equal(groups[0].count, 501); + assert.equal(groups[0].items[0].title, 'FLT100'); +}); + +test('flight insights work out phase, flight level, Mach, squawk meaning and signal age', () => { + const insights = aircraftInsights( + { altitudeM: 10668, verticalRateMps: 0, speedMps: 230, squawk: '7000', lastContactAtMs: 1_000_000 }, + { nowMs: 1_012_000 }, + ); + const value = (label) => insights.find((item) => item.label === label)?.value; + assert.equal(value('Phase'), 'Cruising, level'); + assert.equal(value('Flight level'), 'FL350'); + assert.equal(value('Mach'), 'M 0.78'); + assert.equal(value('Squawk {code}'), 'VFR conspicuity'); + assert.deepEqual(insights.find((item) => item.label === 'Squawk {code}').labelValues, { code: '7000' }); + assert.equal(value('Signal'), '12 s ago'); + assert.equal(aircraftInsights({ onGround: true })[0].value, 'On the ground'); + assert.match(aircraftInsights({ verticalRateMps: -8 })[0].value, /^Descending 1600 ft\/min$/); +}); + +test('a layer breakdown splits aircraft by status and type, inside a view when given', () => { + const craft = [ + { id: 'A', lat: 10, lon: 10, onGround: false, military: false, aircraftClass: 'airliner' }, + { id: 'B', lat: 10, lon: 11, onGround: false, military: true, aircraftClass: 'fastjet' }, + { id: 'C', lat: 10, lon: 12, onGround: true, military: true, aircraftClass: 'airliner' }, + { id: 'D', lat: 60, lon: 12, onGround: false, military: false, aircraftClass: 'airliner' }, + ]; + const data = manager({ flights: { name: 'Live Flights', records: craft }, 'local-dams': { name: 'Dams', records: dams } }); + const all = layerBreakdown(data, 'flights'); + assert.equal(all.total, 4); + assert.deepEqual(all.splits[0].parts, [ + { label: 'Civilian, in the air', count: 2 }, + { label: 'Military, in the air', count: 1 }, + { label: 'On the ground', count: 1 }, + ]); + assert.deepEqual(all.splits[1].parts, [ + { label: 'Airliners', count: 3 }, + { label: 'Fast jets', count: 1 }, + ]); + const near = layerBreakdown(data, 'flights', { rect: { west: 9, east: 13, south: 9, north: 11 } }); + assert.equal(near.total, 3); + assert.equal(layerBreakdown(data, 'local-dams'), null); +}); + +test('a moving item with an unknown key is not matched to a craft right beside it', () => { + // About 110 m from FLT0: well inside any nearest-item reach. + assert.equal(findRecord(dm, { layerId: 'flights', id: 'zzzzzz', label: 'NOPE', lat: 34.001, lon: -118 }), null); +}); + +test('sites that share a key are told apart by where the identity says they are', () => { + const sites = [ + { id: 'Amazon Web Services', name: 'Amazon Web Services', lat: -52.942, lon: -70.849 }, + { id: 'Amazon Web Services', name: 'Amazon Web Services', lat: -33.557, lon: -70.813 }, + ]; + const data = manager({ 'local-datacenters': { name: 'Datacenters', records: sites } }); + const identity = { layerId: 'local-datacenters', id: 'Amazon Web Services', label: 'Amazon Web Services', lat: -33.557, lon: -70.813 }; + assert.equal(findRecord(data, identity), sites[1]); + const card = describeEntity(data, identity); + assert.equal(card.lat, -33.557); + // The card's own identity finds the same site again, as its refresh does. + assert.equal(findRecord(data, card.identity), sites[1]); +}); + +test('a link is built only from a language code, and a level is not a warning', () => { + const site = { id: 'X', name: 'X', lat: 1, lon: 1, wikipedia: 'evil.example/a#:Y' }; + const data = manager({ 'local-dams': { name: 'Dams', records: [site] } }); + assert.deepEqual(describeEntity(data, { layerId: 'local-dams', id: 'X', lat: 1, lon: 1 }).links, []); + assert.deepEqual(recordWarnings({ alert: 'green' }), []); +}); + +test('a breakdown names "Other" once', () => { + const ships = [30, 30, 70, 70, 70, 80, 80, 60, 37, 52, 52, 90, 90, 90].map((shipType, i) => ({ id: `S${i}`, mmsi: String(i), lat: 1, lon: 1 + i * 0.01, shipType })); + const data = manager({ 'ais-live-vessels': { name: 'Vessels', records: ships } }); + const labels = layerBreakdown(data, 'ais-live-vessels').splits[0].parts.map((part) => part.label); + assert.equal(labels.filter((label) => label === 'Other').length <= 1, true); + assert.equal(new Set(labels).size, labels.length); +}); diff --git a/src/data/flights.test.mjs b/src/data/flights.test.mjs index 33a6e8aad..72fa1ea18 100644 --- a/src/data/flights.test.mjs +++ b/src/data/flights.test.mjs @@ -124,6 +124,9 @@ test('flights analyst record: full record maps every contract field', () => { lastContactAtMs: null, routeOrigin: 'AUS', routeDestination: 'LAX', + routeFrom: null, + routeTo: null, + routeScheduled: null, }); }); diff --git a/src/data/militaryAwareness.test.mjs b/src/data/militaryAwareness.test.mjs index 6a913d33f..e9ce6901e 100644 --- a/src/data/militaryAwareness.test.mjs +++ b/src/data/militaryAwareness.test.mjs @@ -1370,8 +1370,9 @@ test('a cached Context subject re-reads its label when enrichment lands after se /N123AB/, 'the rendered Context panel must show the registration without a position change', ); + // `subjectIdentity` is the subject's id for matching, never shown. assert.doesNotMatch( - JSON.stringify(repainted.view), + JSON.stringify({ ...repainted.view, subjectIdentity: undefined }), /ae1fa4/, 'the hex must be gone from the panel', ); diff --git a/src/i18n/locales/ar.json b/src/i18n/locales/ar.json index bcef38284..d68e7fca7 100644 --- a/src/i18n/locales/ar.json +++ b/src/i18n/locales/ar.json @@ -3993,7 +3993,7 @@ "Under 1 min": "أقل من دقيقة", "1 min or more": "دقيقة أو أكثر", "Shots": "لقطات", - "Layers on": "طبقات مفعّلة", + "Layers on": "الطبقات المفعّلة", "Stories": "القصص", "NEW": "جديد", "GEV Stories": "قصص GEV", @@ -4163,5 +4163,300 @@ "A visualization of the 26 August 2026 Bhote Koshi outburst flood, not an official hazard model. The historical (2021) and post-event views are Vantor WorldView imagery; the river’s path is GeoPera’s reconstruction. Witness clips link to their original posts, and their capture times are unverified.": "تصوير مرئي لفيضان Bhote Koshi الانفجاري في 26 أغسطس 2026، وليس نموذجًا رسميًا للمخاطر. المشاهد التاريخية (2021) وما بعد الحدث هي صور Vantor WorldView؛ ومسار النهر هو إعادة بناء من GeoPera. ترتبط مقاطع الشهود بمنشوراتها الأصلية، وأوقات تصويرها غير مُتحقَّق منها.", "That story is not available here": "هذه القصة غير متاحة هنا", "DRAFT": "مسودة", - "A draft, not saved as a story yet. Use SAVE TO STORIES in AUTHORING to save it.": "مسودة لم تُحفظ كقصة بعد. استخدم «حفظ في STORIES» في «الإنشاء» لحفظها." + "A draft, not saved as a story yet. Use SAVE TO STORIES in AUTHORING to save it.": "مسودة لم تُحفظ كقصة بعد. استخدم «حفظ في STORIES» في «الإنشاء» لحفظها.", + "Heading to next stop": "متجه إلى المحطة التالية", + "Arriving at a stop": "يصل إلى محطة", + "Stopped at a stop": "متوقف في محطة", + "Wikipedia": "ويكيبيديا", + "Wikidata": "ويكي بيانات", + "Website": "الموقع الإلكتروني", + "Phase": "المرحلة", + "Flight level": "مستوى الطيران", + "Mach": "ماخ", + "Squawk {code}": "رمز المرسل المجيب {code}", + "Signal": "الإشارة", + "Civilian, in the air": "مدنية، في الجو", + "Military, in the air": "عسكرية، في الجو", + "On the ground": "على الأرض", + "Motion": "الحركة", + "Operator": "المشغّل", + "Last reported": "آخر تقرير", + "Crowding": "الازدحام", + "Class": "الفئة", + "Magnitude": "القوة", + "Labels": "التسميات", + "3D aircraft": "طائرات ثلاثية الأبعاد", + "M{mag} earthquake": "زلزال بقوة {mag}", + "Earthquake": "زلزال", + "{n} kt winds": "رياح {n} عقدة", + "Wildfire": "حريق غابات", + "{n} acres": "{n} فدان", + "{n}% contained": "احتواء {n}%", + "prescribed burn": "حرق مخطط", + "{count} satellite fire hits": { + "zero": "{count} رصد حرائق بالأقمار الصناعية", + "one": "رصد واحد لحريق بالأقمار الصناعية ({count})", + "two": "رصدان لحرائق بالأقمار الصناعية ({count})", + "few": "{count} رصدات لحرائق بالأقمار الصناعية", + "many": "{count} رصدًا لحرائق بالأقمار الصناعية", + "other": "{count} رصد لحرائق بالأقمار الصناعية" + }, + "last day": "آخر يوم", + "Conditions unknown": "الأحوال غير معروفة", + "Partly cloudy": "غائم جزئيًا", + "Overcast": "غائم كليًا", + "Fog": "ضباب", + "Drizzle": "رذاذ", + "Rain": "مطر", + "Snow": "ثلج", + "Rain showers": "زخات مطر", + "Snow showers": "زخات ثلج", + "Thunderstorm": "عاصفة رعدية", + "Mixed conditions": "أحوال متقلبة", + "Search {name} and nearby": "ابحث في {name} وما حوله", + "Search what is in view": "ابحث فيما يظهر في العرض", + "Close Context search": "إغلاق البحث في السياق", + "Search in Context": "البحث في السياق", + "Close search": "إغلاق البحث", + "Shrink Context back to a panel": "تصغير السياق إلى لوحة", + "Expand Context to a full-height column": "توسيع السياق إلى عمود بكامل الارتفاع", + "Context tabs": "علامات تبويب السياق", + "Inspector": "الفاحص", + "Properties": "الخصائص", + "Level": "المستوى", + "Last {n} min": "آخر {n} د", + "Just now": "الآن", + "Since selected": "منذ التحديد", + "Altitude": "الارتفاع", + "Heading": "الاتجاه", + "Field of view": "مجال الرؤية", + "Camera frame": "إطار الكاميرا", + "Acquiring frame…": "جارٍ جلب الإطار…", + "Show a bigger view": "عرض أكبر", + "Camera view": "عرض الكاميرا", + "More info": "مزيد من المعلومات", + "{n} s ago": "قبل {n} ث", + "{n} min ago": "قبل {n} د", + "{n} h ago": "قبل {n} س", + "{n} d ago": "قبل {n} يوم", + "Out of feed · last reading": "خارج البث · آخر قراءة", + "Live · {age}": "مباشر · {age}", + "{n} m": "{n} م", + "{n} km": "{n} كم", + "updated {age}": "حُدّث {age}", + "Selected on the map": "المحدد على الخريطة", + "Close card": "إغلاق البطاقة", + "{n}% flown": "قُطع {n}%", + "to go": "متبقية", + "The scheduled route for this flight number does not match where the plane is; it may be another leg of the same flight.": "المسار المجدول لرقم هذه الرحلة لا يطابق موقع الطائرة؛ قد يكون مرحلة أخرى من الرحلة نفسها.", + "Scheduled · unverified: does not match where the plane is": "مجدول · غير مؤكد: لا يطابق موقع الطائرة", + "Nothing in this item’s details matches “{text}”.": "لا شيء في تفاصيل هذا العنصر يطابق «{text}».", + "Matching details": "التفاصيل المطابقة", + "Enter orbital view": "دخول العرض المداري", + "Enter Cockpit": "دخول القمرة", + "Fly to": "الانتقال إلى", + "Following": "تتم المتابعة", + "Follow": "متابعة", + "Ask GEV about {name}": "اسأل GEV عن {name}", + "Flights within {radius}": "الرحلات ضمن {radius}", + "No flights within {radius} from the layers that are on.": "لا رحلات ضمن {radius} من الطبقات المفعّلة.", + "Vessels within {radius}": "السفن ضمن {radius}", + "No vessels within {radius} from the layers that are on.": "لا سفن ضمن {radius} من الطبقات المفعّلة.", + "Cloud": "الغيوم", + "Visibility": "الرؤية", + "Conditions here": "الأحوال هنا", + "feels {n}°": "المحسوسة {n}°", + "Reading conditions here…": "جارٍ قراءة الأحوال هنا…", + "No weather reading here.": "لا توجد قراءة للطقس هنا.", + "Local solar time": "التوقيت الشمسي المحلي", + "Nearby radius": "نطاق القرب", + "How far out the nearby lists look": "إلى أي مدى تبحث قوائم الجوار", + "Hazards within {radius}": "المخاطر ضمن {radius}", + "Turns the layer on": "يفعّل الطبقة", + "No earthquakes, tropical storms or wildfires reported within {radius}.": "لا زلازل أو عواصف استوائية أو حرائق غابات مُبلَّغ عنها ضمن {radius}.", + "Broadcast alerts within {radius}": "التنبيهات المبثوثة ضمن {radius}", + "Also within {radius}": "أيضًا ضمن {radius}", + "Local news": "الأخبار المحلية", + "Sundial · {time} solar · sun {deg}° {dir}": "مزولة · {time} بالتوقيت الشمسي · الشمس {deg}° {dir}", + "Sundial · {time} solar · sun below the horizon": "مزولة · {time} بالتوقيت الشمسي · الشمس تحت الأفق", + "{count} things": { + "zero": "{count} عنصر", + "one": "عنصر واحد ({count})", + "two": "عنصران ({count})", + "few": "{count} عناصر", + "many": "{count} عنصرًا", + "other": "{count} عنصر" + }, + "{count} layers": { + "zero": "{count} طبقة", + "one": "طبقة واحدة ({count})", + "two": "طبقتين ({count})", + "few": "{count} طبقات", + "many": "{count} طبقة", + "other": "{count} طبقة" + }, + "{things} in view from {layers}": "{things} في العرض من {layers}", + "{n} km up": "على ارتفاع {n} كم", + "{n} m up": "على ارتفاع {n} م", + "This view": "هذا العرض", + "Day": "نهار", + "Twilight": "شفق", + "Night": "ليل", + "Daylight": "ضوء النهار", + "sun {n}°": "الشمس {n}°", + "Of {n} read, {total} loaded": "من {n} مقروءة، {total} محمّلة", + "Of all {n}": "من إجمالي {n}", + "Of {n} in view": "من {n} في العرض", + "Error": "خطأ", + "Stale": "قديم", + "In view": "في العرض", + "Globe view": "عرض الكرة الأرضية", + "Nothing selected": "لا شيء محدد", + "Worldwide now": "حول العالم الآن", + "Turn on {name}": "تفعيل {name}", + "{n} loaded": "{n} محمّلة", + "{n} in view": "{n} في العرض", + "Turn off {name}": "إيقاف {name}", + "Camera height": "ارتفاع الكاميرا", + "Nothing in view matches “{text}”.": "لا شيء في العرض يطابق «{text}».", + "Nothing from the layers that are on is in view here. Zoom out to see more.": "لا شيء من الطبقات المفعّلة في العرض هنا. صغّر العرض لرؤية المزيد.", + "No loaded layer has anything in view. Turn some on in Data Layers.": "لا توجد طبقة محمّلة بها شيء في العرض. فعّل بعضها في طبقات البيانات.", + "Places in view": "أماكن في العرض", + "Show here": "عرض هنا", + "Ask GEV what's here": "اسأل GEV عمّا هنا", + "aircraft": "طائرة", + "vessel": "سفينة", + "launch": "إطلاق", + "fire": "حريق", + "Fire detection": "رصد حريق", + "fire perimeter": "محيط حريق", + "earthquake": "زلزال", + "storm": "عاصفة", + "air quality station": "محطة جودة الهواء", + "installation": "منشأة", + "dam": "سد", + "data centre": "مركز بيانات", + "place": "مكان", + "vehicle": "مركبة", + "bike station": "محطة دراجات", + "plate reader": "قارئ لوحات", + "camera": "كاميرا", + "airspace": "مجال جوي", + "sighting": "مشاهدة", + "Callsign": "رمز النداء", + "Registration": "التسجيل", + "Aircraft class": "فئة الطائرة", + "Course": "المسار", + "Vertical rate": "معدل الصعود", + "Squawk": "رمز المرسل المجيب", + "Emergency": "طوارئ", + "Last contact": "آخر اتصال", + "Ship type": "نوع السفينة", + "Destination": "الوجهة", + "Depth": "العمق", + "Time": "الوقت", + "Place": "المكان", + "Fire power": "قدرة الحريق", + "Satellite": "القمر الصناعي", + "Sensor": "المستشعر", + "Detected": "رُصد", + "Contained": "نسبة الاحتواء", + "Discovered": "اكتُشف", + "Basin": "الحوض", + "Index": "المؤشر", + "Health risk": "الخطر الصحي", + "Bikes": "الدراجات", + "Docks": "المراسي", + "Floor": "الحد الأدنى", + "Ceiling": "الحد الأعلى", + "Active": "نشط", + "NORAD ID": "معرّف NORAD", + "MMSI": "MMSI", + "ICAO24": "ICAO24", + "Capacity": "السعة", + "Output": "الإنتاج", + "River": "النهر", + "City": "المدينة", + "State": "الولاية", + "Street": "الشارع", + "Opened": "افتُتح", + "Height": "الارتفاع", + "IT load": "حمل تقنية المعلومات", + "Waterway": "المجرى المائي", + "Military": "عسكري", + "Land use": "استخدام الأرض", + "Telecom": "الاتصالات", + "feature": "عنصر", + "Empty": "فارغة", + "Many seats free": "مقاعد كثيرة متاحة", + "Few seats free": "مقاعد قليلة متاحة", + "Standing room only": "وقوف فقط", + "Crowded": "مزدحمة", + "Not taking passengers": "لا تقبل ركابًا", + "Major hurricane": "إعصار كبير", + "Typhoon": "إعصار التيفون", + "Super typhoon": "إعصار تيفون هائل", + "Tropical cyclone": "إعصار مداري", + "Prescribed burn": "حرق مخطط", + "Atlantic": "الأطلسي", + "Eastern Pacific": "شرق المحيط الهادئ", + "Central Pacific": "وسط المحيط الهادئ", + "Western Pacific": "غرب المحيط الهادئ", + "Indian Ocean": "المحيط الهندي", + "Southern Hemisphere": "نصف الكرة الجنوبي", + "Cable tram": "ترام بالكابل", + "Aerial lift": "تلفريك", + "Fishing": "صيد", + "Tug": "قاطرة", + "Sailing": "شراعي", + "Pleasure craft": "قارب نزهة", + "Pilot vessel": "سفينة إرشاد", + "Search and rescue": "بحث وإنقاذ", + "Law enforcement": "إنفاذ القانون", + "High-speed craft": "مركب عالي السرعة", + "Passenger": "ركاب", + "Cargo": "شحن", + "Tanker": "ناقلة", + "Yes": "نعم", + "{n} ft": "{n} قدم", + "{n} km/s": "{n} كم/ث", + "{n} km/h": "{n} كم/س", + "{n} kt": "{n} عقدة", + "{n} ft/min": "{n} قدم/د", + "{n}°": "{n}°", + "M {n}": "M {n}", + "{n} MW": "{n} ميغاواط", + "{n}%": "{n}%", + "{n} hPa": "{n} hPa", + "Hijack (squawk 7500)": "اختطاف (الرمز 7500)", + "Radio failure (squawk 7600)": "عطل لاسلكي (الرمز 7600)", + "Emergency (squawk 7700)": "حالة طوارئ (الرمز 7700)", + "Emergency: {kind}": "طوارئ: {kind}", + "Emergency declared": "أُعلنت حالة طوارئ", + "Tsunami warning issued": "صدر تحذير من تسونامي", + "VFR, no flight plan": "VFR، بلا خطة طيران", + "VFR conspicuity": "رمز VFR العام", + "IFR, no code yet": "IFR، بلا رمز بعد", + "Hijack": "اختطاف", + "Climbing {n} ft/min": "يصعد {n} قدم/د", + "Descending {n} ft/min": "يهبط {n} قدم/د", + "Cruising, level": "طيران مستوٍ", + "Airliners": "طائرات ركاب", + "Widebodies": "طائرات عريضة البدن", + "Business jets": "طائرات رجال أعمال", + "Helicopters": "مروحيات", + "Turboprops": "طائرات مروحية توربينية", + "Fast jets": "طائرات نفاثة سريعة", + "Four-engine jets": "طائرات رباعية المحركات", + "M6 and above": "M6 فأكثر", + "M5 to 6": "من M5 إلى 6", + "M4 to 5": "من M4 إلى 5", + "Below M4": "أقل من M4", + "{kind} {name}": "{kind} {name}", + "place|Country": "البلد", + "altitude|Level": "ثابت", + "{h} h {m} min": "{h} س {m} د", + "{n} min": "{n} د", + "{speed} {direction}": "{speed} {direction}", + "{n} mm": "{n} مم" } diff --git a/src/i18n/locales/de.json b/src/i18n/locales/de.json index 7fa9a3fcb..d0bb1928a 100644 --- a/src/i18n/locales/de.json +++ b/src/i18n/locales/de.json @@ -3803,5 +3803,288 @@ "A visualization of the 26 August 2026 Bhote Koshi outburst flood, not an official hazard model. The historical (2021) and post-event views are Vantor WorldView imagery; the river’s path is GeoPera’s reconstruction. Witness clips link to their original posts, and their capture times are unverified.": "Eine Visualisierung der Ausbruchsflut am Bhote Koshi vom 26. August 2026, kein offizielles Gefahrenmodell. Die historischen Ansichten (2021) und die Ansichten nach dem Ereignis sind Vantor-WorldView-Bilder; der Flussverlauf ist die Rekonstruktion von GeoPera. Augenzeugenclips verlinken auf ihre ursprünglichen Beiträge, ihre Aufnahmezeiten sind nicht überprüft.", "That story is not available here": "Diese Story ist hier nicht verfügbar", "DRAFT": "ENTWURF", - "A draft, not saved as a story yet. Use SAVE TO STORIES in AUTHORING to save it.": "Ein Entwurf, noch nicht als Story gespeichert. Mit IN STORIES SPEICHERN unter SZENEN speicherst du ihn." + "A draft, not saved as a story yet. Use SAVE TO STORIES in AUTHORING to save it.": "Ein Entwurf, noch nicht als Story gespeichert. Mit IN STORIES SPEICHERN unter SZENEN speicherst du ihn.", + "Heading to next stop": "Unterwegs zur nächsten Haltestelle", + "Arriving at a stop": "Erreicht eine Haltestelle", + "Stopped at a stop": "Hält an einer Haltestelle", + "Wikipedia": "Wikipedia", + "Wikidata": "Wikidata", + "Website": "Website", + "Phase": "Flugphase", + "Flight level": "Flugfläche", + "Mach": "Mach", + "Squawk {code}": "Squawk {code}", + "Signal": "Signal", + "Civilian, in the air": "Zivil, in der Luft", + "Military, in the air": "Militär, in der Luft", + "On the ground": "Am Boden", + "Motion": "Bewegung", + "Operator": "Betreiber", + "Last reported": "Zuletzt gemeldet", + "Crowding": "Auslastung", + "Class": "Klasse", + "Magnitude": "Magnitude", + "Labels": "Beschriftungen", + "3D aircraft": "3D-Flugzeuge", + "M{mag} earthquake": "Erdbeben der Stärke {mag}", + "Earthquake": "Erdbeben", + "{n} kt winds": "Wind {n} kn", + "Wildfire": "Waldbrand", + "{n} acres": "{n} Acres", + "{n}% contained": "{n} % eingedämmt", + "prescribed burn": "kontrolliertes Abbrennen", + "{count} satellite fire hits": { + "one": "{count} Feuermeldung per Satellit", + "other": "{count} Feuermeldungen per Satellit" + }, + "last day": "letzter Tag", + "Conditions unknown": "Wetterlage unbekannt", + "Partly cloudy": "Teilweise bewölkt", + "Overcast": "Bedeckt", + "Fog": "Nebel", + "Drizzle": "Nieselregen", + "Rain": "Regen", + "Snow": "Schnee", + "Rain showers": "Regenschauer", + "Snow showers": "Schneeschauer", + "Thunderstorm": "Gewitter", + "Mixed conditions": "Wechselhaft", + "Search {name} and nearby": "{name} und Umgebung durchsuchen", + "Search what is in view": "Sichtbares durchsuchen", + "Close Context search": "Kontextsuche schließen", + "Search in Context": "Im Kontext suchen", + "Close search": "Suche schließen", + "Shrink Context back to a panel": "Kontext wieder als Bereich anzeigen", + "Expand Context to a full-height column": "Kontext als Spalte in voller Höhe anzeigen", + "Context tabs": "Kontext-Tabs", + "Inspector": "Inspektor", + "Properties": "Eigenschaften", + "Level": "Stufe", + "Last {n} min": "Letzte {n} Min.", + "Just now": "Gerade eben", + "Since selected": "Seit der Auswahl", + "Altitude": "Höhe", + "Heading": "Kurs", + "Field of view": "Sichtfeld", + "Camera frame": "Kamerabild", + "Acquiring frame…": "Bild wird geladen…", + "Show a bigger view": "Größer anzeigen", + "Camera view": "Kameraansicht", + "More info": "Mehr Infos", + "{n} s ago": "vor {n} s", + "{n} min ago": "vor {n} Min.", + "{n} h ago": "vor {n} Std.", + "{n} d ago": "vor {n} T.", + "Out of feed · last reading": "Nicht mehr im Feed · letzter Stand", + "Live · {age}": "Live · {age}", + "{n} m": "{n} m", + "{n} km": "{n} km", + "updated {age}": "aktualisiert {age}", + "Selected on the map": "Auf der Karte ausgewählt", + "Close card": "Karte schließen", + "{n}% flown": "{n} % geflogen", + "to go": "verbleibend", + "The scheduled route for this flight number does not match where the plane is; it may be another leg of the same flight.": "Die geplante Route dieser Flugnummer passt nicht zur Position des Flugzeugs; vielleicht ist es eine andere Teilstrecke desselben Flugs.", + "Scheduled · unverified: does not match where the plane is": "Geplant · unbestätigt: passt nicht zur Position des Flugzeugs", + "Nothing in this item’s details matches “{text}”.": "Nichts in den Details dieses Elements passt zu „{text}“.", + "Matching details": "Passende Details", + "Enter orbital view": "Orbitalansicht öffnen", + "Enter Cockpit": "Cockpit öffnen", + "Fly to": "Hinfliegen", + "Following": "Folgt", + "Follow": "Folgen", + "Ask GEV about {name}": "GEV zu {name} fragen", + "Flights within {radius}": "Flüge im Umkreis von {radius}", + "No flights within {radius} from the layers that are on.": "Keine Flüge im Umkreis von {radius} aus den aktiven Ebenen.", + "Vessels within {radius}": "Schiffe im Umkreis von {radius}", + "No vessels within {radius} from the layers that are on.": "Keine Schiffe im Umkreis von {radius} aus den aktiven Ebenen.", + "Cloud": "Bewölkung", + "Visibility": "Sicht", + "Conditions here": "Bedingungen hier", + "feels {n}°": "gefühlt {n}°", + "Reading conditions here…": "Bedingungen werden abgerufen…", + "No weather reading here.": "Hier keine Wetterdaten.", + "Local solar time": "Wahre Ortszeit", + "Nearby radius": "Umkreis", + "How far out the nearby lists look": "Wie weit die Umgebungslisten reichen", + "Hazards within {radius}": "Gefahren im Umkreis von {radius}", + "Turns the layer on": "Schaltet die Ebene ein", + "No earthquakes, tropical storms or wildfires reported within {radius}.": "Keine Erdbeben, Tropenstürme oder Waldbrände im Umkreis von {radius} gemeldet.", + "Broadcast alerts within {radius}": "Gesendete Warnungen im Umkreis von {radius}", + "Also within {radius}": "Ebenfalls im Umkreis von {radius}", + "Local news": "Lokale Nachrichten", + "Sundial · {time} solar · sun {deg}° {dir}": "Sonnenuhr · {time} Sonnenzeit · Sonne {deg}° {dir}", + "Sundial · {time} solar · sun below the horizon": "Sonnenuhr · {time} Sonnenzeit · Sonne unter dem Horizont", + "{count} things": { + "one": "{count} Objekt", + "other": "{count} Objekte" + }, + "{count} layers": { + "one": "{count} Ebene", + "other": "{count} Ebenen" + }, + "{things} in view from {layers}": "{things} im Blick aus {layers}", + "{n} km up": "{n} km hoch", + "{n} m up": "{n} m hoch", + "This view": "Diese Ansicht", + "Day": "Tag", + "Twilight": "Dämmerung", + "Night": "Nacht", + "Daylight": "Tageslicht", + "sun {n}°": "Sonne {n}°", + "Of {n} read, {total} loaded": "Von {n} gelesen, {total} geladen", + "Of all {n}": "Von allen {n}", + "Of {n} in view": "Von {n} im Blick", + "Error": "Fehler", + "Stale": "Veraltet", + "In view": "Im Blick", + "Globe view": "Globusansicht", + "Nothing selected": "Nichts ausgewählt", + "Worldwide now": "Weltweit jetzt", + "Turn on {name}": "{name} einschalten", + "{n} loaded": "{n} geladen", + "{n} in view": "{n} im Blick", + "Turn off {name}": "{name} ausschalten", + "Camera height": "Kamerahöhe", + "Nothing in view matches “{text}”.": "Nichts im Blick passt zu „{text}“.", + "Nothing from the layers that are on is in view here. Zoom out to see more.": "Aus den aktiven Ebenen ist hier nichts im Blick. Herauszoomen, um mehr zu sehen.", + "No loaded layer has anything in view. Turn some on in Data Layers.": "Keine geladene Ebene hat etwas im Blick. Schalte welche unter Datenebenen ein.", + "Places in view": "Orte im Blick", + "Show here": "Hier anzeigen", + "Ask GEV what's here": "GEV fragen, was hier ist", + "aircraft": "Flugzeug", + "vessel": "Schiff", + "launch": "Start", + "fire": "Feuer", + "Fire detection": "Feuererkennung", + "fire perimeter": "Brandfläche", + "earthquake": "Erdbeben", + "storm": "Sturm", + "air quality station": "Luftmessstation", + "installation": "Anlage", + "dam": "Damm", + "data centre": "Rechenzentrum", + "place": "Ort", + "vehicle": "Fahrzeug", + "bike station": "Fahrradstation", + "plate reader": "Kennzeichenleser", + "camera": "Kamera", + "airspace": "Luftraum", + "sighting": "Sichtung", + "Callsign": "Rufzeichen", + "Registration": "Kennzeichen", + "Aircraft class": "Flugzeugklasse", + "Course": "Kurs über Grund", + "Vertical rate": "Steigrate", + "Squawk": "Squawk", + "Emergency": "Notfall", + "Last contact": "Letzter Kontakt", + "Ship type": "Schiffstyp", + "Destination": "Ziel", + "Depth": "Tiefe", + "Time": "Zeit", + "Place": "Ort", + "Fire power": "Feuerleistung", + "Satellite": "Satellit", + "Sensor": "Sensor", + "Detected": "Erkannt", + "Contained": "Eingedämmt", + "Discovered": "Entdeckt", + "Basin": "Becken", + "Index": "Index", + "Health risk": "Gesundheitsrisiko", + "Bikes": "Fahrräder", + "Docks": "Stellplätze", + "Floor": "Untergrenze", + "Ceiling": "Obergrenze", + "Active": "Aktiv", + "NORAD ID": "NORAD-ID", + "MMSI": "MMSI", + "ICAO24": "ICAO24", + "Capacity": "Kapazität", + "Output": "Leistung", + "River": "Fluss", + "City": "Stadt", + "State": "Bundesstaat", + "Street": "Straße", + "Opened": "Eröffnet", + "Height": "Höhe", + "IT load": "IT-Last", + "Waterway": "Wasserweg", + "Military": "Militär", + "Land use": "Landnutzung", + "Telecom": "Telekommunikation", + "feature": "Objekt", + "Empty": "Leer", + "Many seats free": "Viele Plätze frei", + "Few seats free": "Wenige Plätze frei", + "Standing room only": "Nur Stehplätze", + "Crowded": "Überfüllt", + "Not taking passengers": "Kein Einstieg", + "Major hurricane": "Schwerer Hurrikan", + "Typhoon": "Taifun", + "Super typhoon": "Supertaifun", + "Tropical cyclone": "Tropischer Wirbelsturm", + "Prescribed burn": "Kontrolliertes Abbrennen", + "Atlantic": "Atlantik", + "Eastern Pacific": "Ostpazifik", + "Central Pacific": "Zentralpazifik", + "Western Pacific": "Westpazifik", + "Indian Ocean": "Indischer Ozean", + "Southern Hemisphere": "Südhalbkugel", + "Cable tram": "Kabelstraßenbahn", + "Aerial lift": "Seilbahn", + "Fishing": "Fischerei", + "Tug": "Schlepper", + "Sailing": "Segelschiff", + "Pleasure craft": "Sportboot", + "Pilot vessel": "Lotsenboot", + "Search and rescue": "Seenotrettung", + "Law enforcement": "Behördenschiff", + "High-speed craft": "Schnellboot", + "Passenger": "Passagierschiff", + "Cargo": "Frachter", + "Tanker": "Tanker", + "Yes": "Ja", + "{n} ft": "{n} ft", + "{n} km/s": "{n} km/s", + "{n} km/h": "{n} km/h", + "{n} kt": "{n} kn", + "{n} ft/min": "{n} ft/min", + "{n}°": "{n}°", + "M {n}": "M {n}", + "{n} MW": "{n} MW", + "{n}%": "{n} %", + "{n} hPa": "{n} hPa", + "Hijack (squawk 7500)": "Entführung (Squawk 7500)", + "Radio failure (squawk 7600)": "Funkausfall (Squawk 7600)", + "Emergency (squawk 7700)": "Notfall (Squawk 7700)", + "Emergency: {kind}": "Notfall: {kind}", + "Emergency declared": "Notfall erklärt", + "Tsunami warning issued": "Tsunamiwarnung ausgegeben", + "VFR, no flight plan": "VFR, ohne Flugplan", + "VFR conspicuity": "VFR-Standardcode", + "IFR, no code yet": "IFR, noch kein Code", + "Hijack": "Entführung", + "Climbing {n} ft/min": "Steigt mit {n} ft/min", + "Descending {n} ft/min": "Sinkt mit {n} ft/min", + "Cruising, level": "Reiseflug, gleichbleibend", + "Airliners": "Verkehrsflugzeuge", + "Widebodies": "Großraumflugzeuge", + "Business jets": "Businessjets", + "Helicopters": "Hubschrauber", + "Turboprops": "Turboprops", + "Fast jets": "Kampfjets", + "Four-engine jets": "Vierstrahlige Jets", + "M6 and above": "M6 und mehr", + "M5 to 6": "M5 bis 6", + "M4 to 5": "M4 bis 5", + "Below M4": "Unter M4", + "{kind} {name}": "{kind} {name}", + "place|Country": "Land", + "altitude|Level": "Gleichbleibend", + "{h} h {m} min": "{h} Std. {m} Min.", + "{n} min": "{n} Min.", + "{speed} {direction}": "{speed} aus {direction}", + "{n} mm": "{n} mm" } diff --git a/src/i18n/locales/es.json b/src/i18n/locales/es.json index aa039bf4f..1c9d0bf59 100644 --- a/src/i18n/locales/es.json +++ b/src/i18n/locales/es.json @@ -3893,5 +3893,291 @@ "A visualization of the 26 August 2026 Bhote Koshi outburst flood, not an official hazard model. The historical (2021) and post-event views are Vantor WorldView imagery; the river’s path is GeoPera’s reconstruction. Witness clips link to their original posts, and their capture times are unverified.": "Una visualización de la inundación por desborde del Bhote Koshi del 26 de agosto de 2026, no un modelo oficial de riesgos. Las vistas históricas (2021) y posteriores al evento son imágenes de Vantor WorldView; el recorrido del río es la reconstrucción de GeoPera. Los clips de testigos enlazan a sus publicaciones originales, y sus horas de captura no están verificadas.", "That story is not available here": "Esa historia no está disponible aquí", "DRAFT": "BORRADOR", - "A draft, not saved as a story yet. Use SAVE TO STORIES in AUTHORING to save it.": "Un borrador, aún no guardado como historia. Usa GUARDAR EN STORIES en CREACIÓN para guardarlo." + "A draft, not saved as a story yet. Use SAVE TO STORIES in AUTHORING to save it.": "Un borrador, aún no guardado como historia. Usa GUARDAR EN STORIES en CREACIÓN para guardarlo.", + "Heading to next stop": "Hacia la próxima parada", + "Arriving at a stop": "Llegando a una parada", + "Stopped at a stop": "Detenido en una parada", + "Wikipedia": "Wikipedia", + "Wikidata": "Wikidata", + "Website": "Sitio web", + "Phase": "Fase", + "Flight level": "Nivel de vuelo", + "Mach": "Mach", + "Squawk {code}": "Squawk {code}", + "Signal": "Señal", + "Civilian, in the air": "Civiles, en vuelo", + "Military, in the air": "Militares, en vuelo", + "On the ground": "En tierra", + "Motion": "Movimiento", + "Operator": "Operador", + "Last reported": "Último informe", + "Crowding": "Ocupación", + "Class": "Clase", + "Magnitude": "Magnitud", + "Labels": "Etiquetas", + "3D aircraft": "Aeronaves 3D", + "M{mag} earthquake": "Sismo de magnitud {mag}", + "Earthquake": "Sismo", + "{n} kt winds": "Vientos de {n} kt", + "Wildfire": "Incendio forestal", + "{n} acres": "{n} acres", + "{n}% contained": "{n} % contenido", + "prescribed burn": "quema prescrita", + "{count} satellite fire hits": { + "one": "{count} detección satelital de fuego", + "many": "{count} de detecciones satelitales de fuego", + "other": "{count} detecciones satelitales de fuego" + }, + "last day": "último día", + "Conditions unknown": "Condiciones desconocidas", + "Partly cloudy": "Parcialmente nublado", + "Overcast": "Cubierto", + "Fog": "Niebla", + "Drizzle": "Llovizna", + "Rain": "Lluvia", + "Snow": "Nieve", + "Rain showers": "Chubascos", + "Snow showers": "Chubascos de nieve", + "Thunderstorm": "Tormenta eléctrica", + "Mixed conditions": "Condiciones variables", + "Search {name} and nearby": "Buscar en {name} y alrededores", + "Search what is in view": "Buscar en lo que está a la vista", + "Close Context search": "Cerrar la búsqueda en Contexto", + "Search in Context": "Buscar en Contexto", + "Close search": "Cerrar búsqueda", + "Shrink Context back to a panel": "Reducir Contexto a un panel", + "Expand Context to a full-height column": "Ampliar Contexto a una columna de altura completa", + "Context tabs": "Pestañas de Contexto", + "Inspector": "Inspector", + "Properties": "Propiedades", + "Level": "Nivel", + "Last {n} min": "Últimos {n} min", + "Just now": "Justo ahora", + "Since selected": "Desde la selección", + "Altitude": "Altitud", + "Heading": "Rumbo", + "Field of view": "Campo de visión", + "Camera frame": "Imagen de la cámara", + "Acquiring frame…": "Obteniendo imagen…", + "Show a bigger view": "Ver en grande", + "Camera view": "Vista de la cámara", + "More info": "Más información", + "{n} s ago": "hace {n} s", + "{n} min ago": "hace {n} min", + "{n} h ago": "hace {n} h", + "{n} d ago": "hace {n} d", + "Out of feed · last reading": "Fuera del feed · última lectura", + "Live · {age}": "En vivo · {age}", + "{n} m": "{n} m", + "{n} km": "{n} km", + "updated {age}": "actualizado {age}", + "Selected on the map": "Seleccionado en el mapa", + "Close card": "Cerrar ficha", + "{n}% flown": "{n} % recorrido", + "to go": "restantes", + "The scheduled route for this flight number does not match where the plane is; it may be another leg of the same flight.": "La ruta programada de este número de vuelo no coincide con la posición del avión; puede ser otro tramo del mismo vuelo.", + "Scheduled · unverified: does not match where the plane is": "Programado · sin verificar: no coincide con la posición del avión", + "Nothing in this item’s details matches “{text}”.": "Nada en los detalles de este elemento coincide con «{text}».", + "Matching details": "Detalles coincidentes", + "Enter orbital view": "Entrar en la vista orbital", + "Enter Cockpit": "Entrar en la cabina", + "Fly to": "Volar hasta", + "Following": "Siguiendo", + "Follow": "Seguir", + "Ask GEV about {name}": "Preguntar a GEV sobre {name}", + "Flights within {radius}": "Vuelos en {radius}", + "No flights within {radius} from the layers that are on.": "No hay vuelos en {radius} en las capas activas.", + "Vessels within {radius}": "Buques en {radius}", + "No vessels within {radius} from the layers that are on.": "No hay buques en {radius} en las capas activas.", + "Cloud": "Nubosidad", + "Visibility": "Visibilidad", + "Conditions here": "Condiciones aquí", + "feels {n}°": "sensación {n}°", + "Reading conditions here…": "Leyendo las condiciones aquí…", + "No weather reading here.": "No hay datos del tiempo aquí.", + "Local solar time": "Hora solar local", + "Nearby radius": "Radio cercano", + "How far out the nearby lists look": "Hasta dónde llegan las listas cercanas", + "Hazards within {radius}": "Peligros en {radius}", + "Turns the layer on": "Activa la capa", + "No earthquakes, tropical storms or wildfires reported within {radius}.": "No hay sismos, tormentas tropicales ni incendios forestales en {radius}.", + "Broadcast alerts within {radius}": "Alertas emitidas en {radius}", + "Also within {radius}": "También en {radius}", + "Local news": "Noticias locales", + "Sundial · {time} solar · sun {deg}° {dir}": "Reloj de sol · {time} solar · sol a {deg}° {dir}", + "Sundial · {time} solar · sun below the horizon": "Reloj de sol · {time} solar · sol bajo el horizonte", + "{count} things": { + "one": "{count} elemento", + "many": "{count} de elementos", + "other": "{count} elementos" + }, + "{count} layers": { + "one": "{count} capa", + "many": "{count} de capas", + "other": "{count} capas" + }, + "{things} in view from {layers}": "{things} a la vista de {layers}", + "{n} km up": "a {n} km de altura", + "{n} m up": "a {n} m de altura", + "This view": "Esta vista", + "Day": "Día", + "Twilight": "Crepúsculo", + "Night": "Noche", + "Daylight": "Luz del día", + "sun {n}°": "sol {n}°", + "Of {n} read, {total} loaded": "De {n} leídos, {total} cargados", + "Of all {n}": "De los {n}", + "Of {n} in view": "De {n} a la vista", + "Error": "Error", + "Stale": "Desactualizado", + "In view": "A la vista", + "Globe view": "Vista del globo", + "Nothing selected": "Nada seleccionado", + "Worldwide now": "En el mundo ahora", + "Turn on {name}": "Activar {name}", + "{n} loaded": "{n} cargados", + "{n} in view": "{n} a la vista", + "Turn off {name}": "Desactivar {name}", + "Camera height": "Altura de la cámara", + "Nothing in view matches “{text}”.": "Nada a la vista coincide con «{text}».", + "Nothing from the layers that are on is in view here. Zoom out to see more.": "Nada de las capas activas está a la vista aquí. Aleja el zoom para ver más.", + "No loaded layer has anything in view. Turn some on in Data Layers.": "Ninguna capa cargada tiene nada a la vista. Activa algunas en Capas de datos.", + "Places in view": "Lugares a la vista", + "Show here": "Mostrar aquí", + "Ask GEV what's here": "Preguntar a GEV qué hay aquí", + "aircraft": "aeronave", + "vessel": "buque", + "launch": "lanzamiento", + "fire": "incendio", + "Fire detection": "Detección de fuego", + "fire perimeter": "perímetro de incendio", + "earthquake": "sismo", + "storm": "tormenta", + "air quality station": "estación de calidad del aire", + "installation": "instalación", + "dam": "presa", + "data centre": "centro de datos", + "place": "lugar", + "vehicle": "vehículo", + "bike station": "estación de bicicletas", + "plate reader": "lector de matrículas", + "camera": "cámara", + "airspace": "espacio aéreo", + "sighting": "avistamiento", + "Callsign": "Indicativo", + "Registration": "Matrícula", + "Aircraft class": "Clase de aeronave", + "Course": "Rumbo", + "Vertical rate": "Velocidad vertical", + "Squawk": "Squawk", + "Emergency": "Emergencia", + "Last contact": "Último contacto", + "Ship type": "Tipo de buque", + "Destination": "Destino", + "Depth": "Profundidad", + "Time": "Hora", + "Place": "Lugar", + "Fire power": "Potencia del fuego", + "Satellite": "Satélite", + "Sensor": "Sensor", + "Detected": "Detectado", + "Contained": "Contenido", + "Discovered": "Descubierto", + "Basin": "Cuenca", + "Index": "Índice", + "Health risk": "Riesgo para la salud", + "Bikes": "Bicicletas", + "Docks": "Anclajes", + "Floor": "Límite inferior", + "Ceiling": "Límite superior", + "Active": "Activo", + "NORAD ID": "ID NORAD", + "MMSI": "MMSI", + "ICAO24": "ICAO24", + "Capacity": "Capacidad", + "Output": "Producción", + "River": "Río", + "City": "Ciudad", + "State": "Estado", + "Street": "Calle", + "Opened": "Inaugurado", + "Height": "Altura", + "IT load": "Carga de TI", + "Waterway": "Vía fluvial", + "Military": "Militar", + "Land use": "Uso del suelo", + "Telecom": "Telecomunicaciones", + "feature": "elemento", + "Empty": "Vacío", + "Many seats free": "Muchos asientos libres", + "Few seats free": "Pocos asientos libres", + "Standing room only": "Solo de pie", + "Crowded": "Lleno", + "Not taking passengers": "No admite pasajeros", + "Major hurricane": "Huracán mayor", + "Typhoon": "Tifón", + "Super typhoon": "Supertifón", + "Tropical cyclone": "Ciclón tropical", + "Prescribed burn": "Quema prescrita", + "Atlantic": "Atlántico", + "Eastern Pacific": "Pacífico oriental", + "Central Pacific": "Pacífico central", + "Western Pacific": "Pacífico occidental", + "Indian Ocean": "Océano Índico", + "Southern Hemisphere": "Hemisferio sur", + "Cable tram": "Tranvía de cable", + "Aerial lift": "Teleférico", + "Fishing": "Pesca", + "Tug": "Remolcador", + "Sailing": "Velero", + "Pleasure craft": "Embarcación de recreo", + "Pilot vessel": "Embarcación de prácticos", + "Search and rescue": "Búsqueda y rescate", + "Law enforcement": "Fuerzas del orden", + "High-speed craft": "Embarcación de alta velocidad", + "Passenger": "Pasajeros", + "Cargo": "Carga", + "Tanker": "Petrolero", + "Yes": "Sí", + "{n} ft": "{n} ft", + "{n} km/s": "{n} km/s", + "{n} km/h": "{n} km/h", + "{n} kt": "{n} kn", + "{n} ft/min": "{n} ft/min", + "{n}°": "{n}°", + "M {n}": "M {n}", + "{n} MW": "{n} MW", + "{n}%": "{n} %", + "{n} hPa": "{n} hPa", + "Hijack (squawk 7500)": "Secuestro (squawk 7500)", + "Radio failure (squawk 7600)": "Fallo de radio (squawk 7600)", + "Emergency (squawk 7700)": "Emergencia (squawk 7700)", + "Emergency: {kind}": "Emergencia: {kind}", + "Emergency declared": "Emergencia declarada", + "Tsunami warning issued": "Alerta de tsunami emitida", + "VFR, no flight plan": "VFR, sin plan de vuelo", + "VFR conspicuity": "Código VFR de visibilidad", + "IFR, no code yet": "IFR, aún sin código", + "Hijack": "Secuestro", + "Climbing {n} ft/min": "Ascendiendo a {n} ft/min", + "Descending {n} ft/min": "Descendiendo a {n} ft/min", + "Cruising, level": "Crucero, nivelado", + "Airliners": "Aviones comerciales", + "Widebodies": "Aviones de fuselaje ancho", + "Business jets": "Jets ejecutivos", + "Helicopters": "Helicópteros", + "Turboprops": "Turbohélices", + "Fast jets": "Reactores rápidos", + "Four-engine jets": "Cuatrimotores", + "M6 and above": "M6 o más", + "M5 to 6": "M5 a 6", + "M4 to 5": "M4 a 5", + "Below M4": "Menos de M4", + "{kind} {name}": "{kind} {name}", + "place|Country": "País", + "altitude|Level": "Nivelado", + "{h} h {m} min": "{h} h {m} min", + "{n} min": "{n} min", + "{speed} {direction}": "{speed} del {direction}", + "{n} mm": "{n} mm" } diff --git a/src/i18n/locales/fr.json b/src/i18n/locales/fr.json index c1d4a80e6..cdea54c25 100644 --- a/src/i18n/locales/fr.json +++ b/src/i18n/locales/fr.json @@ -3732,7 +3732,7 @@ "Under 1 min": "Moins de 1 min", "1 min or more": "1 min ou plus", "Shots": "Plans", - "Layers on": "Couches actives", + "Layers on": "Couches activées", "Stories": "Récits", "NEW": "NOUVEAU", "GEV Stories": "Récits GEV", @@ -3893,5 +3893,291 @@ "A visualization of the 26 August 2026 Bhote Koshi outburst flood, not an official hazard model. The historical (2021) and post-event views are Vantor WorldView imagery; the river’s path is GeoPera’s reconstruction. Witness clips link to their original posts, and their capture times are unverified.": "Une visualisation de la crue par débâcle de la Bhote Koshi du 26 août 2026, et non un modèle officiel de risque. Les vues historiques (2021) et postérieures à l'événement sont des images Vantor WorldView ; le tracé de la rivière est la reconstitution de GeoPera. Les vidéos de témoins renvoient à leurs publications d'origine, et leurs heures de prise de vue ne sont pas vérifiées.", "That story is not available here": "Ce récit n'est pas disponible ici", "DRAFT": "BROUILLON", - "A draft, not saved as a story yet. Use SAVE TO STORIES in AUTHORING to save it.": "Un brouillon, pas encore enregistré comme récit. Utilisez ENREGISTRER DANS STORIES dans CRÉATION pour l'enregistrer." + "A draft, not saved as a story yet. Use SAVE TO STORIES in AUTHORING to save it.": "Un brouillon, pas encore enregistré comme récit. Utilisez ENREGISTRER DANS STORIES dans CRÉATION pour l'enregistrer.", + "Heading to next stop": "Vers le prochain arrêt", + "Arriving at a stop": "Arrive à un arrêt", + "Stopped at a stop": "À l’arrêt", + "Wikipedia": "Wikipédia", + "Wikidata": "Wikidata", + "Website": "Site web", + "Phase": "Phase de vol", + "Flight level": "Niveau de vol", + "Mach": "Mach", + "Squawk {code}": "Squawk {code}", + "Signal": "Signal", + "Civilian, in the air": "Civils, en vol", + "Military, in the air": "Militaires, en vol", + "On the ground": "Au sol", + "Motion": "Mouvement", + "Operator": "Exploitant", + "Last reported": "Dernier signalement", + "Crowding": "Affluence", + "Class": "Classe", + "Magnitude": "Magnitude", + "Labels": "Libellés", + "3D aircraft": "Avions 3D", + "M{mag} earthquake": "Séisme de magnitude {mag}", + "Earthquake": "Séisme", + "{n} kt winds": "Vents de {n} nœuds", + "Wildfire": "Feu de forêt", + "{n} acres": "{n} acres", + "{n}% contained": "Maîtrisé à {n} %", + "prescribed burn": "brûlage dirigé", + "{count} satellite fire hits": { + "one": "{count} détection de feu par satellite", + "many": "{count} de détections de feu par satellite", + "other": "{count} détections de feu par satellite" + }, + "last day": "dernières 24 h", + "Conditions unknown": "Conditions inconnues", + "Partly cloudy": "Partiellement nuageux", + "Overcast": "Couvert", + "Fog": "Brouillard", + "Drizzle": "Bruine", + "Rain": "Pluie", + "Snow": "Neige", + "Rain showers": "Averses de pluie", + "Snow showers": "Averses de neige", + "Thunderstorm": "Orage", + "Mixed conditions": "Temps variable", + "Search {name} and nearby": "Rechercher dans {name} et alentour", + "Search what is in view": "Rechercher dans la vue", + "Close Context search": "Fermer la recherche du Contexte", + "Search in Context": "Rechercher dans le Contexte", + "Close search": "Fermer la recherche", + "Shrink Context back to a panel": "Réduire le Contexte en panneau", + "Expand Context to a full-height column": "Agrandir le Contexte en colonne pleine hauteur", + "Context tabs": "Onglets du Contexte", + "Inspector": "Inspecteur", + "Properties": "Propriétés", + "Level": "Niveau", + "Last {n} min": "{n} dernières min", + "Just now": "À l’instant", + "Since selected": "Depuis la sélection", + "Altitude": "Altitude", + "Heading": "Cap", + "Field of view": "Champ de vision", + "Camera frame": "Image de la caméra", + "Acquiring frame…": "Récupération de l’image…", + "Show a bigger view": "Agrandir", + "Camera view": "Vue de la caméra", + "More info": "Plus d’infos", + "{n} s ago": "il y a {n} s", + "{n} min ago": "il y a {n} min", + "{n} h ago": "il y a {n} h", + "{n} d ago": "il y a {n} j", + "Out of feed · last reading": "Hors du flux · dernière lecture", + "Live · {age}": "Direct · {age}", + "{n} m": "{n} m", + "{n} km": "{n} km", + "updated {age}": "mis à jour {age}", + "Selected on the map": "Sélection sur la carte", + "Close card": "Fermer la fiche", + "{n}% flown": "{n} % parcouru", + "to go": "restants", + "The scheduled route for this flight number does not match where the plane is; it may be another leg of the same flight.": "La route prévue pour ce numéro de vol ne correspond pas à la position de l’avion ; il peut s’agir d’une autre étape du même vol.", + "Scheduled · unverified: does not match where the plane is": "Prévu · non vérifié : ne correspond pas à la position de l’avion", + "Nothing in this item’s details matches “{text}”.": "Rien dans les détails de cet élément ne correspond à « {text} ».", + "Matching details": "Détails correspondants", + "Enter orbital view": "Passer en vue orbitale", + "Enter Cockpit": "Entrer dans le cockpit", + "Fly to": "Rejoindre", + "Following": "Suivi actif", + "Follow": "Suivre", + "Ask GEV about {name}": "Interroger GEV sur {name}", + "Flights within {radius}": "Vols dans un rayon de {radius}", + "No flights within {radius} from the layers that are on.": "Aucun vol dans un rayon de {radius} dans les couches activées.", + "Vessels within {radius}": "Navires dans un rayon de {radius}", + "No vessels within {radius} from the layers that are on.": "Aucun navire dans un rayon de {radius} dans les couches activées.", + "Cloud": "Nébulosité", + "Visibility": "Visibilité", + "Conditions here": "Conditions ici", + "feels {n}°": "ressenti {n}°", + "Reading conditions here…": "Lecture des conditions ici…", + "No weather reading here.": "Aucune donnée météo ici.", + "Local solar time": "Heure solaire locale", + "Nearby radius": "Rayon de proximité", + "How far out the nearby lists look": "Jusqu’où vont les listes de proximité", + "Hazards within {radius}": "Risques dans un rayon de {radius}", + "Turns the layer on": "Active la couche", + "No earthquakes, tropical storms or wildfires reported within {radius}.": "Aucun séisme, tempête tropicale ni feu de forêt signalé dans un rayon de {radius}.", + "Broadcast alerts within {radius}": "Alertes diffusées dans un rayon de {radius}", + "Also within {radius}": "Aussi dans un rayon de {radius}", + "Local news": "Actualités locales", + "Sundial · {time} solar · sun {deg}° {dir}": "Cadran solaire · {time} solaire · soleil à {deg}° {dir}", + "Sundial · {time} solar · sun below the horizon": "Cadran solaire · {time} solaire · soleil sous l’horizon", + "{count} things": { + "one": "{count} élément", + "many": "{count} d’éléments", + "other": "{count} éléments" + }, + "{count} layers": { + "one": "{count} couche", + "many": "{count} de couches", + "other": "{count} couches" + }, + "{things} in view from {layers}": "{things} visibles depuis {layers}", + "{n} km up": "à {n} km d’altitude", + "{n} m up": "à {n} m d’altitude", + "This view": "Cette vue", + "Day": "Jour", + "Twilight": "Crépuscule", + "Night": "Nuit", + "Daylight": "Lumière du jour", + "sun {n}°": "soleil {n}°", + "Of {n} read, {total} loaded": "Sur {n} lus, {total} chargés", + "Of all {n}": "Sur les {n}", + "Of {n} in view": "Sur {n} visibles", + "Error": "Erreur", + "Stale": "Obsolète", + "In view": "Dans la vue", + "Globe view": "Vue du globe", + "Nothing selected": "Aucune sélection", + "Worldwide now": "Dans le monde en ce moment", + "Turn on {name}": "Activer {name}", + "{n} loaded": "{n} chargés", + "{n} in view": "{n} visibles", + "Turn off {name}": "Désactiver {name}", + "Camera height": "Altitude de la caméra", + "Nothing in view matches “{text}”.": "Rien dans la vue ne correspond à « {text} ».", + "Nothing from the layers that are on is in view here. Zoom out to see more.": "Rien des couches activées n’est visible ici. Dézoomez pour en voir plus.", + "No loaded layer has anything in view. Turn some on in Data Layers.": "Aucune couche chargée n’a rien de visible. Activez-en dans Couches.", + "Places in view": "Lieux visibles", + "Show here": "Afficher ici", + "Ask GEV what's here": "Demander à GEV ce qu’il y a ici", + "aircraft": "aéronef", + "vessel": "navire", + "launch": "lancement", + "fire": "feu", + "Fire detection": "Détection de feu", + "fire perimeter": "périmètre de feu", + "earthquake": "séisme", + "storm": "tempête", + "air quality station": "station de qualité de l’air", + "installation": "installation", + "dam": "barrage", + "data centre": "centre de données", + "place": "lieu", + "vehicle": "véhicule", + "bike station": "station de vélos", + "plate reader": "lecteur de plaques", + "camera": "caméra", + "airspace": "espace aérien", + "sighting": "observation", + "Callsign": "Indicatif", + "Registration": "Immatriculation", + "Aircraft class": "Classe d’aéronef", + "Course": "Route", + "Vertical rate": "Vitesse verticale", + "Squawk": "Squawk", + "Emergency": "Urgence", + "Last contact": "Dernier contact", + "Ship type": "Type de navire", + "Destination": "Destination", + "Depth": "Profondeur", + "Time": "Heure", + "Place": "Lieu", + "Fire power": "Puissance du feu", + "Satellite": "Satellite", + "Sensor": "Capteur", + "Detected": "Détecté", + "Contained": "Maîtrisé", + "Discovered": "Découvert", + "Basin": "Bassin", + "Index": "Indice", + "Health risk": "Risque sanitaire", + "Bikes": "Vélos", + "Docks": "Bornes", + "Floor": "Plancher", + "Ceiling": "Plafond", + "Active": "Actif", + "NORAD ID": "ID NORAD", + "MMSI": "MMSI", + "ICAO24": "ICAO24", + "Capacity": "Capacité", + "Output": "Production", + "River": "Rivière", + "City": "Ville", + "State": "État", + "Street": "Rue", + "Opened": "Ouvert", + "Height": "Hauteur", + "IT load": "Charge informatique", + "Waterway": "Voie d’eau", + "Military": "Militaire", + "Land use": "Occupation du sol", + "Telecom": "Télécoms", + "feature": "élément", + "Empty": "Vide", + "Many seats free": "Beaucoup de places libres", + "Few seats free": "Peu de places libres", + "Standing room only": "Places debout uniquement", + "Crowded": "Bondé", + "Not taking passengers": "Ne prend pas de passagers", + "Major hurricane": "Ouragan majeur", + "Typhoon": "Typhon", + "Super typhoon": "Super typhon", + "Tropical cyclone": "Cyclone tropical", + "Prescribed burn": "Brûlage dirigé", + "Atlantic": "Atlantique", + "Eastern Pacific": "Pacifique Est", + "Central Pacific": "Pacifique central", + "Western Pacific": "Pacifique Ouest", + "Indian Ocean": "Océan Indien", + "Southern Hemisphere": "Hémisphère sud", + "Cable tram": "Tramway à câble", + "Aerial lift": "Remontée par câble", + "Fishing": "Pêche", + "Tug": "Remorqueur", + "Sailing": "Voilier", + "Pleasure craft": "Navire de plaisance", + "Pilot vessel": "Bateau pilote", + "Search and rescue": "Recherche et sauvetage", + "Law enforcement": "Forces de l’ordre", + "High-speed craft": "Navire à grande vitesse", + "Passenger": "Passagers", + "Cargo": "Cargo", + "Tanker": "Pétrolier", + "Yes": "Oui", + "{n} ft": "{n} ft", + "{n} km/s": "{n} km/s", + "{n} km/h": "{n} km/h", + "{n} kt": "{n} nd", + "{n} ft/min": "{n} ft/min", + "{n}°": "{n}°", + "M {n}": "M {n}", + "{n} MW": "{n} MW", + "{n}%": "{n} %", + "{n} hPa": "{n} hPa", + "Hijack (squawk 7500)": "Détournement (squawk 7500)", + "Radio failure (squawk 7600)": "Panne radio (squawk 7600)", + "Emergency (squawk 7700)": "Urgence (squawk 7700)", + "Emergency: {kind}": "Urgence : {kind}", + "Emergency declared": "Urgence déclarée", + "Tsunami warning issued": "Alerte au tsunami émise", + "VFR, no flight plan": "VFR, sans plan de vol", + "VFR conspicuity": "Code VFR de visibilité", + "IFR, no code yet": "IFR, pas encore de code", + "Hijack": "Détournement", + "Climbing {n} ft/min": "En montée à {n} ft/min", + "Descending {n} ft/min": "En descente à {n} ft/min", + "Cruising, level": "En croisière, palier", + "Airliners": "Avions de ligne", + "Widebodies": "Gros-porteurs", + "Business jets": "Jets d’affaires", + "Helicopters": "Hélicoptères", + "Turboprops": "Turbopropulseurs", + "Fast jets": "Avions de chasse", + "Four-engine jets": "Quadriréacteurs", + "M6 and above": "M6 et plus", + "M5 to 6": "M5 à 6", + "M4 to 5": "M4 à 5", + "Below M4": "Moins de M4", + "{kind} {name}": "{kind} {name}", + "place|Country": "Pays", + "altitude|Level": "Stable", + "{h} h {m} min": "{h} h {m} min", + "{n} min": "{n} min", + "{speed} {direction}": "{speed} de {direction}", + "{n} mm": "{n} mm" } diff --git a/src/i18n/locales/he.json b/src/i18n/locales/he.json index 83b663f9b..b8f2e2457 100644 --- a/src/i18n/locales/he.json +++ b/src/i18n/locales/he.json @@ -3893,5 +3893,291 @@ "A visualization of the 26 August 2026 Bhote Koshi outburst flood, not an official hazard model. The historical (2021) and post-event views are Vantor WorldView imagery; the river’s path is GeoPera’s reconstruction. Witness clips link to their original posts, and their capture times are unverified.": "הדמיה של שיטפון הפריצה ב-Bhote Koshi ב-26 באוגוסט 2026, ולא מודל סיכונים רשמי. המראות ההיסטוריים (2021) ומלאחר האירוע הם צילומי Vantor WorldView; מסלול הנהר הוא השחזור של GeoPera. קטעי העדים מקשרים לפוסטים המקוריים שלהם, וזמני הצילום שלהם לא אומתו.", "That story is not available here": "הסיפור הזה אינו זמין כאן", "DRAFT": "טיוטה", - "A draft, not saved as a story yet. Use SAVE TO STORIES in AUTHORING to save it.": "טיוטה שעדיין לא נשמרה כסיפור. השתמשו ב„שמירה ב-STORIES” ב„יצירה” כדי לשמור אותה." + "A draft, not saved as a story yet. Use SAVE TO STORIES in AUTHORING to save it.": "טיוטה שעדיין לא נשמרה כסיפור. השתמשו ב„שמירה ב-STORIES” ב„יצירה” כדי לשמור אותה.", + "Heading to next stop": "בדרך לתחנה הבאה", + "Arriving at a stop": "מגיע לתחנה", + "Stopped at a stop": "עומד בתחנה", + "Wikipedia": "ויקיפדיה", + "Wikidata": "ויקינתונים", + "Website": "אתר", + "Phase": "שלב", + "Flight level": "גובה טיסה", + "Mach": "מאך", + "Squawk {code}": "סקוואק {code}", + "Signal": "אות", + "Civilian, in the air": "אזרחיים, באוויר", + "Military, in the air": "צבאיים, באוויר", + "On the ground": "על הקרקע", + "Motion": "תנועה", + "Operator": "מפעיל", + "Last reported": "דיווח אחרון", + "Crowding": "עומס", + "Class": "סוג", + "Magnitude": "עוצמה", + "Labels": "תוויות", + "3D aircraft": "מטוסים בתלת־ממד", + "M{mag} earthquake": "רעידת אדמה בעוצמה {mag}", + "Earthquake": "רעידת אדמה", + "{n} kt winds": "רוחות של {n} קשר", + "Wildfire": "שריפת יער", + "{n} acres": "{n} אקר", + "{n}% contained": "{n}% בשליטה", + "prescribed burn": "שריפה מבוקרת", + "{count} satellite fire hits": { + "one": "{count} זיהוי שריפה לווייני", + "two": "{count} זיהויי שריפה לווייניים", + "other": "{count} זיהויי שריפה לווייניים" + }, + "last day": "היום האחרון", + "Conditions unknown": "התנאים לא ידועים", + "Partly cloudy": "מעונן חלקית", + "Overcast": "מעונן", + "Fog": "ערפל", + "Drizzle": "טפטוף", + "Rain": "גשם", + "Snow": "שלג", + "Rain showers": "ממטרי גשם", + "Snow showers": "ממטרי שלג", + "Thunderstorm": "סופת רעמים", + "Mixed conditions": "תנאים משתנים", + "Search {name} and nearby": "חיפוש ב־{name} ובסביבה", + "Search what is in view": "חיפוש במה שבתצוגה", + "Close Context search": "סגירת החיפוש בהקשר", + "Search in Context": "חיפוש בהקשר", + "Close search": "סגירת החיפוש", + "Shrink Context back to a panel": "כיווץ ההקשר בחזרה ללוח", + "Expand Context to a full-height column": "הרחבת ההקשר לעמודה בגובה מלא", + "Context tabs": "לשוניות ההקשר", + "Inspector": "בודק", + "Properties": "מאפיינים", + "Level": "רמה", + "Last {n} min": "{n} הדקות האחרונות", + "Just now": "כרגע", + "Since selected": "מאז הבחירה", + "Altitude": "גובה", + "Heading": "כיוון", + "Field of view": "שדה ראייה", + "Camera frame": "פריים מהמצלמה", + "Acquiring frame…": "מקבל פריים…", + "Show a bigger view": "הצגה בגודל גדול יותר", + "Camera view": "תצוגת המצלמה", + "More info": "מידע נוסף", + "{n} s ago": "לפני {n} שנ׳", + "{n} min ago": "לפני {n} דק׳", + "{n} h ago": "לפני {n} שע׳", + "{n} d ago": "לפני {n} ימים", + "Out of feed · last reading": "מחוץ להזנה · קריאה אחרונה", + "Live · {age}": "חי · {age}", + "{n} m": "{n} m", + "{n} km": "{n} km", + "updated {age}": "עודכן {age}", + "Selected on the map": "נבחר במפה", + "Close card": "סגירת הכרטיס", + "{n}% flown": "{n}% מהדרך", + "to go": "נותרו", + "The scheduled route for this flight number does not match where the plane is; it may be another leg of the same flight.": "המסלול המתוכנן למספר הטיסה הזה לא תואם את מיקום המטוס; ייתכן שזה קטע אחר של אותה טיסה.", + "Scheduled · unverified: does not match where the plane is": "מתוכנן · לא מאומת: לא תואם את מיקום המטוס", + "Nothing in this item’s details matches “{text}”.": "אין בפרטי הפריט הזה התאמה ל־„{text}”.", + "Matching details": "פרטים תואמים", + "Enter orbital view": "כניסה לתצוגה המסלולית", + "Enter Cockpit": "כניסה לתא הטייס", + "Fly to": "טיסה אל", + "Following": "במעקב", + "Follow": "מעקב", + "Ask GEV about {name}": "לשאול את GEV על {name}", + "Flights within {radius}": "טיסות בטווח {radius}", + "No flights within {radius} from the layers that are on.": "אין טיסות בטווח {radius} מהשכבות הפעילות.", + "Vessels within {radius}": "כלי שיט בטווח {radius}", + "No vessels within {radius} from the layers that are on.": "אין כלי שיט בטווח {radius} מהשכבות הפעילות.", + "Cloud": "עננות", + "Visibility": "ראות", + "Conditions here": "התנאים כאן", + "feels {n}°": "מורגש {n}°", + "Reading conditions here…": "קורא את התנאים כאן…", + "No weather reading here.": "אין כאן נתוני מזג אוויר.", + "Local solar time": "זמן שמש מקומי", + "Nearby radius": "רדיוס סביבה", + "How far out the nearby lists look": "עד כמה רחוק מגיעות רשימות הסביבה", + "Hazards within {radius}": "סכנות בטווח {radius}", + "Turns the layer on": "מפעיל את השכבה", + "No earthquakes, tropical storms or wildfires reported within {radius}.": "לא דווחו רעידות אדמה, סופות טרופיות או שריפות יער בטווח {radius}.", + "Broadcast alerts within {radius}": "התרעות משודרות בטווח {radius}", + "Also within {radius}": "גם בטווח {radius}", + "Local news": "חדשות מקומיות", + "Sundial · {time} solar · sun {deg}° {dir}": "שעון שמש · {time} זמן שמש · השמש {deg}° {dir}", + "Sundial · {time} solar · sun below the horizon": "שעון שמש · {time} זמן שמש · השמש מתחת לאופק", + "{count} things": { + "one": "{count} פריט", + "two": "{count} פריטים", + "other": "{count} פריטים" + }, + "{count} layers": { + "one": "{count} שכבה", + "two": "{count} שכבות", + "other": "{count} שכבות" + }, + "{things} in view from {layers}": "{things} בתצוגה, מתוך {layers}", + "{n} km up": "בגובה {n} ק\"מ", + "{n} m up": "בגובה {n} מ׳", + "This view": "התצוגה הזו", + "Day": "יום", + "Twilight": "דמדומים", + "Night": "לילה", + "Daylight": "אור יום", + "sun {n}°": "השמש {n}°", + "Of {n} read, {total} loaded": "מתוך {n} שנקראו, {total} נטענו", + "Of all {n}": "מתוך כל {n}", + "Of {n} in view": "מתוך {n} בתצוגה", + "Error": "שגיאה", + "Stale": "לא עדכני", + "In view": "בתצוגה", + "Globe view": "תצוגת גלובוס", + "Nothing selected": "לא נבחר דבר", + "Worldwide now": "בעולם עכשיו", + "Turn on {name}": "הפעלת {name}", + "{n} loaded": "{n} נטענו", + "{n} in view": "{n} בתצוגה", + "Turn off {name}": "כיבוי {name}", + "Camera height": "גובה המצלמה", + "Nothing in view matches “{text}”.": "אין בתצוגה התאמה ל־„{text}”.", + "Nothing from the layers that are on is in view here. Zoom out to see more.": "שום דבר מהשכבות הפעילות לא נמצא בתצוגה כאן. הקטינו את התצוגה כדי לראות יותר.", + "No loaded layer has anything in view. Turn some on in Data Layers.": "לאף שכבה טעונה אין דבר בתצוגה. הפעילו שכבות בשכבות נתונים.", + "Places in view": "מקומות בתצוגה", + "Show here": "הצגה כאן", + "Ask GEV what's here": "לשאול את GEV מה יש כאן", + "aircraft": "כלי טיס", + "vessel": "כלי שיט", + "launch": "שיגור", + "fire": "שריפה", + "Fire detection": "זיהוי שריפה", + "fire perimeter": "היקף שריפה", + "earthquake": "רעידת אדמה", + "storm": "סופה", + "air quality station": "תחנת איכות אוויר", + "installation": "מתקן", + "dam": "סכר", + "data centre": "מרכז נתונים", + "place": "מקום", + "vehicle": "כלי רכב", + "bike station": "תחנת אופניים", + "plate reader": "קורא לוחיות רישוי", + "camera": "מצלמה", + "airspace": "מרחב אווירי", + "sighting": "תצפית", + "Callsign": "אות קריאה", + "Registration": "רישום", + "Aircraft class": "סוג כלי טיס", + "Course": "נתיב", + "Vertical rate": "קצב אנכי", + "Squawk": "סקוואק", + "Emergency": "חירום", + "Last contact": "קשר אחרון", + "Ship type": "סוג כלי שיט", + "Destination": "יעד", + "Depth": "עומק", + "Time": "זמן", + "Place": "מקום", + "Fire power": "עוצמת השריפה", + "Satellite": "לוויין", + "Sensor": "חיישן", + "Detected": "זוהה", + "Contained": "בשליטה", + "Discovered": "התגלה", + "Basin": "אגן", + "Index": "מדד", + "Health risk": "סיכון בריאותי", + "Bikes": "אופניים", + "Docks": "עמדות", + "Floor": "גבול תחתון", + "Ceiling": "גבול עליון", + "Active": "פעיל", + "NORAD ID": "מזהה NORAD", + "MMSI": "MMSI", + "ICAO24": "ICAO24", + "Capacity": "קיבולת", + "Output": "תפוקה", + "River": "נהר", + "City": "עיר", + "State": "מדינה", + "Street": "רחוב", + "Opened": "נפתח", + "Height": "גובה", + "IT load": "עומס IT", + "Waterway": "נתיב מים", + "Military": "צבאי", + "Land use": "שימוש בקרקע", + "Telecom": "תקשורת", + "feature": "פריט", + "Empty": "ריק", + "Many seats free": "מקומות פנויים רבים", + "Few seats free": "מעט מקומות פנויים", + "Standing room only": "מקומות עמידה בלבד", + "Crowded": "צפוף", + "Not taking passengers": "לא מעלה נוסעים", + "Major hurricane": "הוריקן חזק", + "Typhoon": "טייפון", + "Super typhoon": "סופר־טייפון", + "Tropical cyclone": "ציקלון טרופי", + "Prescribed burn": "שריפה מבוקרת", + "Atlantic": "האוקיינוס האטלנטי", + "Eastern Pacific": "מזרח האוקיינוס השקט", + "Central Pacific": "מרכז האוקיינוס השקט", + "Western Pacific": "מערב האוקיינוס השקט", + "Indian Ocean": "האוקיינוס ההודי", + "Southern Hemisphere": "חצי הכדור הדרומי", + "Cable tram": "חשמלית כבלים", + "Aerial lift": "רכבל", + "Fishing": "דיג", + "Tug": "גוררת", + "Sailing": "מפרשית", + "Pleasure craft": "כלי שיט לפנאי", + "Pilot vessel": "סירת נתבים", + "Search and rescue": "חיפוש והצלה", + "Law enforcement": "אכיפת חוק", + "High-speed craft": "כלי שיט מהיר", + "Passenger": "נוסעים", + "Cargo": "מטען", + "Tanker": "מכלית", + "Yes": "כן", + "{n} ft": "{n} ft", + "{n} km/s": "{n} km/s", + "{n} km/h": "{n} km/h", + "{n} kt": "{n} kt", + "{n} ft/min": "{n} ft/min", + "{n}°": "{n}°", + "M {n}": "M {n}", + "{n} MW": "{n} MW", + "{n}%": "{n}%", + "{n} hPa": "{n} hPa", + "Hijack (squawk 7500)": "חטיפה (סקוואק 7500)", + "Radio failure (squawk 7600)": "תקלת קשר (סקוואק 7600)", + "Emergency (squawk 7700)": "חירום (סקוואק 7700)", + "Emergency: {kind}": "חירום: {kind}", + "Emergency declared": "הוכרז מצב חירום", + "Tsunami warning issued": "הוצאה אזהרת צונאמי", + "VFR, no flight plan": "VFR, ללא תוכנית טיסה", + "VFR conspicuity": "קוד VFR כללי", + "IFR, no code yet": "IFR, עדיין ללא קוד", + "Hijack": "חטיפה", + "Climbing {n} ft/min": "מטפס {n} ft/min", + "Descending {n} ft/min": "יורד {n} ft/min", + "Cruising, level": "שיוט, גובה קבוע", + "Airliners": "מטוסי נוסעים", + "Widebodies": "מטוסי גוף רחב", + "Business jets": "מטוסי מנהלים", + "Helicopters": "מסוקים", + "Turboprops": "מטוסי טורבו־פרופ", + "Fast jets": "מטוסי קרב", + "Four-engine jets": "מטוסים ארבעה־מנועיים", + "M6 and above": "M6 ומעלה", + "M5 to 6": "M5 עד 6", + "M4 to 5": "M4 עד 5", + "Below M4": "מתחת ל־M4", + "{kind} {name}": "{kind} {name}", + "place|Country": "מדינה", + "altitude|Level": "יציב", + "{h} h {m} min": "{h} שע׳ {m} דק׳", + "{n} min": "{n} דק׳", + "{speed} {direction}": "{speed} מ־{direction}", + "{n} mm": "{n} מ״מ" } diff --git a/src/i18n/locales/it.json b/src/i18n/locales/it.json index 81215df10..8cf511043 100644 --- a/src/i18n/locales/it.json +++ b/src/i18n/locales/it.json @@ -3893,5 +3893,291 @@ "A visualization of the 26 August 2026 Bhote Koshi outburst flood, not an official hazard model. The historical (2021) and post-event views are Vantor WorldView imagery; the river’s path is GeoPera’s reconstruction. Witness clips link to their original posts, and their capture times are unverified.": "Una visualizzazione dell'alluvione da rottura del Bhote Koshi del 26 agosto 2026, non un modello ufficiale di pericolosità. Le viste storiche (2021) e successive all'evento sono immagini Vantor WorldView; il percorso del fiume è la ricostruzione di GeoPera. I video dei testimoni rimandano ai post originali, e i loro orari di ripresa non sono verificati.", "That story is not available here": "Questa storia non è disponibile qui", "DRAFT": "BOZZA", - "A draft, not saved as a story yet. Use SAVE TO STORIES in AUTHORING to save it.": "Una bozza, non ancora salvata come storia. Usa SALVA IN STORIES in CREAZIONE per salvarla." + "A draft, not saved as a story yet. Use SAVE TO STORIES in AUTHORING to save it.": "Una bozza, non ancora salvata come storia. Usa SALVA IN STORIES in CREAZIONE per salvarla.", + "Heading to next stop": "Verso la prossima fermata", + "Arriving at a stop": "In arrivo a una fermata", + "Stopped at a stop": "Fermo a una fermata", + "Wikipedia": "Wikipedia", + "Wikidata": "Wikidata", + "Website": "Sito web", + "Phase": "Fase", + "Flight level": "Livello di volo", + "Mach": "Mach", + "Squawk {code}": "Squawk {code}", + "Signal": "Segnale", + "Civilian, in the air": "Civili, in volo", + "Military, in the air": "Militari, in volo", + "On the ground": "A terra", + "Motion": "Movimento", + "Operator": "Operatore", + "Last reported": "Ultima segnalazione", + "Crowding": "Affollamento", + "Class": "Classe", + "Magnitude": "Magnitudo", + "Labels": "Etichette", + "3D aircraft": "Aerei 3D", + "M{mag} earthquake": "Terremoto di magnitudo {mag}", + "Earthquake": "Terremoto", + "{n} kt winds": "Venti a {n} nodi", + "Wildfire": "Incendio boschivo", + "{n} acres": "{n} acri", + "{n}% contained": "Contenuto al {n}%", + "prescribed burn": "fuoco prescritto", + "{count} satellite fire hits": { + "one": "{count} rilevamento satellitare di fuoco", + "many": "{count} di rilevamenti satellitari di fuoco", + "other": "{count} rilevamenti satellitari di fuoco" + }, + "last day": "ultimo giorno", + "Conditions unknown": "Condizioni sconosciute", + "Partly cloudy": "Parzialmente nuvoloso", + "Overcast": "Coperto", + "Fog": "Nebbia", + "Drizzle": "Pioviggine", + "Rain": "Pioggia", + "Snow": "Neve", + "Rain showers": "Rovesci di pioggia", + "Snow showers": "Rovesci di neve", + "Thunderstorm": "Temporale", + "Mixed conditions": "Condizioni variabili", + "Search {name} and nearby": "Cerca in {name} e dintorni", + "Search what is in view": "Cerca in ciò che è in vista", + "Close Context search": "Chiudi la ricerca in Contesto", + "Search in Context": "Cerca in Contesto", + "Close search": "Chiudi ricerca", + "Shrink Context back to a panel": "Riduci Contesto a pannello", + "Expand Context to a full-height column": "Espandi Contesto a colonna a tutta altezza", + "Context tabs": "Schede di Contesto", + "Inspector": "Ispettore", + "Properties": "Proprietà", + "Level": "Livello", + "Last {n} min": "Ultimi {n} min", + "Just now": "Proprio ora", + "Since selected": "Dalla selezione", + "Altitude": "Altitudine", + "Heading": "Prua", + "Field of view": "Campo visivo", + "Camera frame": "Fotogramma della telecamera", + "Acquiring frame…": "Acquisizione fotogramma…", + "Show a bigger view": "Mostra più grande", + "Camera view": "Vista della telecamera", + "More info": "Più informazioni", + "{n} s ago": "{n} s fa", + "{n} min ago": "{n} min fa", + "{n} h ago": "{n} h fa", + "{n} d ago": "{n} g fa", + "Out of feed · last reading": "Fuori dal feed · ultima lettura", + "Live · {age}": "Diretta · {age}", + "{n} m": "{n} m", + "{n} km": "{n} km", + "updated {age}": "aggiornato {age}", + "Selected on the map": "Selezionato sulla mappa", + "Close card": "Chiudi scheda", + "{n}% flown": "{n}% percorso", + "to go": "rimanenti", + "The scheduled route for this flight number does not match where the plane is; it may be another leg of the same flight.": "La rotta prevista per questo numero di volo non corrisponde alla posizione dell’aereo; potrebbe essere un’altra tratta dello stesso volo.", + "Scheduled · unverified: does not match where the plane is": "Previsto · non verificato: non corrisponde alla posizione dell’aereo", + "Nothing in this item’s details matches “{text}”.": "Nessun dettaglio di questo elemento corrisponde a “{text}”.", + "Matching details": "Dettagli corrispondenti", + "Enter orbital view": "Entra nella vista orbitale", + "Enter Cockpit": "Entra nel cockpit", + "Fly to": "Vola qui", + "Following": "In seguimento", + "Follow": "Segui", + "Ask GEV about {name}": "Chiedi a GEV di {name}", + "Flights within {radius}": "Voli entro {radius}", + "No flights within {radius} from the layers that are on.": "Nessun volo entro {radius} dai livelli attivi.", + "Vessels within {radius}": "Navi entro {radius}", + "No vessels within {radius} from the layers that are on.": "Nessuna nave entro {radius} dai livelli attivi.", + "Cloud": "Nuvolosità", + "Visibility": "Visibilità", + "Conditions here": "Condizioni qui", + "feels {n}°": "percepita {n}°", + "Reading conditions here…": "Lettura delle condizioni qui…", + "No weather reading here.": "Nessun dato meteo qui.", + "Local solar time": "Ora solare locale", + "Nearby radius": "Raggio vicino", + "How far out the nearby lists look": "Fin dove arrivano gli elenchi vicini", + "Hazards within {radius}": "Pericoli entro {radius}", + "Turns the layer on": "Attiva il livello", + "No earthquakes, tropical storms or wildfires reported within {radius}.": "Nessun terremoto, tempesta tropicale o incendio boschivo segnalato entro {radius}.", + "Broadcast alerts within {radius}": "Allerte trasmesse entro {radius}", + "Also within {radius}": "Anche entro {radius}", + "Local news": "Notizie locali", + "Sundial · {time} solar · sun {deg}° {dir}": "Meridiana · {time} solari · sole a {deg}° {dir}", + "Sundial · {time} solar · sun below the horizon": "Meridiana · {time} solari · sole sotto l’orizzonte", + "{count} things": { + "one": "{count} elemento", + "many": "{count} di elementi", + "other": "{count} elementi" + }, + "{count} layers": { + "one": "{count} livello", + "many": "{count} di livelli", + "other": "{count} livelli" + }, + "{things} in view from {layers}": "{things} in vista da {layers}", + "{n} km up": "a {n} km di quota", + "{n} m up": "a {n} m di quota", + "This view": "Questa vista", + "Day": "Giorno", + "Twilight": "Crepuscolo", + "Night": "Notte", + "Daylight": "Luce diurna", + "sun {n}°": "sole {n}°", + "Of {n} read, {total} loaded": "Su {n} letti, {total} caricati", + "Of all {n}": "Su tutti i {n}", + "Of {n} in view": "Su {n} in vista", + "Error": "Errore", + "Stale": "Non aggiornato", + "In view": "In vista", + "Globe view": "Vista globo", + "Nothing selected": "Nessuna selezione", + "Worldwide now": "Nel mondo ora", + "Turn on {name}": "Attiva {name}", + "{n} loaded": "{n} caricati", + "{n} in view": "{n} in vista", + "Turn off {name}": "Disattiva {name}", + "Camera height": "Altezza della camera", + "Nothing in view matches “{text}”.": "Niente in vista corrisponde a “{text}”.", + "Nothing from the layers that are on is in view here. Zoom out to see more.": "Niente dei livelli attivi è in vista qui. Riduci lo zoom per vedere di più.", + "No loaded layer has anything in view. Turn some on in Data Layers.": "Nessun livello caricato ha qualcosa in vista. Attivane alcuni in Livelli dati.", + "Places in view": "Luoghi in vista", + "Show here": "Mostra qui", + "Ask GEV what's here": "Chiedi a GEV cosa c’è qui", + "aircraft": "aeromobile", + "vessel": "nave", + "launch": "lancio", + "fire": "incendio", + "Fire detection": "Rilevamento di fuoco", + "fire perimeter": "perimetro dell’incendio", + "earthquake": "terremoto", + "storm": "tempesta", + "air quality station": "stazione della qualità dell’aria", + "installation": "installazione", + "dam": "diga", + "data centre": "data center", + "place": "luogo", + "vehicle": "veicolo", + "bike station": "stazione bici", + "plate reader": "lettore di targhe", + "camera": "telecamera", + "airspace": "spazio aereo", + "sighting": "avvistamento", + "Callsign": "Nominativo", + "Registration": "Marche", + "Aircraft class": "Classe di aeromobile", + "Course": "Rotta", + "Vertical rate": "Velocità verticale", + "Squawk": "Squawk", + "Emergency": "Emergenza", + "Last contact": "Ultimo contatto", + "Ship type": "Tipo di nave", + "Destination": "Destinazione", + "Depth": "Profondità", + "Time": "Ora", + "Place": "Luogo", + "Fire power": "Potenza del fuoco", + "Satellite": "Satellite", + "Sensor": "Sensore", + "Detected": "Rilevato", + "Contained": "Contenuto", + "Discovered": "Scoperto", + "Basin": "Bacino", + "Index": "Indice", + "Health risk": "Rischio per la salute", + "Bikes": "Bici", + "Docks": "Stalli", + "Floor": "Limite inferiore", + "Ceiling": "Limite superiore", + "Active": "Attivo", + "NORAD ID": "ID NORAD", + "MMSI": "MMSI", + "ICAO24": "ICAO24", + "Capacity": "Capacità", + "Output": "Produzione", + "River": "Fiume", + "City": "Città", + "State": "Stato", + "Street": "Via", + "Opened": "Aperto", + "Height": "Altezza", + "IT load": "Carico IT", + "Waterway": "Corso d’acqua", + "Military": "Militare", + "Land use": "Uso del suolo", + "Telecom": "Telecomunicazioni", + "feature": "elemento", + "Empty": "Vuoto", + "Many seats free": "Molti posti liberi", + "Few seats free": "Pochi posti liberi", + "Standing room only": "Solo posti in piedi", + "Crowded": "Affollato", + "Not taking passengers": "Non accetta passeggeri", + "Major hurricane": "Uragano maggiore", + "Typhoon": "Tifone", + "Super typhoon": "Supertifone", + "Tropical cyclone": "Ciclone tropicale", + "Prescribed burn": "Fuoco prescritto", + "Atlantic": "Atlantico", + "Eastern Pacific": "Pacifico orientale", + "Central Pacific": "Pacifico centrale", + "Western Pacific": "Pacifico occidentale", + "Indian Ocean": "Oceano Indiano", + "Southern Hemisphere": "Emisfero australe", + "Cable tram": "Tram a fune", + "Aerial lift": "Funivia", + "Fishing": "Pesca", + "Tug": "Rimorchiatore", + "Sailing": "Vela", + "Pleasure craft": "Diporto", + "Pilot vessel": "Pilotina", + "Search and rescue": "Ricerca e soccorso", + "Law enforcement": "Forze dell’ordine", + "High-speed craft": "Unità veloce", + "Passenger": "Passeggeri", + "Cargo": "Mercantile", + "Tanker": "Petroliera", + "Yes": "Sì", + "{n} ft": "{n} ft", + "{n} km/s": "{n} km/s", + "{n} km/h": "{n} km/h", + "{n} kt": "{n} kn", + "{n} ft/min": "{n} ft/min", + "{n}°": "{n}°", + "M {n}": "M {n}", + "{n} MW": "{n} MW", + "{n}%": "{n}%", + "{n} hPa": "{n} hPa", + "Hijack (squawk 7500)": "Dirottamento (squawk 7500)", + "Radio failure (squawk 7600)": "Avaria radio (squawk 7600)", + "Emergency (squawk 7700)": "Emergenza (squawk 7700)", + "Emergency: {kind}": "Emergenza: {kind}", + "Emergency declared": "Emergenza dichiarata", + "Tsunami warning issued": "Allerta tsunami emessa", + "VFR, no flight plan": "VFR, senza piano di volo", + "VFR conspicuity": "Codice VFR di cospicuità", + "IFR, no code yet": "IFR, codice non ancora assegnato", + "Hijack": "Dirottamento", + "Climbing {n} ft/min": "In salita a {n} ft/min", + "Descending {n} ft/min": "In discesa a {n} ft/min", + "Cruising, level": "Crociera, livellato", + "Airliners": "Aerei di linea", + "Widebodies": "Aerei a fusoliera larga", + "Business jets": "Business jet", + "Helicopters": "Elicotteri", + "Turboprops": "Turboelica", + "Fast jets": "Jet veloci", + "Four-engine jets": "Quadrimotori", + "M6 and above": "M6 e oltre", + "M5 to 6": "Da M5 a 6", + "M4 to 5": "Da M4 a 5", + "Below M4": "Sotto M4", + "{kind} {name}": "{kind} {name}", + "place|Country": "Paese", + "altitude|Level": "Stabile", + "{h} h {m} min": "{h} h {m} min", + "{n} min": "{n} min", + "{speed} {direction}": "{speed} da {direction}", + "{n} mm": "{n} mm" } diff --git a/src/i18n/locales/ja.json b/src/i18n/locales/ja.json index 66cbf58cb..e21c8b56e 100644 --- a/src/i18n/locales/ja.json +++ b/src/i18n/locales/ja.json @@ -3713,5 +3713,285 @@ "A visualization of the 26 August 2026 Bhote Koshi outburst flood, not an official hazard model. The historical (2021) and post-event views are Vantor WorldView imagery; the river’s path is GeoPera’s reconstruction. Witness clips link to their original posts, and their capture times are unverified.": "2026年8月26日の Bhote Koshi 決壊洪水の可視化であり、公式のハザードモデルではありません。過去 (2021年) と事後の画像は Vantor WorldView の画像で、川の経路は GeoPera による再現です。目撃者の動画は元の投稿にリンクしており、撮影時刻は検証されていません。", "That story is not available here": "そのストーリーはここでは利用できません", "DRAFT": "下書き", - "A draft, not saved as a story yet. Use SAVE TO STORIES in AUTHORING to save it.": "まだストーリーとして保存されていない下書きです。シーン作成の「STORIESに保存」で保存できます。" + "A draft, not saved as a story yet. Use SAVE TO STORIES in AUTHORING to save it.": "まだストーリーとして保存されていない下書きです。シーン作成の「STORIESに保存」で保存できます。", + "Heading to next stop": "次の停留所へ向かう", + "Arriving at a stop": "停留所に到着中", + "Stopped at a stop": "停留所に停車中", + "Wikipedia": "ウィキペディア", + "Wikidata": "ウィキデータ", + "Website": "ウェブサイト", + "Phase": "フェーズ", + "Flight level": "フライトレベル", + "Mach": "マッハ", + "Squawk {code}": "スコーク {code}", + "Signal": "信号", + "Civilian, in the air": "民間機・飛行中", + "Military, in the air": "軍用機・飛行中", + "On the ground": "地上", + "Motion": "動き", + "Operator": "運行会社", + "Last reported": "最終報告", + "Crowding": "混雑", + "Class": "種別", + "Magnitude": "マグニチュード", + "Labels": "ラベル", + "3D aircraft": "3D航空機", + "M{mag} earthquake": "M{mag}の地震", + "Earthquake": "地震", + "{n} kt winds": "風速{n}ノット", + "Wildfire": "山火事", + "{n} acres": "{n}エーカー", + "{n}% contained": "鎮圧率{n}%", + "prescribed burn": "計画的野焼き", + "{count} satellite fire hits": { + "other": "衛星による火災検知{count}件" + }, + "last day": "過去1日", + "Conditions unknown": "天候不明", + "Partly cloudy": "晴れ時々曇り", + "Overcast": "曇り", + "Fog": "霧", + "Drizzle": "霧雨", + "Rain": "雨", + "Snow": "雪", + "Rain showers": "にわか雨", + "Snow showers": "にわか雪", + "Thunderstorm": "雷雨", + "Mixed conditions": "不安定な天気", + "Search {name} and nearby": "{name}と周辺を検索", + "Search what is in view": "表示中のものを検索", + "Close Context search": "コンテキスト検索を閉じる", + "Search in Context": "コンテキスト内を検索", + "Close search": "検索を閉じる", + "Shrink Context back to a panel": "コンテキストをパネルに戻す", + "Expand Context to a full-height column": "コンテキストを全高の列に広げる", + "Context tabs": "コンテキストのタブ", + "Inspector": "インスペクター", + "Properties": "プロパティ", + "Level": "レベル", + "Last {n} min": "過去{n}分", + "Just now": "たった今", + "Since selected": "選択以降", + "Altitude": "高度", + "Heading": "方位", + "Field of view": "画角", + "Camera frame": "カメラ画像", + "Acquiring frame…": "画像を取得中…", + "Show a bigger view": "大きく表示", + "Camera view": "カメラ映像", + "More info": "詳細情報", + "{n} s ago": "{n}秒前", + "{n} min ago": "{n}分前", + "{n} h ago": "{n}時間前", + "{n} d ago": "{n}日前", + "Out of feed · last reading": "フィード外・最終データ", + "Live · {age}": "ライブ・{age}", + "{n} m": "{n} m", + "{n} km": "{n} km", + "updated {age}": "{age}に更新", + "Selected on the map": "地図上で選択中", + "Close card": "カードを閉じる", + "{n}% flown": "{n}%飛行済み", + "to go": "残り", + "The scheduled route for this flight number does not match where the plane is; it may be another leg of the same flight.": "この便名の予定ルートは機体の位置と一致しません。同じ便の別区間かもしれません。", + "Scheduled · unverified: does not match where the plane is": "予定・未確認:機体の位置と一致しません", + "Nothing in this item’s details matches “{text}”.": "この項目の詳細に「{text}」に一致するものはありません。", + "Matching details": "一致する詳細", + "Enter orbital view": "軌道ビューに入る", + "Enter Cockpit": "コックピットに入る", + "Fly to": "移動", + "Following": "追従中", + "Follow": "追従", + "Ask GEV about {name}": "{name}についてGEVに質問", + "Flights within {radius}": "{radius}以内のフライト", + "No flights within {radius} from the layers that are on.": "オンのレイヤーには{radius}以内のフライトがありません。", + "Vessels within {radius}": "{radius}以内の船舶", + "No vessels within {radius} from the layers that are on.": "オンのレイヤーには{radius}以内の船舶がありません。", + "Cloud": "雲量", + "Visibility": "視程", + "Conditions here": "この場所の状況", + "feels {n}°": "体感{n}°", + "Reading conditions here…": "この場所の状況を取得中…", + "No weather reading here.": "この場所の気象データはありません。", + "Local solar time": "地方太陽時", + "Nearby radius": "周辺の半径", + "How far out the nearby lists look": "周辺リストの範囲", + "Hazards within {radius}": "{radius}以内の災害", + "Turns the layer on": "レイヤーをオンにします", + "No earthquakes, tropical storms or wildfires reported within {radius}.": "{radius}以内に地震・熱帯低気圧・山火事の報告はありません。", + "Broadcast alerts within {radius}": "{radius}以内の発信された警報", + "Also within {radius}": "ほかに{radius}以内", + "Local news": "地元ニュース", + "Sundial · {time} solar · sun {deg}° {dir}": "日時計・太陽時{time}・太陽{deg}° {dir}", + "Sundial · {time} solar · sun below the horizon": "日時計・太陽時{time}・太陽は地平線の下", + "{count} things": { + "other": "{count}件" + }, + "{count} layers": { + "other": "{count}レイヤー" + }, + "{things} in view from {layers}": "{layers}から{things}を表示中", + "{n} km up": "高度{n} km", + "{n} m up": "高度{n} m", + "This view": "この表示", + "Day": "昼", + "Twilight": "薄明", + "Night": "夜", + "Daylight": "日照", + "sun {n}°": "太陽{n}°", + "Of {n} read, {total} loaded": "読み込み{n}件中、{total}件をロード", + "Of all {n}": "全{n}件中", + "Of {n} in view": "表示中の{n}件中", + "Error": "エラー", + "Stale": "更新遅延", + "In view": "表示中", + "Globe view": "地球全体", + "Nothing selected": "何も選択されていません", + "Worldwide now": "現在の世界", + "Turn on {name}": "{name}をオン", + "{n} loaded": "{n}件ロード", + "{n} in view": "{n}件表示中", + "Turn off {name}": "{name}をオフ", + "Camera height": "カメラの高度", + "Nothing in view matches “{text}”.": "表示中に「{text}」に一致するものはありません。", + "Nothing from the layers that are on is in view here. Zoom out to see more.": "オンのレイヤーにはここに表示できるものがありません。ズームアウトしてください。", + "No loaded layer has anything in view. Turn some on in Data Layers.": "ロード済みのレイヤーに表示中のものはありません。データレイヤーでオンにしてください。", + "Places in view": "表示中の地名", + "Show here": "ここに表示", + "Ask GEV what's here": "ここに何があるかGEVに質問", + "aircraft": "航空機", + "vessel": "船舶", + "launch": "打ち上げ", + "fire": "火災", + "Fire detection": "火災検知", + "fire perimeter": "火災範囲", + "earthquake": "地震", + "storm": "嵐", + "air quality station": "大気質測定局", + "installation": "施設", + "dam": "ダム", + "data centre": "データセンター", + "place": "場所", + "vehicle": "車両", + "bike station": "自転車ステーション", + "plate reader": "ナンバー読取装置", + "camera": "カメラ", + "airspace": "空域", + "sighting": "目撃", + "Callsign": "コールサイン", + "Registration": "登録記号", + "Aircraft class": "機種区分", + "Course": "針路", + "Vertical rate": "昇降率", + "Squawk": "スコーク", + "Emergency": "緊急", + "Last contact": "最終受信", + "Ship type": "船種", + "Destination": "目的地", + "Depth": "深さ", + "Time": "時刻", + "Place": "場所", + "Fire power": "火災放射強度", + "Satellite": "衛星", + "Sensor": "センサー", + "Detected": "検知", + "Contained": "鎮圧率", + "Discovered": "発見", + "Basin": "海域", + "Index": "指数", + "Health risk": "健康リスク", + "Bikes": "自転車", + "Docks": "ドック", + "Floor": "下限", + "Ceiling": "上限", + "Active": "有効時間", + "NORAD ID": "NORAD ID", + "MMSI": "MMSI", + "ICAO24": "ICAO24", + "Capacity": "容量", + "Output": "出力", + "River": "河川", + "City": "市区町村", + "State": "州", + "Street": "通り", + "Opened": "開業", + "Height": "高さ", + "IT load": "ITロード", + "Waterway": "水路", + "Military": "軍用", + "Land use": "土地利用", + "Telecom": "通信", + "feature": "地物", + "Empty": "空車", + "Many seats free": "空席多数", + "Few seats free": "空席わずか", + "Standing room only": "立席のみ", + "Crowded": "混雑", + "Not taking passengers": "乗車不可", + "Major hurricane": "大型ハリケーン", + "Typhoon": "台風", + "Super typhoon": "スーパー台風", + "Tropical cyclone": "熱帯低気圧", + "Prescribed burn": "計画的野焼き", + "Atlantic": "大西洋", + "Eastern Pacific": "東太平洋", + "Central Pacific": "中部太平洋", + "Western Pacific": "西太平洋", + "Indian Ocean": "インド洋", + "Southern Hemisphere": "南半球", + "Cable tram": "ケーブルカー", + "Aerial lift": "ロープウェイ", + "Fishing": "漁船", + "Tug": "タグボート", + "Sailing": "帆船", + "Pleasure craft": "プレジャーボート", + "Pilot vessel": "水先船", + "Search and rescue": "捜索救難", + "Law enforcement": "法執行機関", + "High-speed craft": "高速船", + "Passenger": "旅客船", + "Cargo": "貨物船", + "Tanker": "タンカー", + "Yes": "はい", + "{n} ft": "{n} ft", + "{n} km/s": "{n} km/s", + "{n} km/h": "{n} km/h", + "{n} kt": "{n} kt", + "{n} ft/min": "{n} ft/min", + "{n}°": "{n}°", + "M {n}": "M {n}", + "{n} MW": "{n} MW", + "{n}%": "{n}%", + "{n} hPa": "{n} hPa", + "Hijack (squawk 7500)": "ハイジャック(スコーク7500)", + "Radio failure (squawk 7600)": "無線故障(スコーク7600)", + "Emergency (squawk 7700)": "緊急事態(スコーク7700)", + "Emergency: {kind}": "緊急:{kind}", + "Emergency declared": "緊急事態宣言", + "Tsunami warning issued": "津波警報発表", + "VFR, no flight plan": "VFR・飛行計画なし", + "VFR conspicuity": "VFR視認用コード", + "IFR, no code yet": "IFR・コード未割当", + "Hijack": "ハイジャック", + "Climbing {n} ft/min": "上昇中 {n} ft/min", + "Descending {n} ft/min": "降下中 {n} ft/min", + "Cruising, level": "巡航・水平飛行", + "Airliners": "旅客機", + "Widebodies": "ワイドボディ機", + "Business jets": "ビジネスジェット", + "Helicopters": "ヘリコプター", + "Turboprops": "ターボプロップ機", + "Fast jets": "高速ジェット機", + "Four-engine jets": "4発ジェット機", + "M6 and above": "M6以上", + "M5 to 6": "M5〜6", + "M4 to 5": "M4〜5", + "Below M4": "M4未満", + "{kind} {name}": "{kind}{name}", + "place|Country": "国", + "altitude|Level": "水平", + "{h} h {m} min": "{h}時間{m}分", + "{n} min": "{n}分", + "{speed} {direction}": "{direction}の風 {speed}", + "{n} mm": "{n} mm" } diff --git a/src/i18n/locales/pt.json b/src/i18n/locales/pt.json index 9d3453ce8..1251650c6 100644 --- a/src/i18n/locales/pt.json +++ b/src/i18n/locales/pt.json @@ -3761,7 +3761,7 @@ "Filters": "Filtros", "Search stories": "Buscar histórias", "Search stories, places, creators": "Buscar histórias, lugares, criadores", - "Clear search": "Limpar busca", + "Clear search": "Limpar pesquisa", "Topics": "Temas", "Filter stories": "Filtrar histórias", "Show {count} stories": { @@ -3893,5 +3893,291 @@ "A visualization of the 26 August 2026 Bhote Koshi outburst flood, not an official hazard model. The historical (2021) and post-event views are Vantor WorldView imagery; the river’s path is GeoPera’s reconstruction. Witness clips link to their original posts, and their capture times are unverified.": "Uma visualização da inundação por rompimento do Bhote Koshi de 26 de agosto de 2026, não um modelo oficial de risco. As vistas históricas (2021) e pós-evento são imagens Vantor WorldView; o trajeto do rio é a reconstrução da GeoPera. Os vídeos de testemunhas levam às publicações originais, e os horários de captura não foram verificados.", "That story is not available here": "Essa história não está disponível aqui", "DRAFT": "RASCUNHO", - "A draft, not saved as a story yet. Use SAVE TO STORIES in AUTHORING to save it.": "Um rascunho, ainda não salvo como história. Use SALVAR EM STORIES em CRIAÇÃO para salvá-lo." + "A draft, not saved as a story yet. Use SAVE TO STORIES in AUTHORING to save it.": "Um rascunho, ainda não salvo como história. Use SALVAR EM STORIES em CRIAÇÃO para salvá-lo.", + "Heading to next stop": "A caminho da próxima parada", + "Arriving at a stop": "Chegando a uma parada", + "Stopped at a stop": "Parado em uma parada", + "Wikipedia": "Wikipédia", + "Wikidata": "Wikidata", + "Website": "Site", + "Phase": "Fase", + "Flight level": "Nível de voo", + "Mach": "Mach", + "Squawk {code}": "Squawk {code}", + "Signal": "Sinal", + "Civilian, in the air": "Civis, em voo", + "Military, in the air": "Militares, em voo", + "On the ground": "No solo", + "Motion": "Movimento", + "Operator": "Operadora", + "Last reported": "Último relato", + "Crowding": "Lotação", + "Class": "Classe", + "Magnitude": "Magnitude", + "Labels": "Rótulos", + "3D aircraft": "Aeronaves 3D", + "M{mag} earthquake": "Terremoto de magnitude {mag}", + "Earthquake": "Terremoto", + "{n} kt winds": "Ventos de {n} nós", + "Wildfire": "Incêndio florestal", + "{n} acres": "{n} acres", + "{n}% contained": "{n}% contido", + "prescribed burn": "queima prescrita", + "{count} satellite fire hits": { + "one": "{count} detecção de fogo por satélite", + "many": "{count} de detecções de fogo por satélite", + "other": "{count} detecções de fogo por satélite" + }, + "last day": "último dia", + "Conditions unknown": "Condições desconhecidas", + "Partly cloudy": "Parcialmente nublado", + "Overcast": "Encoberto", + "Fog": "Nevoeiro", + "Drizzle": "Garoa", + "Rain": "Chuva", + "Snow": "Neve", + "Rain showers": "Pancadas de chuva", + "Snow showers": "Pancadas de neve", + "Thunderstorm": "Trovoada", + "Mixed conditions": "Condições variáveis", + "Search {name} and nearby": "Pesquisar em {name} e arredores", + "Search what is in view": "Pesquisar o que está à vista", + "Close Context search": "Fechar a pesquisa no Contexto", + "Search in Context": "Pesquisar no Contexto", + "Close search": "Fechar pesquisa", + "Shrink Context back to a panel": "Reduzir o Contexto a um painel", + "Expand Context to a full-height column": "Expandir o Contexto para uma coluna de altura total", + "Context tabs": "Abas do Contexto", + "Inspector": "Inspetor", + "Properties": "Propriedades", + "Level": "Nível", + "Last {n} min": "Últimos {n} min", + "Just now": "Agora mesmo", + "Since selected": "Desde a seleção", + "Altitude": "Altitude", + "Heading": "Rumo", + "Field of view": "Campo de visão", + "Camera frame": "Imagem da câmera", + "Acquiring frame…": "Obtendo imagem…", + "Show a bigger view": "Ver maior", + "Camera view": "Vista da câmera", + "More info": "Mais informações", + "{n} s ago": "há {n} s", + "{n} min ago": "há {n} min", + "{n} h ago": "há {n} h", + "{n} d ago": "há {n} d", + "Out of feed · last reading": "Fora do feed · última leitura", + "Live · {age}": "Ao vivo · {age}", + "{n} m": "{n} m", + "{n} km": "{n} km", + "updated {age}": "atualizado {age}", + "Selected on the map": "Selecionado no mapa", + "Close card": "Fechar cartão", + "{n}% flown": "{n}% percorrido", + "to go": "restantes", + "The scheduled route for this flight number does not match where the plane is; it may be another leg of the same flight.": "A rota programada deste número de voo não corresponde à posição do avião; pode ser outro trecho do mesmo voo.", + "Scheduled · unverified: does not match where the plane is": "Programado · não verificado: não corresponde à posição do avião", + "Nothing in this item’s details matches “{text}”.": "Nada nos detalhes deste item corresponde a “{text}”.", + "Matching details": "Detalhes correspondentes", + "Enter orbital view": "Entrar na vista orbital", + "Enter Cockpit": "Entrar na cabine", + "Fly to": "Voar até", + "Following": "Seguindo", + "Follow": "Seguir", + "Ask GEV about {name}": "Perguntar ao GEV sobre {name}", + "Flights within {radius}": "Voos em até {radius}", + "No flights within {radius} from the layers that are on.": "Nenhum voo em até {radius} nas camadas ativas.", + "Vessels within {radius}": "Embarcações em até {radius}", + "No vessels within {radius} from the layers that are on.": "Nenhuma embarcação em até {radius} nas camadas ativas.", + "Cloud": "Nebulosidade", + "Visibility": "Visibilidade", + "Conditions here": "Condições aqui", + "feels {n}°": "sensação {n}°", + "Reading conditions here…": "Lendo as condições aqui…", + "No weather reading here.": "Sem dados do tempo aqui.", + "Local solar time": "Hora solar local", + "Nearby radius": "Raio próximo", + "How far out the nearby lists look": "Até onde as listas próximas alcançam", + "Hazards within {radius}": "Riscos em até {radius}", + "Turns the layer on": "Ativa a camada", + "No earthquakes, tropical storms or wildfires reported within {radius}.": "Nenhum terremoto, tempestade tropical ou incêndio florestal relatado em até {radius}.", + "Broadcast alerts within {radius}": "Alertas transmitidos em até {radius}", + "Also within {radius}": "Também em até {radius}", + "Local news": "Notícias locais", + "Sundial · {time} solar · sun {deg}° {dir}": "Relógio de sol · {time} solar · sol a {deg}° {dir}", + "Sundial · {time} solar · sun below the horizon": "Relógio de sol · {time} solar · sol abaixo do horizonte", + "{count} things": { + "one": "{count} item", + "many": "{count} de itens", + "other": "{count} itens" + }, + "{count} layers": { + "one": "{count} camada", + "many": "{count} de camadas", + "other": "{count} camadas" + }, + "{things} in view from {layers}": "{things} à vista de {layers}", + "{n} km up": "a {n} km de altura", + "{n} m up": "a {n} m de altura", + "This view": "Esta vista", + "Day": "Dia", + "Twilight": "Crepúsculo", + "Night": "Noite", + "Daylight": "Luz do dia", + "sun {n}°": "sol {n}°", + "Of {n} read, {total} loaded": "De {n} lidos, {total} carregados", + "Of all {n}": "De todos os {n}", + "Of {n} in view": "De {n} à vista", + "Error": "Erro", + "Stale": "Desatualizado", + "In view": "À vista", + "Globe view": "Vista do globo", + "Nothing selected": "Nada selecionado", + "Worldwide now": "No mundo agora", + "Turn on {name}": "Ativar {name}", + "{n} loaded": "{n} carregados", + "{n} in view": "{n} à vista", + "Turn off {name}": "Desativar {name}", + "Camera height": "Altura da câmera", + "Nothing in view matches “{text}”.": "Nada à vista corresponde a “{text}”.", + "Nothing from the layers that are on is in view here. Zoom out to see more.": "Nada das camadas ativas está à vista aqui. Afaste o zoom para ver mais.", + "No loaded layer has anything in view. Turn some on in Data Layers.": "Nenhuma camada carregada tem algo à vista. Ative algumas em Camadas de dados.", + "Places in view": "Lugares à vista", + "Show here": "Mostrar aqui", + "Ask GEV what's here": "Perguntar ao GEV o que há aqui", + "aircraft": "aeronave", + "vessel": "embarcação", + "launch": "lançamento", + "fire": "incêndio", + "Fire detection": "Detecção de fogo", + "fire perimeter": "perímetro de incêndio", + "earthquake": "terremoto", + "storm": "tempestade", + "air quality station": "estação de qualidade do ar", + "installation": "instalação", + "dam": "barragem", + "data centre": "data center", + "place": "local", + "vehicle": "veículo", + "bike station": "estação de bicicletas", + "plate reader": "leitor de placas", + "camera": "câmera", + "airspace": "espaço aéreo", + "sighting": "avistamento", + "Callsign": "Indicativo", + "Registration": "Matrícula", + "Aircraft class": "Classe da aeronave", + "Course": "Rumo", + "Vertical rate": "Razão vertical", + "Squawk": "Squawk", + "Emergency": "Emergência", + "Last contact": "Último contato", + "Ship type": "Tipo de embarcação", + "Destination": "Destino", + "Depth": "Profundidade", + "Time": "Hora", + "Place": "Local", + "Fire power": "Potência do fogo", + "Satellite": "Satélite", + "Sensor": "Sensor", + "Detected": "Detectado", + "Contained": "Contido", + "Discovered": "Descoberto", + "Basin": "Bacia", + "Index": "Índice", + "Health risk": "Risco à saúde", + "Bikes": "Bicicletas", + "Docks": "Vagas", + "Floor": "Limite inferior", + "Ceiling": "Limite superior", + "Active": "Ativo", + "NORAD ID": "ID NORAD", + "MMSI": "MMSI", + "ICAO24": "ICAO24", + "Capacity": "Capacidade", + "Output": "Produção", + "River": "Rio", + "City": "Cidade", + "State": "Estado", + "Street": "Rua", + "Opened": "Inaugurado", + "Height": "Altura", + "IT load": "Carga de TI", + "Waterway": "Hidrovia", + "Military": "Militar", + "Land use": "Uso do solo", + "Telecom": "Telecomunicações", + "feature": "elemento", + "Empty": "Vazio", + "Many seats free": "Muitos lugares livres", + "Few seats free": "Poucos lugares livres", + "Standing room only": "Só em pé", + "Crowded": "Lotado", + "Not taking passengers": "Não aceita passageiros", + "Major hurricane": "Furacão de grande intensidade", + "Typhoon": "Tufão", + "Super typhoon": "Supertufão", + "Tropical cyclone": "Ciclone tropical", + "Prescribed burn": "Queima prescrita", + "Atlantic": "Atlântico", + "Eastern Pacific": "Pacífico Oriental", + "Central Pacific": "Pacífico Central", + "Western Pacific": "Pacífico Ocidental", + "Indian Ocean": "Oceano Índico", + "Southern Hemisphere": "Hemisfério Sul", + "Cable tram": "Bonde a cabo", + "Aerial lift": "Teleférico", + "Fishing": "Pesca", + "Tug": "Rebocador", + "Sailing": "Veleiro", + "Pleasure craft": "Embarcação de recreio", + "Pilot vessel": "Embarcação de praticagem", + "Search and rescue": "Busca e salvamento", + "Law enforcement": "Fiscalização", + "High-speed craft": "Embarcação de alta velocidade", + "Passenger": "Passageiros", + "Cargo": "Carga", + "Tanker": "Petroleiro", + "Yes": "Sim", + "{n} ft": "{n} ft", + "{n} km/s": "{n} km/s", + "{n} km/h": "{n} km/h", + "{n} kt": "{n} kt", + "{n} ft/min": "{n} ft/min", + "{n}°": "{n}°", + "M {n}": "M {n}", + "{n} MW": "{n} MW", + "{n}%": "{n}%", + "{n} hPa": "{n} hPa", + "Hijack (squawk 7500)": "Sequestro (squawk 7500)", + "Radio failure (squawk 7600)": "Falha de rádio (squawk 7600)", + "Emergency (squawk 7700)": "Emergência (squawk 7700)", + "Emergency: {kind}": "Emergência: {kind}", + "Emergency declared": "Emergência declarada", + "Tsunami warning issued": "Alerta de tsunami emitido", + "VFR, no flight plan": "VFR, sem plano de voo", + "VFR conspicuity": "Código VFR de visibilidade", + "IFR, no code yet": "IFR, ainda sem código", + "Hijack": "Sequestro", + "Climbing {n} ft/min": "Subindo a {n} ft/min", + "Descending {n} ft/min": "Descendo a {n} ft/min", + "Cruising, level": "Cruzeiro, nivelado", + "Airliners": "Aviões comerciais", + "Widebodies": "Aviões de fuselagem larga", + "Business jets": "Jatos executivos", + "Helicopters": "Helicópteros", + "Turboprops": "Turboélices", + "Fast jets": "Jatos rápidos", + "Four-engine jets": "Quadrimotores", + "M6 and above": "M6 ou mais", + "M5 to 6": "M5 a 6", + "M4 to 5": "M4 a 5", + "Below M4": "Abaixo de M4", + "{kind} {name}": "{kind} {name}", + "place|Country": "País", + "altitude|Level": "Nivelado", + "{h} h {m} min": "{h} h {m} min", + "{n} min": "{n} min", + "{speed} {direction}": "{speed} de {direction}", + "{n} mm": "{n} mm" } diff --git a/src/i18n/locales/ru.json b/src/i18n/locales/ru.json index 77bf690fc..320d079d2 100644 --- a/src/i18n/locales/ru.json +++ b/src/i18n/locales/ru.json @@ -3983,5 +3983,294 @@ "A visualization of the 26 August 2026 Bhote Koshi outburst flood, not an official hazard model. The historical (2021) and post-event views are Vantor WorldView imagery; the river’s path is GeoPera’s reconstruction. Witness clips link to their original posts, and their capture times are unverified.": "Визуализация прорывного паводка на Bhote Koshi 26 августа 2026 года, а не официальная модель опасности. Архивные виды (2021) и виды после события — снимки Vantor WorldView; путь реки — реконструкция GeoPera. Ролики очевидцев ведут на исходные публикации, время их съёмки не проверено.", "That story is not available here": "Эта история здесь недоступна", "DRAFT": "ЧЕРНОВИК", - "A draft, not saved as a story yet. Use SAVE TO STORIES in AUTHORING to save it.": "Черновик, ещё не сохранённый как история. Нажмите «СОХРАНИТЬ В STORIES» в разделе РЕДАКТОР, чтобы сохранить его." + "A draft, not saved as a story yet. Use SAVE TO STORIES in AUTHORING to save it.": "Черновик, ещё не сохранённый как история. Нажмите «СОХРАНИТЬ В STORIES» в разделе РЕДАКТОР, чтобы сохранить его.", + "Heading to next stop": "Едет к следующей остановке", + "Arriving at a stop": "Подъезжает к остановке", + "Stopped at a stop": "Стоит на остановке", + "Wikipedia": "Википедия", + "Wikidata": "Викиданные", + "Website": "Сайт", + "Phase": "Фаза", + "Flight level": "Эшелон", + "Mach": "Мах", + "Squawk {code}": "Сквок {code}", + "Signal": "Сигнал", + "Civilian, in the air": "Гражданские, в воздухе", + "Military, in the air": "Военные, в воздухе", + "On the ground": "На земле", + "Motion": "Движение", + "Operator": "Оператор", + "Last reported": "Последний отчёт", + "Crowding": "Заполненность", + "Class": "Класс", + "Magnitude": "Магнитуда", + "Labels": "Подписи", + "3D aircraft": "Самолёты в 3D", + "M{mag} earthquake": "Землетрясение M{mag}", + "Earthquake": "Землетрясение", + "{n} kt winds": "Ветер {n} уз.", + "Wildfire": "Лесной пожар", + "{n} acres": "{n} акров", + "{n}% contained": "Локализован на {n}%", + "prescribed burn": "контролируемый пал", + "{count} satellite fire hits": { + "one": "{count} спутниковое обнаружение пожара", + "few": "{count} спутниковых обнаружения пожара", + "many": "{count} спутниковых обнаружений пожара", + "other": "{count} спутникового обнаружения пожара" + }, + "last day": "за сутки", + "Conditions unknown": "Погода неизвестна", + "Partly cloudy": "Переменная облачность", + "Overcast": "Пасмурно", + "Fog": "Туман", + "Drizzle": "Морось", + "Rain": "Дождь", + "Snow": "Снег", + "Rain showers": "Ливни", + "Snow showers": "Снегопад", + "Thunderstorm": "Гроза", + "Mixed conditions": "Переменная погода", + "Search {name} and nearby": "Поиск: {name} и рядом", + "Search what is in view": "Поиск по видимому", + "Close Context search": "Закрыть поиск в контексте", + "Search in Context": "Поиск в контексте", + "Close search": "Закрыть поиск", + "Shrink Context back to a panel": "Свернуть контекст в панель", + "Expand Context to a full-height column": "Развернуть контекст во всю высоту", + "Context tabs": "Вкладки контекста", + "Inspector": "Инспектор", + "Properties": "Свойства", + "Level": "Уровень", + "Last {n} min": "За {n} мин", + "Just now": "Только что", + "Since selected": "С момента выбора", + "Altitude": "Высота", + "Heading": "Курс", + "Field of view": "Поле зрения", + "Camera frame": "Кадр камеры", + "Acquiring frame…": "Получение кадра…", + "Show a bigger view": "Показать крупнее", + "Camera view": "Вид с камеры", + "More info": "Подробнее", + "{n} s ago": "{n} с назад", + "{n} min ago": "{n} мин назад", + "{n} h ago": "{n} ч назад", + "{n} d ago": "{n} дн. назад", + "Out of feed · last reading": "Нет в потоке · последние данные", + "Live · {age}": "Сейчас · {age}", + "{n} m": "{n} м", + "{n} km": "{n} км", + "updated {age}": "обновлено {age}", + "Selected on the map": "Выбрано на карте", + "Close card": "Закрыть карточку", + "{n}% flown": "Пройдено {n}%", + "to go": "осталось", + "The scheduled route for this flight number does not match where the plane is; it may be another leg of the same flight.": "Плановый маршрут этого рейса не совпадает с положением самолёта; возможно, это другой участок того же рейса.", + "Scheduled · unverified: does not match where the plane is": "По расписанию · не подтверждено: не совпадает с положением самолёта", + "Nothing in this item’s details matches “{text}”.": "В сведениях об этом объекте нет «{text}».", + "Matching details": "Совпадающие сведения", + "Enter orbital view": "Войти в орбитальный вид", + "Enter Cockpit": "Войти в кабину", + "Fly to": "Перелететь", + "Following": "Слежение", + "Follow": "Следить", + "Ask GEV about {name}": "Спросить GEV о {name}", + "Flights within {radius}": "Рейсы в радиусе {radius}", + "No flights within {radius} from the layers that are on.": "Во включённых слоях нет рейсов в радиусе {radius}.", + "Vessels within {radius}": "Суда в радиусе {radius}", + "No vessels within {radius} from the layers that are on.": "Во включённых слоях нет судов в радиусе {radius}.", + "Cloud": "Облачность", + "Visibility": "Видимость", + "Conditions here": "Обстановка здесь", + "feels {n}°": "ощущается как {n}°", + "Reading conditions here…": "Получение обстановки…", + "No weather reading here.": "Здесь нет данных о погоде.", + "Local solar time": "Местное солнечное время", + "Nearby radius": "Радиус поблизости", + "How far out the nearby lists look": "Насколько далеко смотрят списки поблизости", + "Hazards within {radius}": "Опасности в радиусе {radius}", + "Turns the layer on": "Включает слой", + "No earthquakes, tropical storms or wildfires reported within {radius}.": "В радиусе {radius} нет сообщений о землетрясениях, тропических штормах или лесных пожарах.", + "Broadcast alerts within {radius}": "Оповещения в радиусе {radius}", + "Also within {radius}": "Также в радиусе {radius}", + "Local news": "Местные новости", + "Sundial · {time} solar · sun {deg}° {dir}": "Солнечные часы · {time} по солнцу · солнце {deg}° {dir}", + "Sundial · {time} solar · sun below the horizon": "Солнечные часы · {time} по солнцу · солнце за горизонтом", + "{count} things": { + "one": "{count} объект", + "few": "{count} объекта", + "many": "{count} объектов", + "other": "{count} объекта" + }, + "{count} layers": { + "one": "{count} слоя", + "few": "{count} слоёв", + "many": "{count} слоёв", + "other": "{count} слоя" + }, + "{things} in view from {layers}": "В поле зрения {things} из {layers}", + "{n} km up": "на высоте {n} км", + "{n} m up": "на высоте {n} м", + "This view": "Этот вид", + "Day": "День", + "Twilight": "Сумерки", + "Night": "Ночь", + "Daylight": "Освещённость", + "sun {n}°": "солнце {n}°", + "Of {n} read, {total} loaded": "Из {n} прочитанных, загружено {total}", + "Of all {n}": "Из всех {n}", + "Of {n} in view": "Из {n} в поле зрения", + "Error": "Ошибка", + "Stale": "Устарело", + "In view": "В поле зрения", + "Globe view": "Вид глобуса", + "Nothing selected": "Ничего не выбрано", + "Worldwide now": "Сейчас в мире", + "Turn on {name}": "Включить {name}", + "{n} loaded": "загружено {n}", + "{n} in view": "{n} в поле зрения", + "Turn off {name}": "Выключить {name}", + "Camera height": "Высота камеры", + "Nothing in view matches “{text}”.": "В поле зрения нет «{text}».", + "Nothing from the layers that are on is in view here. Zoom out to see more.": "Из включённых слоёв здесь ничего не видно. Отдалите карту, чтобы увидеть больше.", + "No loaded layer has anything in view. Turn some on in Data Layers.": "Ни в одном загруженном слое ничего не видно. Включите слои в разделе «Слои данных».", + "Places in view": "Места в поле зрения", + "Show here": "Показать здесь", + "Ask GEV what's here": "Спросить GEV, что здесь", + "aircraft": "воздушное судно", + "vessel": "судно", + "launch": "запуск", + "fire": "пожар", + "Fire detection": "Обнаружение пожара", + "fire perimeter": "контур пожара", + "earthquake": "землетрясение", + "storm": "шторм", + "air quality station": "станция качества воздуха", + "installation": "объект", + "dam": "плотина", + "data centre": "центр обработки данных", + "place": "место", + "vehicle": "транспорт", + "bike station": "велостанция", + "plate reader": "считыватель номеров", + "camera": "камера", + "airspace": "воздушное пространство", + "sighting": "наблюдение", + "Callsign": "Позывной", + "Registration": "Регистрация", + "Aircraft class": "Класс ВС", + "Course": "Курс", + "Vertical rate": "Вертикальная скорость", + "Squawk": "Сквок", + "Emergency": "Чрезвычайная ситуация", + "Last contact": "Последний контакт", + "Ship type": "Тип судна", + "Destination": "Пункт назначения", + "Depth": "Глубина", + "Time": "Время", + "Place": "Место", + "Fire power": "Мощность пожара", + "Satellite": "Спутник", + "Sensor": "Датчик", + "Detected": "Обнаружено", + "Contained": "Локализован", + "Discovered": "Обнаружен", + "Basin": "Бассейн", + "Index": "Индекс", + "Health risk": "Риск для здоровья", + "Bikes": "Велосипеды", + "Docks": "Места", + "Floor": "Нижняя граница", + "Ceiling": "Верхняя граница", + "Active": "Действует", + "NORAD ID": "NORAD ID", + "MMSI": "MMSI", + "ICAO24": "ICAO24", + "Capacity": "Мощность", + "Output": "Выработка", + "River": "Река", + "City": "Город", + "State": "Штат", + "Street": "Улица", + "Opened": "Открыт", + "Height": "Высота", + "IT load": "ИТ-нагрузка", + "Waterway": "Водный путь", + "Military": "Военное", + "Land use": "Землепользование", + "Telecom": "Связь", + "feature": "объект", + "Empty": "Пусто", + "Many seats free": "Много свободных мест", + "Few seats free": "Мало свободных мест", + "Standing room only": "Только стоячие места", + "Crowded": "Переполнено", + "Not taking passengers": "Посадки нет", + "Major hurricane": "Сильный ураган", + "Typhoon": "Тайфун", + "Super typhoon": "Супертайфун", + "Tropical cyclone": "Тропический циклон", + "Prescribed burn": "Контролируемый пал", + "Atlantic": "Атлантика", + "Eastern Pacific": "Восточная часть Тихого океана", + "Central Pacific": "Центральная часть Тихого океана", + "Western Pacific": "Западная часть Тихого океана", + "Indian Ocean": "Индийский океан", + "Southern Hemisphere": "Южное полушарие", + "Cable tram": "Канатный трамвай", + "Aerial lift": "Канатная дорога", + "Fishing": "Рыболовное", + "Tug": "Буксир", + "Sailing": "Парусное", + "Pleasure craft": "Прогулочное", + "Pilot vessel": "Лоцманское", + "Search and rescue": "Поисково-спасательное", + "Law enforcement": "Правоохранительное", + "High-speed craft": "Скоростное", + "Passenger": "Пассажирское", + "Cargo": "Грузовое", + "Tanker": "Танкер", + "Yes": "Да", + "{n} ft": "{n} фт", + "{n} km/s": "{n} км/с", + "{n} km/h": "{n} км/ч", + "{n} kt": "{n} уз", + "{n} ft/min": "{n} фт/мин", + "{n}°": "{n}°", + "M {n}": "M {n}", + "{n} MW": "{n} МВт", + "{n}%": "{n}%", + "{n} hPa": "{n} гПа", + "Hijack (squawk 7500)": "Захват (сквок 7500)", + "Radio failure (squawk 7600)": "Отказ радиосвязи (сквок 7600)", + "Emergency (squawk 7700)": "Бедствие (сквок 7700)", + "Emergency: {kind}": "Чрезвычайная ситуация: {kind}", + "Emergency declared": "Объявлена чрезвычайная ситуация", + "Tsunami warning issued": "Объявлена угроза цунами", + "VFR, no flight plan": "ПВП, без плана полёта", + "VFR conspicuity": "Общий код ПВП", + "IFR, no code yet": "ППП, код ещё не назначен", + "Hijack": "Захват", + "Climbing {n} ft/min": "Набор высоты {n} фт/мин", + "Descending {n} ft/min": "Снижение {n} фт/мин", + "Cruising, level": "Крейсерский полёт", + "Airliners": "Авиалайнеры", + "Widebodies": "Широкофюзеляжные", + "Business jets": "Бизнес-джеты", + "Helicopters": "Вертолёты", + "Turboprops": "Турбовинтовые", + "Fast jets": "Скоростные реактивные", + "Four-engine jets": "Четырёхмоторные", + "M6 and above": "M6 и выше", + "M5 to 6": "M5–6", + "M4 to 5": "M4–5", + "Below M4": "Ниже M4", + "{kind} {name}": "{kind} {name}", + "place|Country": "Страна", + "altitude|Level": "Без изменений", + "{h} h {m} min": "{h} ч {m} мин", + "{n} min": "{n} мин", + "{speed} {direction}": "{speed}, {direction}", + "{n} mm": "{n} мм" } diff --git a/src/i18n/locales/sv.json b/src/i18n/locales/sv.json index 6c1ff22d4..e8039e6d4 100644 --- a/src/i18n/locales/sv.json +++ b/src/i18n/locales/sv.json @@ -3645,7 +3645,7 @@ "Under 1 min": "Kortare än 1 min", "1 min or more": "1 min eller mer", "Shots": "Tagningar", - "Layers on": "Aktiva lager", + "Layers on": "Lager som är på", "Stories": "Berättelser", "NEW": "NYTT", "GEV Stories": "GEV Berättelser", @@ -3803,5 +3803,288 @@ "A visualization of the 26 August 2026 Bhote Koshi outburst flood, not an official hazard model. The historical (2021) and post-event views are Vantor WorldView imagery; the river’s path is GeoPera’s reconstruction. Witness clips link to their original posts, and their capture times are unverified.": "En visualisering av dammbrottsfloden i Bhote Koshi den 26 augusti 2026, inte en officiell riskmodell. De historiska vyerna (2021) och vyerna efter händelsen är Vantor WorldView-bilder; flodens väg är GeoPeras rekonstruktion. Ögonvittnesklippen länkar till sina ursprungliga inlägg, och deras inspelningstider är inte verifierade.", "That story is not available here": "Den berättelsen är inte tillgänglig här", "DRAFT": "UTKAST", - "A draft, not saved as a story yet. Use SAVE TO STORIES in AUTHORING to save it.": "Ett utkast som inte är sparat som berättelse än. Använd SPARA I STORIES under REDIGERING för att spara det." + "A draft, not saved as a story yet. Use SAVE TO STORIES in AUTHORING to save it.": "Ett utkast som inte är sparat som berättelse än. Använd SPARA I STORIES under REDIGERING för att spara det.", + "Heading to next stop": "På väg till nästa hållplats", + "Arriving at a stop": "Ankommer till en hållplats", + "Stopped at a stop": "Står vid en hållplats", + "Wikipedia": "Wikipedia", + "Wikidata": "Wikidata", + "Website": "Webbplats", + "Phase": "Fas", + "Flight level": "Flygnivå", + "Mach": "Mach", + "Squawk {code}": "Squawk {code}", + "Signal": "Signal", + "Civilian, in the air": "Civila, i luften", + "Military, in the air": "Militära, i luften", + "On the ground": "På marken", + "Motion": "Rörelse", + "Operator": "Operatör", + "Last reported": "Senast rapporterat", + "Crowding": "Trängsel", + "Class": "Klass", + "Magnitude": "Magnitud", + "Labels": "Etiketter", + "3D aircraft": "3D-flygplan", + "M{mag} earthquake": "Jordbävning M{mag}", + "Earthquake": "Jordbävning", + "{n} kt winds": "Vind {n} knop", + "Wildfire": "Skogsbrand", + "{n} acres": "{n} acres", + "{n}% contained": "{n} % under kontroll", + "prescribed burn": "naturvårdsbränning", + "{count} satellite fire hits": { + "one": "{count} brandträff från satellit", + "other": "{count} brandträffar från satellit" + }, + "last day": "senaste dygnet", + "Conditions unknown": "Okänt väder", + "Partly cloudy": "Halvklart", + "Overcast": "Mulet", + "Fog": "Dimma", + "Drizzle": "Duggregn", + "Rain": "Regn", + "Snow": "Snö", + "Rain showers": "Regnskurar", + "Snow showers": "Snöbyar", + "Thunderstorm": "Åska", + "Mixed conditions": "Växlande väder", + "Search {name} and nearby": "Sök i {name} och i närheten", + "Search what is in view": "Sök bland det som syns", + "Close Context search": "Stäng sökningen i Kontext", + "Search in Context": "Sök i Kontext", + "Close search": "Stäng sökningen", + "Shrink Context back to a panel": "Krymp Kontext till en panel", + "Expand Context to a full-height column": "Visa Kontext som en kolumn i full höjd", + "Context tabs": "Flikar i Kontext", + "Inspector": "Inspektör", + "Properties": "Egenskaper", + "Level": "Nivå", + "Last {n} min": "Senaste {n} min", + "Just now": "Nyss", + "Since selected": "Sedan valet", + "Altitude": "Höjd", + "Heading": "Kurs", + "Field of view": "Synfält", + "Camera frame": "Kamerabild", + "Acquiring frame…": "Hämtar bild…", + "Show a bigger view": "Visa större", + "Camera view": "Kameravy", + "More info": "Mer info", + "{n} s ago": "för {n} s sedan", + "{n} min ago": "för {n} min sedan", + "{n} h ago": "för {n} h sedan", + "{n} d ago": "för {n} d sedan", + "Out of feed · last reading": "Utanför flödet · senaste avläsning", + "Live · {age}": "Live · {age}", + "{n} m": "{n} m", + "{n} km": "{n} km", + "updated {age}": "uppdaterad {age}", + "Selected on the map": "Valt på kartan", + "Close card": "Stäng kortet", + "{n}% flown": "{n} % flugen", + "to go": "kvar", + "The scheduled route for this flight number does not match where the plane is; it may be another leg of the same flight.": "Den planerade rutten för det här flightnumret stämmer inte med var planet är; det kan vara en annan etapp av samma flight.", + "Scheduled · unverified: does not match where the plane is": "Planerad · ej bekräftad: stämmer inte med var planet är", + "Nothing in this item’s details matches “{text}”.": "Inget i objektets detaljer matchar ”{text}”.", + "Matching details": "Matchande detaljer", + "Enter orbital view": "Öppna omloppsvyn", + "Enter Cockpit": "Öppna cockpit", + "Fly to": "Flyg dit", + "Following": "Följer", + "Follow": "Följ", + "Ask GEV about {name}": "Fråga GEV om {name}", + "Flights within {radius}": "Flyg inom {radius}", + "No flights within {radius} from the layers that are on.": "Inga flyg inom {radius} från de lager som är på.", + "Vessels within {radius}": "Fartyg inom {radius}", + "No vessels within {radius} from the layers that are on.": "Inga fartyg inom {radius} från de lager som är på.", + "Cloud": "Moln", + "Visibility": "Sikt", + "Conditions here": "Förhållanden här", + "feels {n}°": "känns som {n}°", + "Reading conditions here…": "Hämtar förhållanden här…", + "No weather reading here.": "Ingen väderdata här.", + "Local solar time": "Lokal soltid", + "Nearby radius": "Radie i närheten", + "How far out the nearby lists look": "Hur långt listorna i närheten når", + "Hazards within {radius}": "Faror inom {radius}", + "Turns the layer on": "Slår på lagret", + "No earthquakes, tropical storms or wildfires reported within {radius}.": "Inga jordbävningar, tropiska stormar eller skogsbränder rapporterade inom {radius}.", + "Broadcast alerts within {radius}": "Utsända varningar inom {radius}", + "Also within {radius}": "Även inom {radius}", + "Local news": "Lokala nyheter", + "Sundial · {time} solar · sun {deg}° {dir}": "Solur · {time} soltid · sol {deg}° {dir}", + "Sundial · {time} solar · sun below the horizon": "Solur · {time} soltid · solen under horisonten", + "{count} things": { + "one": "{count} sak", + "other": "{count} saker" + }, + "{count} layers": { + "one": "{count} lager", + "other": "{count} lager" + }, + "{things} in view from {layers}": "{things} i vyn från {layers}", + "{n} km up": "{n} km upp", + "{n} m up": "{n} m upp", + "This view": "Den här vyn", + "Day": "Dag", + "Twilight": "Skymning", + "Night": "Natt", + "Daylight": "Dagsljus", + "sun {n}°": "sol {n}°", + "Of {n} read, {total} loaded": "Av {n} lästa, {total} inlästa", + "Of all {n}": "Av alla {n}", + "Of {n} in view": "Av {n} i vyn", + "Error": "Fel", + "Stale": "Inaktuell", + "In view": "I vyn", + "Globe view": "Jordglobsvy", + "Nothing selected": "Inget valt", + "Worldwide now": "I världen nu", + "Turn on {name}": "Slå på {name}", + "{n} loaded": "{n} inlästa", + "{n} in view": "{n} i vyn", + "Turn off {name}": "Stäng av {name}", + "Camera height": "Kamerahöjd", + "Nothing in view matches “{text}”.": "Inget i vyn matchar ”{text}”.", + "Nothing from the layers that are on is in view here. Zoom out to see more.": "Inget från lagren som är på syns här. Zooma ut för att se mer.", + "No loaded layer has anything in view. Turn some on in Data Layers.": "Inget inläst lager har något i vyn. Slå på några under Datalager.", + "Places in view": "Platser i vyn", + "Show here": "Visa här", + "Ask GEV what's here": "Fråga GEV vad som finns här", + "aircraft": "flygplan", + "vessel": "fartyg", + "launch": "uppskjutning", + "fire": "brand", + "Fire detection": "Branddetektering", + "fire perimeter": "brandområde", + "earthquake": "jordbävning", + "storm": "storm", + "air quality station": "luftkvalitetsstation", + "installation": "anläggning", + "dam": "damm", + "data centre": "datacenter", + "place": "plats", + "vehicle": "fordon", + "bike station": "cykelstation", + "plate reader": "skyltläsare", + "camera": "kamera", + "airspace": "luftrum", + "sighting": "observation", + "Callsign": "Anropssignal", + "Registration": "Registrering", + "Aircraft class": "Flygplansklass", + "Course": "Kurs", + "Vertical rate": "Vertikal hastighet", + "Squawk": "Squawk", + "Emergency": "Nödläge", + "Last contact": "Senaste kontakt", + "Ship type": "Fartygstyp", + "Destination": "Destination", + "Depth": "Djup", + "Time": "Tid", + "Place": "Plats", + "Fire power": "Brandeffekt", + "Satellite": "Satellit", + "Sensor": "Sensor", + "Detected": "Upptäckt", + "Contained": "Under kontroll", + "Discovered": "Upptäckt", + "Basin": "Bassäng", + "Index": "Index", + "Health risk": "Hälsorisk", + "Bikes": "Cyklar", + "Docks": "Platser", + "Floor": "Undre gräns", + "Ceiling": "Övre gräns", + "Active": "Aktiv", + "NORAD ID": "NORAD-ID", + "MMSI": "MMSI", + "ICAO24": "ICAO24", + "Capacity": "Kapacitet", + "Output": "Effekt", + "River": "Flod", + "City": "Stad", + "State": "Delstat", + "Street": "Gata", + "Opened": "Öppnad", + "Height": "Höjd", + "IT load": "IT-last", + "Waterway": "Vattenväg", + "Military": "Militär", + "Land use": "Markanvändning", + "Telecom": "Telekom", + "feature": "objekt", + "Empty": "Tom", + "Many seats free": "Många lediga platser", + "Few seats free": "Få lediga platser", + "Standing room only": "Endast ståplatser", + "Crowded": "Trångt", + "Not taking passengers": "Tar inte emot resenärer", + "Major hurricane": "Kraftig orkan", + "Typhoon": "Tyfon", + "Super typhoon": "Supertyfon", + "Tropical cyclone": "Tropisk cyklon", + "Prescribed burn": "Naturvårdsbränning", + "Atlantic": "Atlanten", + "Eastern Pacific": "Östra Stilla havet", + "Central Pacific": "Centrala Stilla havet", + "Western Pacific": "Västra Stilla havet", + "Indian Ocean": "Indiska oceanen", + "Southern Hemisphere": "Södra halvklotet", + "Cable tram": "Kabelspårvagn", + "Aerial lift": "Linbana", + "Fishing": "Fiske", + "Tug": "Bogserbåt", + "Sailing": "Segelfartyg", + "Pleasure craft": "Fritidsbåt", + "Pilot vessel": "Lotsbåt", + "Search and rescue": "Sjöräddning", + "Law enforcement": "Myndighetsfartyg", + "High-speed craft": "Snabbgående fartyg", + "Passenger": "Passagerarfartyg", + "Cargo": "Lastfartyg", + "Tanker": "Tankfartyg", + "Yes": "Ja", + "{n} ft": "{n} ft", + "{n} km/s": "{n} km/s", + "{n} km/h": "{n} km/h", + "{n} kt": "{n} kn", + "{n} ft/min": "{n} ft/min", + "{n}°": "{n}°", + "M {n}": "M {n}", + "{n} MW": "{n} MW", + "{n}%": "{n} %", + "{n} hPa": "{n} hPa", + "Hijack (squawk 7500)": "Kapning (squawk 7500)", + "Radio failure (squawk 7600)": "Radiofel (squawk 7600)", + "Emergency (squawk 7700)": "Nödläge (squawk 7700)", + "Emergency: {kind}": "Nödläge: {kind}", + "Emergency declared": "Nödläge utlyst", + "Tsunami warning issued": "Tsunamivarning utfärdad", + "VFR, no flight plan": "VFR, ingen färdplan", + "VFR conspicuity": "VFR-standardkod", + "IFR, no code yet": "IFR, ingen kod än", + "Hijack": "Kapning", + "Climbing {n} ft/min": "Stiger {n} ft/min", + "Descending {n} ft/min": "Sjunker {n} ft/min", + "Cruising, level": "Marschflyg, plant", + "Airliners": "Trafikflygplan", + "Widebodies": "Widebody-plan", + "Business jets": "Affärsjet", + "Helicopters": "Helikoptrar", + "Turboprops": "Turbopropplan", + "Fast jets": "Stridsflygplan", + "Four-engine jets": "Fyrmotoriga jetplan", + "M6 and above": "M6 och över", + "M5 to 6": "M5 till 6", + "M4 to 5": "M4 till 5", + "Below M4": "Under M4", + "{kind} {name}": "{kind} {name}", + "place|Country": "Land", + "altitude|Level": "Oförändrad", + "{h} h {m} min": "{h} h {m} min", + "{n} min": "{n} min", + "{speed} {direction}": "{speed} från {direction}", + "{n} mm": "{n} mm" } diff --git a/src/i18n/locales/uk.json b/src/i18n/locales/uk.json index 15a81781b..f33f4a999 100644 --- a/src/i18n/locales/uk.json +++ b/src/i18n/locales/uk.json @@ -3983,5 +3983,294 @@ "A visualization of the 26 August 2026 Bhote Koshi outburst flood, not an official hazard model. The historical (2021) and post-event views are Vantor WorldView imagery; the river’s path is GeoPera’s reconstruction. Witness clips link to their original posts, and their capture times are unverified.": "Візуалізація прориву паводка на Bhote Koshi 26 серпня 2026 року, а не офіційна модель небезпеки. Архівні види (2021) і види після події — знімки Vantor WorldView; шлях річки — реконструкція GeoPera. Відео очевидців ведуть на початкові публікації, час їх зйомки не перевірено.", "That story is not available here": "Ця історія тут недоступна", "DRAFT": "ЧЕРНЕТКА", - "A draft, not saved as a story yet. Use SAVE TO STORIES in AUTHORING to save it.": "Чернетка, ще не збережена як історія. Натисніть «ЗБЕРЕГТИ В STORIES» у розділі РЕДАКТОР, щоб зберегти її." + "A draft, not saved as a story yet. Use SAVE TO STORIES in AUTHORING to save it.": "Чернетка, ще не збережена як історія. Натисніть «ЗБЕРЕГТИ В STORIES» у розділі РЕДАКТОР, щоб зберегти її.", + "Heading to next stop": "Їде до наступної зупинки", + "Arriving at a stop": "Під’їжджає до зупинки", + "Stopped at a stop": "Стоїть на зупинці", + "Wikipedia": "Вікіпедія", + "Wikidata": "Вікідані", + "Website": "Вебсайт", + "Phase": "Фаза", + "Flight level": "Ешелон", + "Mach": "Мах", + "Squawk {code}": "Сквок {code}", + "Signal": "Сигнал", + "Civilian, in the air": "Цивільні, у повітрі", + "Military, in the air": "Військові, у повітрі", + "On the ground": "На землі", + "Motion": "Рух", + "Operator": "Оператор", + "Last reported": "Останнє повідомлення", + "Crowding": "Заповненість", + "Class": "Клас", + "Magnitude": "Магнітуда", + "Labels": "Підписи", + "3D aircraft": "Літаки в 3D", + "M{mag} earthquake": "Землетрус M{mag}", + "Earthquake": "Землетрус", + "{n} kt winds": "Вітер {n} вуз.", + "Wildfire": "Лісова пожежа", + "{n} acres": "{n} акрів", + "{n}% contained": "Локалізовано на {n}%", + "prescribed burn": "контрольоване випалювання", + "{count} satellite fire hits": { + "one": "{count} супутникове виявлення пожежі", + "few": "{count} супутникові виявлення пожежі", + "many": "{count} супутникових виявлень пожежі", + "other": "{count} супутникового виявлення пожежі" + }, + "last day": "за добу", + "Conditions unknown": "Погода невідома", + "Partly cloudy": "Мінлива хмарність", + "Overcast": "Похмуро", + "Fog": "Туман", + "Drizzle": "Мряка", + "Rain": "Дощ", + "Snow": "Сніг", + "Rain showers": "Зливи", + "Snow showers": "Снігопад", + "Thunderstorm": "Гроза", + "Mixed conditions": "Мінлива погода", + "Search {name} and nearby": "Пошук: {name} і поруч", + "Search what is in view": "Пошук у видимому", + "Close Context search": "Закрити пошук у контексті", + "Search in Context": "Пошук у контексті", + "Close search": "Закрити пошук", + "Shrink Context back to a panel": "Згорнути контекст у панель", + "Expand Context to a full-height column": "Розгорнути контекст на всю висоту", + "Context tabs": "Вкладки контексту", + "Inspector": "Інспектор", + "Properties": "Властивості", + "Level": "Рівень", + "Last {n} min": "За {n} хв", + "Just now": "Щойно", + "Since selected": "Від вибору", + "Altitude": "Висота", + "Heading": "Курс", + "Field of view": "Поле зору", + "Camera frame": "Кадр камери", + "Acquiring frame…": "Отримання кадру…", + "Show a bigger view": "Показати більше", + "Camera view": "Вигляд із камери", + "More info": "Докладніше", + "{n} s ago": "{n} с тому", + "{n} min ago": "{n} хв тому", + "{n} h ago": "{n} год тому", + "{n} d ago": "{n} дн. тому", + "Out of feed · last reading": "Немає в потоці · останні дані", + "Live · {age}": "Зараз · {age}", + "{n} m": "{n} м", + "{n} km": "{n} км", + "updated {age}": "оновлено {age}", + "Selected on the map": "Вибрано на мапі", + "Close card": "Закрити картку", + "{n}% flown": "Пройдено {n}%", + "to go": "залишилось", + "The scheduled route for this flight number does not match where the plane is; it may be another leg of the same flight.": "Плановий маршрут цього рейсу не збігається з положенням літака; можливо, це інша ділянка того самого рейсу.", + "Scheduled · unverified: does not match where the plane is": "За розкладом · не підтверджено: не збігається з положенням літака", + "Nothing in this item’s details matches “{text}”.": "У відомостях про цей об’єкт немає «{text}».", + "Matching details": "Збіги у відомостях", + "Enter orbital view": "Увійти в орбітальний вигляд", + "Enter Cockpit": "Увійти в кабіну", + "Fly to": "Перелетіти", + "Following": "Стеження", + "Follow": "Стежити", + "Ask GEV about {name}": "Запитати GEV про {name}", + "Flights within {radius}": "Рейси в радіусі {radius}", + "No flights within {radius} from the layers that are on.": "В увімкнених шарах немає рейсів у радіусі {radius}.", + "Vessels within {radius}": "Судна в радіусі {radius}", + "No vessels within {radius} from the layers that are on.": "В увімкнених шарах немає суден у радіусі {radius}.", + "Cloud": "Хмарність", + "Visibility": "Видимість", + "Conditions here": "Обстановка тут", + "feels {n}°": "відчувається як {n}°", + "Reading conditions here…": "Отримання обстановки…", + "No weather reading here.": "Тут немає даних про погоду.", + "Local solar time": "Місцевий сонячний час", + "Nearby radius": "Радіус поблизу", + "How far out the nearby lists look": "Наскільки далеко сягають списки поблизу", + "Hazards within {radius}": "Небезпеки в радіусі {radius}", + "Turns the layer on": "Вмикає шар", + "No earthquakes, tropical storms or wildfires reported within {radius}.": "У радіусі {radius} немає повідомлень про землетруси, тропічні шторми чи лісові пожежі.", + "Broadcast alerts within {radius}": "Сповіщення в радіусі {radius}", + "Also within {radius}": "Також у радіусі {radius}", + "Local news": "Місцеві новини", + "Sundial · {time} solar · sun {deg}° {dir}": "Сонячний годинник · {time} за сонцем · сонце {deg}° {dir}", + "Sundial · {time} solar · sun below the horizon": "Сонячний годинник · {time} за сонцем · сонце за обрієм", + "{count} things": { + "one": "{count} об’єкт", + "few": "{count} об’єкти", + "many": "{count} об’єктів", + "other": "{count} об’єкта" + }, + "{count} layers": { + "one": "{count} шару", + "few": "{count} шарів", + "many": "{count} шарів", + "other": "{count} шару" + }, + "{things} in view from {layers}": "У полі зору {things} з {layers}", + "{n} km up": "на висоті {n} км", + "{n} m up": "на висоті {n} м", + "This view": "Цей вигляд", + "Day": "День", + "Twilight": "Сутінки", + "Night": "Ніч", + "Daylight": "Освітленість", + "sun {n}°": "сонце {n}°", + "Of {n} read, {total} loaded": "З {n} прочитаних завантажено {total}", + "Of all {n}": "З усіх {n}", + "Of {n} in view": "З {n} у полі зору", + "Error": "Помилка", + "Stale": "Застаріло", + "In view": "У полі зору", + "Globe view": "Вигляд глобуса", + "Nothing selected": "Нічого не вибрано", + "Worldwide now": "Зараз у світі", + "Turn on {name}": "Увімкнути {name}", + "{n} loaded": "завантажено {n}", + "{n} in view": "{n} у полі зору", + "Turn off {name}": "Вимкнути {name}", + "Camera height": "Висота камери", + "Nothing in view matches “{text}”.": "У полі зору немає «{text}».", + "Nothing from the layers that are on is in view here. Zoom out to see more.": "З увімкнених шарів тут нічого не видно. Віддаліть мапу, щоб побачити більше.", + "No loaded layer has anything in view. Turn some on in Data Layers.": "У жодному завантаженому шарі нічого не видно. Увімкніть шари в розділі «Шари даних».", + "Places in view": "Місця в полі зору", + "Show here": "Показати тут", + "Ask GEV what's here": "Запитати GEV, що тут", + "aircraft": "повітряне судно", + "vessel": "судно", + "launch": "запуск", + "fire": "пожежа", + "Fire detection": "Виявлення пожежі", + "fire perimeter": "контур пожежі", + "earthquake": "землетрус", + "storm": "шторм", + "air quality station": "станція якості повітря", + "installation": "об’єкт", + "dam": "гребля", + "data centre": "центр обробки даних", + "place": "місце", + "vehicle": "транспорт", + "bike station": "велостанція", + "plate reader": "зчитувач номерів", + "camera": "камера", + "airspace": "повітряний простір", + "sighting": "спостереження", + "Callsign": "Позивний", + "Registration": "Реєстрація", + "Aircraft class": "Клас ПС", + "Course": "Курс", + "Vertical rate": "Вертикальна швидкість", + "Squawk": "Сквок", + "Emergency": "Надзвичайна ситуація", + "Last contact": "Останній контакт", + "Ship type": "Тип судна", + "Destination": "Пункт призначення", + "Depth": "Глибина", + "Time": "Час", + "Place": "Місце", + "Fire power": "Потужність пожежі", + "Satellite": "Супутник", + "Sensor": "Датчик", + "Detected": "Виявлено", + "Contained": "Локалізовано", + "Discovered": "Виявлено", + "Basin": "Басейн", + "Index": "Індекс", + "Health risk": "Ризик для здоров’я", + "Bikes": "Велосипеди", + "Docks": "Місця", + "Floor": "Нижня межа", + "Ceiling": "Верхня межа", + "Active": "Діє", + "NORAD ID": "NORAD ID", + "MMSI": "MMSI", + "ICAO24": "ICAO24", + "Capacity": "Потужність", + "Output": "Вироблення", + "River": "Річка", + "City": "Місто", + "State": "Штат", + "Street": "Вулиця", + "Opened": "Відкрито", + "Height": "Висота", + "IT load": "ІТ-навантаження", + "Waterway": "Водний шлях", + "Military": "Військове", + "Land use": "Землекористування", + "Telecom": "Зв’язок", + "feature": "об’єкт", + "Empty": "Порожньо", + "Many seats free": "Багато вільних місць", + "Few seats free": "Мало вільних місць", + "Standing room only": "Лише стоячі місця", + "Crowded": "Переповнено", + "Not taking passengers": "Посадки немає", + "Major hurricane": "Сильний ураган", + "Typhoon": "Тайфун", + "Super typhoon": "Супертайфун", + "Tropical cyclone": "Тропічний циклон", + "Prescribed burn": "Контрольоване випалювання", + "Atlantic": "Атлантика", + "Eastern Pacific": "Східна частина Тихого океану", + "Central Pacific": "Центральна частина Тихого океану", + "Western Pacific": "Західна частина Тихого океану", + "Indian Ocean": "Індійський океан", + "Southern Hemisphere": "Південна півкуля", + "Cable tram": "Канатний трамвай", + "Aerial lift": "Канатна дорога", + "Fishing": "Рибальське", + "Tug": "Буксир", + "Sailing": "Вітрильне", + "Pleasure craft": "Прогулянкове", + "Pilot vessel": "Лоцманське", + "Search and rescue": "Пошуково-рятувальне", + "Law enforcement": "Правоохоронне", + "High-speed craft": "Швидкісне", + "Passenger": "Пасажирське", + "Cargo": "Вантажне", + "Tanker": "Танкер", + "Yes": "Так", + "{n} ft": "{n} фт", + "{n} km/s": "{n} км/с", + "{n} km/h": "{n} км/год", + "{n} kt": "{n} вуз", + "{n} ft/min": "{n} фт/хв", + "{n}°": "{n}°", + "M {n}": "M {n}", + "{n} MW": "{n} МВт", + "{n}%": "{n}%", + "{n} hPa": "{n} гПа", + "Hijack (squawk 7500)": "Захоплення (сквок 7500)", + "Radio failure (squawk 7600)": "Відмова радіозв’язку (сквок 7600)", + "Emergency (squawk 7700)": "Лихо (сквок 7700)", + "Emergency: {kind}": "Надзвичайна ситуація: {kind}", + "Emergency declared": "Оголошено надзвичайну ситуацію", + "Tsunami warning issued": "Оголошено загрозу цунамі", + "VFR, no flight plan": "ПВП, без плану польоту", + "VFR conspicuity": "Загальний код ПВП", + "IFR, no code yet": "ППП, код ще не призначено", + "Hijack": "Захоплення", + "Climbing {n} ft/min": "Набір висоти {n} фт/хв", + "Descending {n} ft/min": "Зниження {n} фт/хв", + "Cruising, level": "Крейсерський політ", + "Airliners": "Авіалайнери", + "Widebodies": "Широкофюзеляжні", + "Business jets": "Бізнес-джети", + "Helicopters": "Гелікоптери", + "Turboprops": "Турбогвинтові", + "Fast jets": "Швидкісні реактивні", + "Four-engine jets": "Чотиримоторні", + "M6 and above": "M6 і вище", + "M5 to 6": "M5–6", + "M4 to 5": "M4–5", + "Below M4": "Нижче M4", + "{kind} {name}": "{kind} {name}", + "place|Country": "Країна", + "altitude|Level": "Без змін", + "{h} h {m} min": "{h} год {m} хв", + "{n} min": "{n} хв", + "{speed} {direction}": "{speed}, {direction}", + "{n} mm": "{n} мм" } diff --git a/src/i18n/locales/zh-CN.json b/src/i18n/locales/zh-CN.json index 5178c1f06..7a638025b 100644 --- a/src/i18n/locales/zh-CN.json +++ b/src/i18n/locales/zh-CN.json @@ -3558,7 +3558,7 @@ "Under 1 min": "不到 1 分钟", "1 min or more": "1 分钟及以上", "Shots": "镜头", - "Layers on": "已开图层", + "Layers on": "已开启的图层", "Stories": "故事", "NEW": "新", "GEV Stories": "GEV 故事", @@ -3713,5 +3713,285 @@ "A visualization of the 26 August 2026 Bhote Koshi outburst flood, not an official hazard model. The historical (2021) and post-event views are Vantor WorldView imagery; the river’s path is GeoPera’s reconstruction. Witness clips link to their original posts, and their capture times are unverified.": "这是 2026 年 8 月 26 日 Bhote Koshi 溃决洪水的可视化,并非官方灾害模型。历史(2021 年)与事件后视图为 Vantor WorldView 影像;河流路径为 GeoPera 的重建结果。目击者视频链接到其原始帖子,拍摄时间未经核实。", "That story is not available here": "该故事在此处不可用", "DRAFT": "草稿", - "A draft, not saved as a story yet. Use SAVE TO STORIES in AUTHORING to save it.": "尚未保存为故事的草稿。在“创作”中使用“保存到 STORIES”即可保存。" + "A draft, not saved as a story yet. Use SAVE TO STORIES in AUTHORING to save it.": "尚未保存为故事的草稿。在“创作”中使用“保存到 STORIES”即可保存。", + "Heading to next stop": "前往下一站", + "Arriving at a stop": "即将到站", + "Stopped at a stop": "停靠站点", + "Wikipedia": "维基百科", + "Wikidata": "维基数据", + "Website": "网站", + "Phase": "阶段", + "Flight level": "飞行高度层", + "Mach": "马赫", + "Squawk {code}": "应答机编码 {code}", + "Signal": "信号", + "Civilian, in the air": "民用,空中", + "Military, in the air": "军用,空中", + "On the ground": "地面", + "Motion": "运动", + "Operator": "运营商", + "Last reported": "最近报告", + "Crowding": "拥挤程度", + "Class": "类别", + "Magnitude": "震级", + "Labels": "标签", + "3D aircraft": "3D 飞机", + "M{mag} earthquake": "{mag} 级地震", + "Earthquake": "地震", + "{n} kt winds": "风速 {n} 节", + "Wildfire": "野火", + "{n} acres": "{n} 英亩", + "{n}% contained": "已控制 {n}%", + "prescribed burn": "计划烧除", + "{count} satellite fire hits": { + "other": "{count} 个卫星火点" + }, + "last day": "过去一天", + "Conditions unknown": "天气未知", + "Partly cloudy": "局部多云", + "Overcast": "阴", + "Fog": "雾", + "Drizzle": "毛毛雨", + "Rain": "雨", + "Snow": "雪", + "Rain showers": "阵雨", + "Snow showers": "阵雪", + "Thunderstorm": "雷暴", + "Mixed conditions": "天气多变", + "Search {name} and nearby": "搜索 {name} 及附近", + "Search what is in view": "搜索视野内内容", + "Close Context search": "关闭态势搜索", + "Search in Context": "在态势中搜索", + "Close search": "关闭搜索", + "Shrink Context back to a panel": "将态势缩回面板", + "Expand Context to a full-height column": "将态势展开为全高栏", + "Context tabs": "态势标签页", + "Inspector": "检查器", + "Properties": "属性", + "Level": "等级", + "Last {n} min": "最近 {n} 分钟", + "Just now": "刚刚", + "Since selected": "自选中起", + "Altitude": "高度", + "Heading": "航向", + "Field of view": "视场", + "Camera frame": "摄像头画面", + "Acquiring frame…": "正在获取画面…", + "Show a bigger view": "放大查看", + "Camera view": "摄像头视图", + "More info": "更多信息", + "{n} s ago": "{n} 秒前", + "{n} min ago": "{n} 分钟前", + "{n} h ago": "{n} 小时前", + "{n} d ago": "{n} 天前", + "Out of feed · last reading": "已离开数据源 · 最后读数", + "Live · {age}": "实时 · {age}", + "{n} m": "{n} m", + "{n} km": "{n} km", + "updated {age}": "更新于 {age}", + "Selected on the map": "地图上的选中项", + "Close card": "关闭卡片", + "{n}% flown": "已飞 {n}%", + "to go": "剩余", + "The scheduled route for this flight number does not match where the plane is; it may be another leg of the same flight.": "该航班号的计划航线与飞机位置不符,可能是同一航班的另一航段。", + "Scheduled · unverified: does not match where the plane is": "计划 · 未核实:与飞机位置不符", + "Nothing in this item’s details matches “{text}”.": "此项详情中没有与“{text}”匹配的内容。", + "Matching details": "匹配的详情", + "Enter orbital view": "进入轨道视图", + "Enter Cockpit": "进入座舱", + "Fly to": "飞往", + "Following": "跟随中", + "Follow": "跟随", + "Ask GEV about {name}": "向 GEV 询问 {name}", + "Flights within {radius}": "{radius} 内的航班", + "No flights within {radius} from the layers that are on.": "已开启的图层中 {radius} 内没有航班。", + "Vessels within {radius}": "{radius} 内的船舶", + "No vessels within {radius} from the layers that are on.": "已开启的图层中 {radius} 内没有船舶。", + "Cloud": "云量", + "Visibility": "能见度", + "Conditions here": "此处状况", + "feels {n}°": "体感 {n}°", + "Reading conditions here…": "正在读取此处状况…", + "No weather reading here.": "此处没有天气数据。", + "Local solar time": "当地太阳时", + "Nearby radius": "附近半径", + "How far out the nearby lists look": "附近列表的范围", + "Hazards within {radius}": "{radius} 内的灾害", + "Turns the layer on": "开启该图层", + "No earthquakes, tropical storms or wildfires reported within {radius}.": "{radius} 内未报告地震、热带风暴或野火。", + "Broadcast alerts within {radius}": "{radius} 内的广播警报", + "Also within {radius}": "{radius} 内的其他项", + "Local news": "本地新闻", + "Sundial · {time} solar · sun {deg}° {dir}": "日晷 · 太阳时 {time} · 太阳 {deg}° {dir}", + "Sundial · {time} solar · sun below the horizon": "日晷 · 太阳时 {time} · 太阳在地平线下", + "{count} things": { + "other": "{count} 项" + }, + "{count} layers": { + "other": "{count} 个图层" + }, + "{things} in view from {layers}": "视野内有来自 {layers} 的 {things}", + "{n} km up": "高 {n} km", + "{n} m up": "高 {n} m", + "This view": "当前视图", + "Day": "白天", + "Twilight": "晨昏", + "Night": "夜间", + "Daylight": "日照", + "sun {n}°": "太阳 {n}°", + "Of {n} read, {total} loaded": "读取 {n} 个,已加载 {total} 个", + "Of all {n}": "全部 {n} 个中", + "Of {n} in view": "视野内 {n} 个中", + "Error": "错误", + "Stale": "已过时", + "In view": "视野内", + "Globe view": "地球视图", + "Nothing selected": "未选中任何内容", + "Worldwide now": "全球当前", + "Turn on {name}": "开启 {name}", + "{n} loaded": "已加载 {n}", + "{n} in view": "视野内 {n}", + "Turn off {name}": "关闭 {name}", + "Camera height": "相机高度", + "Nothing in view matches “{text}”.": "视野内没有与“{text}”匹配的内容。", + "Nothing from the layers that are on is in view here. Zoom out to see more.": "已开启的图层在此处视野内没有内容。缩小以查看更多。", + "No loaded layer has anything in view. Turn some on in Data Layers.": "已加载的图层在视野内都没有内容。请在数据图层中开启一些。", + "Places in view": "视野内的地点", + "Show here": "在此显示", + "Ask GEV what's here": "问问 GEV 这里有什么", + "aircraft": "飞机", + "vessel": "船舶", + "launch": "发射", + "fire": "火点", + "Fire detection": "火点探测", + "fire perimeter": "火场范围", + "earthquake": "地震", + "storm": "风暴", + "air quality station": "空气质量站", + "installation": "设施", + "dam": "水坝", + "data centre": "数据中心", + "place": "地点", + "vehicle": "车辆", + "bike station": "单车站", + "plate reader": "车牌识别器", + "camera": "摄像头", + "airspace": "空域", + "sighting": "目击", + "Callsign": "呼号", + "Registration": "注册号", + "Aircraft class": "机型类别", + "Course": "航线", + "Vertical rate": "垂直速率", + "Squawk": "应答机编码", + "Emergency": "紧急情况", + "Last contact": "最后联系", + "Ship type": "船舶类型", + "Destination": "目的地", + "Depth": "深度", + "Time": "时间", + "Place": "地点", + "Fire power": "火点功率", + "Satellite": "卫星", + "Sensor": "传感器", + "Detected": "探测时间", + "Contained": "已控制", + "Discovered": "发现时间", + "Basin": "海域", + "Index": "指数", + "Health risk": "健康风险", + "Bikes": "单车", + "Docks": "车桩", + "Floor": "下限", + "Ceiling": "上限", + "Active": "生效时间", + "NORAD ID": "NORAD 编号", + "MMSI": "MMSI", + "ICAO24": "ICAO24", + "Capacity": "容量", + "Output": "输出", + "River": "河流", + "City": "城市", + "State": "州", + "Street": "街道", + "Opened": "启用", + "Height": "高度", + "IT load": "IT 负载", + "Waterway": "水道", + "Military": "军用", + "Land use": "土地用途", + "Telecom": "电信", + "feature": "要素", + "Empty": "空车", + "Many seats free": "空座较多", + "Few seats free": "空座较少", + "Standing room only": "仅剩站位", + "Crowded": "拥挤", + "Not taking passengers": "不载客", + "Major hurricane": "强飓风", + "Typhoon": "台风", + "Super typhoon": "超强台风", + "Tropical cyclone": "热带气旋", + "Prescribed burn": "计划烧除", + "Atlantic": "大西洋", + "Eastern Pacific": "东太平洋", + "Central Pacific": "中太平洋", + "Western Pacific": "西太平洋", + "Indian Ocean": "印度洋", + "Southern Hemisphere": "南半球", + "Cable tram": "缆索电车", + "Aerial lift": "空中缆车", + "Fishing": "渔船", + "Tug": "拖船", + "Sailing": "帆船", + "Pleasure craft": "游艇", + "Pilot vessel": "引航船", + "Search and rescue": "搜救船", + "Law enforcement": "执法船", + "High-speed craft": "高速船", + "Passenger": "客船", + "Cargo": "货船", + "Tanker": "油轮", + "Yes": "是", + "{n} ft": "{n} ft", + "{n} km/s": "{n} km/s", + "{n} km/h": "{n} km/h", + "{n} kt": "{n} kn", + "{n} ft/min": "{n} ft/min", + "{n}°": "{n}°", + "M {n}": "M {n}", + "{n} MW": "{n} MW", + "{n}%": "{n}%", + "{n} hPa": "{n} hPa", + "Hijack (squawk 7500)": "劫机(应答机编码 7500)", + "Radio failure (squawk 7600)": "无线电故障(应答机编码 7600)", + "Emergency (squawk 7700)": "紧急情况(应答机编码 7700)", + "Emergency: {kind}": "紧急情况:{kind}", + "Emergency declared": "已宣布紧急情况", + "Tsunami warning issued": "已发布海啸警报", + "VFR, no flight plan": "VFR,无飞行计划", + "VFR conspicuity": "VFR 识别码", + "IFR, no code yet": "IFR,尚未分配编码", + "Hijack": "劫机", + "Climbing {n} ft/min": "爬升 {n} ft/min", + "Descending {n} ft/min": "下降 {n} ft/min", + "Cruising, level": "巡航,平飞", + "Airliners": "客机", + "Widebodies": "宽体机", + "Business jets": "公务机", + "Helicopters": "直升机", + "Turboprops": "涡桨飞机", + "Fast jets": "高速喷气机", + "Four-engine jets": "四发喷气机", + "M6 and above": "M6 及以上", + "M5 to 6": "M5 至 6", + "M4 to 5": "M4 至 5", + "Below M4": "M4 以下", + "{kind} {name}": "{kind}{name}", + "place|Country": "国家", + "altitude|Level": "平飞", + "{h} h {m} min": "{h} 小时 {m} 分钟", + "{n} min": "{n} 分钟", + "{speed} {direction}": "{direction}风 {speed}", + "{n} mm": "{n} 毫米" } diff --git a/src/i18n/locales/zh-Hant.json b/src/i18n/locales/zh-Hant.json index a8c217b0a..837243f94 100644 --- a/src/i18n/locales/zh-Hant.json +++ b/src/i18n/locales/zh-Hant.json @@ -3558,7 +3558,7 @@ "Under 1 min": "不到 1 分鐘", "1 min or more": "1 分鐘及以上", "Shots": "鏡頭", - "Layers on": "已開圖層", + "Layers on": "已開啟的圖層", "Stories": "故事", "NEW": "新", "GEV Stories": "GEV 故事", @@ -3583,7 +3583,7 @@ "Filters": "篩選", "Search stories": "搜索故事", "Search stories, places, creators": "搜索故事、地點、創作者", - "Clear search": "清除搜索", + "Clear search": "清除搜尋", "Topics": "主題", "Filter stories": "篩選故事", "Show {count} stories": { @@ -3713,5 +3713,285 @@ "A visualization of the 26 August 2026 Bhote Koshi outburst flood, not an official hazard model. The historical (2021) and post-event views are Vantor WorldView imagery; the river’s path is GeoPera’s reconstruction. Witness clips link to their original posts, and their capture times are unverified.": "這是 2026 年 8 月 26 日 Bhote Koshi 潰決洪水的視覺化,並非官方災害模型。歷史(2021 年)與事件後畫面為 Vantor WorldView 影像;河流路徑為 GeoPera 的重建結果。目擊者影片連結到其原始貼文,拍攝時間未經核實。", "That story is not available here": "該故事在此處無法使用", "DRAFT": "草稿", - "A draft, not saved as a story yet. Use SAVE TO STORIES in AUTHORING to save it.": "尚未儲存為故事的草稿。在「創作」中使用「儲存到 STORIES」即可儲存。" + "A draft, not saved as a story yet. Use SAVE TO STORIES in AUTHORING to save it.": "尚未儲存為故事的草稿。在「創作」中使用「儲存到 STORIES」即可儲存。", + "Heading to next stop": "前往下一站", + "Arriving at a stop": "即將到站", + "Stopped at a stop": "停靠站點", + "Wikipedia": "維基百科", + "Wikidata": "維基數據", + "Website": "網站", + "Phase": "階段", + "Flight level": "飛行高度層", + "Mach": "馬赫", + "Squawk {code}": "應答機編碼 {code}", + "Signal": "訊號", + "Civilian, in the air": "民用,空中", + "Military, in the air": "軍用,空中", + "On the ground": "地面", + "Motion": "運動", + "Operator": "營運商", + "Last reported": "最近報告", + "Crowding": "擁擠程度", + "Class": "類別", + "Magnitude": "震級", + "Labels": "標籤", + "3D aircraft": "3D 飛機", + "M{mag} earthquake": "{mag} 級地震", + "Earthquake": "地震", + "{n} kt winds": "風速 {n} 節", + "Wildfire": "野火", + "{n} acres": "{n} 英畝", + "{n}% contained": "已控制 {n}%", + "prescribed burn": "計畫燒除", + "{count} satellite fire hits": { + "other": "{count} 個衛星火點" + }, + "last day": "過去一天", + "Conditions unknown": "天氣未知", + "Partly cloudy": "局部多雲", + "Overcast": "陰", + "Fog": "霧", + "Drizzle": "毛毛雨", + "Rain": "雨", + "Snow": "雪", + "Rain showers": "陣雨", + "Snow showers": "陣雪", + "Thunderstorm": "雷暴", + "Mixed conditions": "天氣多變", + "Search {name} and nearby": "搜尋 {name} 及附近", + "Search what is in view": "搜尋視野內內容", + "Close Context search": "關閉態勢搜尋", + "Search in Context": "在態勢中搜尋", + "Close search": "關閉搜尋", + "Shrink Context back to a panel": "將態勢縮回面板", + "Expand Context to a full-height column": "將態勢展開為全高欄", + "Context tabs": "態勢分頁", + "Inspector": "檢查器", + "Properties": "屬性", + "Level": "等級", + "Last {n} min": "最近 {n} 分鐘", + "Just now": "剛剛", + "Since selected": "自選取起", + "Altitude": "高度", + "Heading": "航向", + "Field of view": "視野", + "Camera frame": "攝影機畫面", + "Acquiring frame…": "正在取得畫面…", + "Show a bigger view": "放大檢視", + "Camera view": "攝影機視圖", + "More info": "更多資訊", + "{n} s ago": "{n} 秒前", + "{n} min ago": "{n} 分鐘前", + "{n} h ago": "{n} 小時前", + "{n} d ago": "{n} 天前", + "Out of feed · last reading": "已離開資料源 · 最後讀數", + "Live · {age}": "實時 · {age}", + "{n} m": "{n} m", + "{n} km": "{n} km", + "updated {age}": "更新於 {age}", + "Selected on the map": "地圖上的選取項", + "Close card": "關閉卡片", + "{n}% flown": "已飛 {n}%", + "to go": "剩餘", + "The scheduled route for this flight number does not match where the plane is; it may be another leg of the same flight.": "該航班號的計畫航線與飛機位置不符,可能是同一航班的另一航段。", + "Scheduled · unverified: does not match where the plane is": "計畫 · 未核實:與飛機位置不符", + "Nothing in this item’s details matches “{text}”.": "此項詳情中沒有與「{text}」相符的內容。", + "Matching details": "相符的詳情", + "Enter orbital view": "進入軌道視圖", + "Enter Cockpit": "進入座艙", + "Fly to": "飛往", + "Following": "跟隨中", + "Follow": "跟隨", + "Ask GEV about {name}": "向 GEV 詢問 {name}", + "Flights within {radius}": "{radius} 內的航班", + "No flights within {radius} from the layers that are on.": "已開啟的圖層中 {radius} 內沒有航班。", + "Vessels within {radius}": "{radius} 內的船舶", + "No vessels within {radius} from the layers that are on.": "已開啟的圖層中 {radius} 內沒有船舶。", + "Cloud": "雲量", + "Visibility": "能見度", + "Conditions here": "此處狀況", + "feels {n}°": "體感 {n}°", + "Reading conditions here…": "正在讀取此處狀況…", + "No weather reading here.": "此處沒有天氣資料。", + "Local solar time": "當地太陽時", + "Nearby radius": "附近半徑", + "How far out the nearby lists look": "附近清單的範圍", + "Hazards within {radius}": "{radius} 內的災害", + "Turns the layer on": "開啟該圖層", + "No earthquakes, tropical storms or wildfires reported within {radius}.": "{radius} 內未報告地震、熱帶風暴或野火。", + "Broadcast alerts within {radius}": "{radius} 內的廣播警報", + "Also within {radius}": "{radius} 內的其他項", + "Local news": "本地新聞", + "Sundial · {time} solar · sun {deg}° {dir}": "日晷 · 太陽時 {time} · 太陽 {deg}° {dir}", + "Sundial · {time} solar · sun below the horizon": "日晷 · 太陽時 {time} · 太陽在地平線下", + "{count} things": { + "other": "{count} 項" + }, + "{count} layers": { + "other": "{count} 個圖層" + }, + "{things} in view from {layers}": "視野內有來自 {layers} 的 {things}", + "{n} km up": "高 {n} km", + "{n} m up": "高 {n} m", + "This view": "目前視圖", + "Day": "白天", + "Twilight": "晨昏", + "Night": "夜間", + "Daylight": "日照", + "sun {n}°": "太陽 {n}°", + "Of {n} read, {total} loaded": "讀取 {n} 個,已載入 {total} 個", + "Of all {n}": "全部 {n} 個中", + "Of {n} in view": "視野內 {n} 個中", + "Error": "錯誤", + "Stale": "已過時", + "In view": "視野內", + "Globe view": "地球視圖", + "Nothing selected": "未選取任何內容", + "Worldwide now": "全球目前", + "Turn on {name}": "開啟 {name}", + "{n} loaded": "已載入 {n}", + "{n} in view": "視野內 {n}", + "Turn off {name}": "關閉 {name}", + "Camera height": "相機高度", + "Nothing in view matches “{text}”.": "視野內沒有與「{text}」相符的內容。", + "Nothing from the layers that are on is in view here. Zoom out to see more.": "已開啟的圖層在此處視野內沒有內容。縮小以檢視更多。", + "No loaded layer has anything in view. Turn some on in Data Layers.": "已載入的圖層在視野內都沒有內容。請在數據圖層中開啟一些。", + "Places in view": "視野內的地點", + "Show here": "在此顯示", + "Ask GEV what's here": "問問 GEV 這裡有什麼", + "aircraft": "飛機", + "vessel": "船舶", + "launch": "發射", + "fire": "火點", + "Fire detection": "火點偵測", + "fire perimeter": "火場範圍", + "earthquake": "地震", + "storm": "風暴", + "air quality station": "空氣品質站", + "installation": "設施", + "dam": "水壩", + "data centre": "資料中心", + "place": "地點", + "vehicle": "車輛", + "bike station": "單車站", + "plate reader": "車牌辨識器", + "camera": "攝影機", + "airspace": "空域", + "sighting": "目擊", + "Callsign": "呼號", + "Registration": "註冊號", + "Aircraft class": "機型類別", + "Course": "航線", + "Vertical rate": "垂直速率", + "Squawk": "應答機編碼", + "Emergency": "緊急情況", + "Last contact": "最後聯繫", + "Ship type": "船舶類型", + "Destination": "目的地", + "Depth": "深度", + "Time": "時間", + "Place": "地點", + "Fire power": "火點功率", + "Satellite": "衛星", + "Sensor": "感測器", + "Detected": "偵測時間", + "Contained": "已控制", + "Discovered": "發現時間", + "Basin": "海域", + "Index": "指數", + "Health risk": "健康風險", + "Bikes": "單車", + "Docks": "車樁", + "Floor": "下限", + "Ceiling": "上限", + "Active": "生效時間", + "NORAD ID": "NORAD 編號", + "MMSI": "MMSI", + "ICAO24": "ICAO24", + "Capacity": "容量", + "Output": "輸出", + "River": "河流", + "City": "城市", + "State": "州", + "Street": "街道", + "Opened": "啟用", + "Height": "高度", + "IT load": "IT 負載", + "Waterway": "水道", + "Military": "軍用", + "Land use": "土地用途", + "Telecom": "電信", + "feature": "要素", + "Empty": "空車", + "Many seats free": "空座較多", + "Few seats free": "空座較少", + "Standing room only": "僅剩站位", + "Crowded": "擁擠", + "Not taking passengers": "不載客", + "Major hurricane": "強颶風", + "Typhoon": "颱風", + "Super typhoon": "超強颱風", + "Tropical cyclone": "熱帶氣旋", + "Prescribed burn": "計畫燒除", + "Atlantic": "大西洋", + "Eastern Pacific": "東太平洋", + "Central Pacific": "中太平洋", + "Western Pacific": "西太平洋", + "Indian Ocean": "印度洋", + "Southern Hemisphere": "南半球", + "Cable tram": "纜索電車", + "Aerial lift": "空中纜車", + "Fishing": "漁船", + "Tug": "拖船", + "Sailing": "帆船", + "Pleasure craft": "遊艇", + "Pilot vessel": "引航船", + "Search and rescue": "搜救船", + "Law enforcement": "執法船", + "High-speed craft": "高速船", + "Passenger": "客船", + "Cargo": "貨船", + "Tanker": "油輪", + "Yes": "是", + "{n} ft": "{n} ft", + "{n} km/s": "{n} km/s", + "{n} km/h": "{n} km/h", + "{n} kt": "{n} kn", + "{n} ft/min": "{n} ft/min", + "{n}°": "{n}°", + "M {n}": "M {n}", + "{n} MW": "{n} MW", + "{n}%": "{n}%", + "{n} hPa": "{n} hPa", + "Hijack (squawk 7500)": "劫機(應答機編碼 7500)", + "Radio failure (squawk 7600)": "無線電故障(應答機編碼 7600)", + "Emergency (squawk 7700)": "緊急情況(應答機編碼 7700)", + "Emergency: {kind}": "緊急情況:{kind}", + "Emergency declared": "已宣布緊急情況", + "Tsunami warning issued": "已發布海嘯警報", + "VFR, no flight plan": "VFR,無飛行計畫", + "VFR conspicuity": "VFR 識別碼", + "IFR, no code yet": "IFR,尚未分配編碼", + "Hijack": "劫機", + "Climbing {n} ft/min": "爬升 {n} ft/min", + "Descending {n} ft/min": "下降 {n} ft/min", + "Cruising, level": "巡航,平飛", + "Airliners": "客機", + "Widebodies": "廣體機", + "Business jets": "公務機", + "Helicopters": "直升機", + "Turboprops": "渦槳飛機", + "Fast jets": "高速噴射機", + "Four-engine jets": "四發噴射機", + "M6 and above": "M6 及以上", + "M5 to 6": "M5 至 6", + "M4 to 5": "M4 至 5", + "Below M4": "M4 以下", + "{kind} {name}": "{kind}{name}", + "place|Country": "國家", + "altitude|Level": "平飛", + "{h} h {m} min": "{h} 小時 {m} 分鐘", + "{n} min": "{n} 分鐘", + "{speed} {direction}": "{direction}風 {speed}", + "{n} mm": "{n} 毫米" } diff --git a/src/i18n/same-as-english.json b/src/i18n/same-as-english.json index 74448c8be..fc856def9 100644 --- a/src/i18n/same-as-english.json +++ b/src/i18n/same-as-english.json @@ -47,7 +47,15 @@ "▲ {frp} MW", "ICAO: {id}", "MMSI: {id}", - "NORAD: {id}" + "NORAD: {id}", + "MMSI", + "ICAO24", + "{n}°", + "M {n}", + "{n}%", + "{n} hPa", + "{kind} {name}", + "{speed} {direction}" ], "de": [ "1090 MHz", @@ -257,7 +265,34 @@ "Wind (km/h)", "Story", "STORY", - "Japan" + "Japan", + "Wikipedia", + "Wikidata", + "Website", + "Mach", + "Squawk {code}", + "Signal", + "Magnitude", + "Live · {age}", + "{n} m", + "{n} km", + "Squawk", + "Sensor", + "Index", + "MMSI", + "ICAO24", + "Tanker", + "{n} ft", + "{n} km/s", + "{n} km/h", + "{n} ft/min", + "{n}°", + "M {n}", + "{n} MW", + "{n} hPa", + "Turboprops", + "{kind} {name}", + "{n} mm" ], "es": [ "1 min/s", @@ -425,7 +460,31 @@ "VIRTUAL", "Sensor", "{count} acres", - "California" + "California", + "Wikipedia", + "Wikidata", + "Mach", + "Squawk {code}", + "{n} acres", + "Inspector", + "{n} m", + "{n} km", + "Error", + "Squawk", + "MMSI", + "ICAO24", + "{n} ft", + "{n} km/s", + "{n} km/h", + "{n} ft/min", + "{n}°", + "M {n}", + "{n} MW", + "{n} hPa", + "{kind} {name}", + "{h} h {m} min", + "{n} min", + "{n} mm" ], "fr": [ "1 min/s", @@ -653,7 +712,35 @@ "Maritime", "Europe", "Globe", - "Sources" + "Sources", + "Wikidata", + "Mach", + "Squawk {code}", + "Signal", + "Magnitude", + "{n} acres", + "Altitude", + "{n} m", + "{n} km", + "installation", + "Squawk", + "Destination", + "Satellite", + "MMSI", + "ICAO24", + "Cargo", + "{n} ft", + "{n} km/s", + "{n} km/h", + "{n} ft/min", + "{n}°", + "M {n}", + "{n} MW", + "{n} hPa", + "{kind} {name}", + "{h} h {m} min", + "{n} min", + "{n} mm" ], "it": [ "1 min/s", @@ -862,7 +949,30 @@ "{count} datasets", "ZOOM", "followers", - "California" + "California", + "Wikipedia", + "Wikidata", + "Mach", + "Squawk {code}", + "{n} m", + "{n} km", + "Squawk", + "Satellite", + "MMSI", + "ICAO24", + "{n} ft", + "{n} km/s", + "{n} km/h", + "{n} ft/min", + "{n}°", + "M {n}", + "{n} MW", + "{n}%", + "{n} hPa", + "{kind} {name}", + "{h} h {m} min", + "{n} min", + "{n} mm" ], "ja": [ "1090 MHz", @@ -928,7 +1038,23 @@ "▲ {frp} MW", "ICAO: {id}", "MMSI: {id}", - "NORAD: {id}" + "NORAD: {id}", + "{n} m", + "{n} km", + "NORAD ID", + "MMSI", + "ICAO24", + "{n} ft", + "{n} km/s", + "{n} km/h", + "{n} kt", + "{n} ft/min", + "{n}°", + "M {n}", + "{n} MW", + "{n}%", + "{n} hPa", + "{n} mm" ], "pt": [ "1 min/s", @@ -1095,7 +1221,32 @@ "Regional", "VIRTUAL", "Sensor", - "{count} acres" + "{count} acres", + "Wikidata", + "Mach", + "Squawk {code}", + "Magnitude", + "{n} acres", + "Altitude", + "{n} m", + "{n} km", + "Squawk", + "MMSI", + "ICAO24", + "{n} ft", + "{n} km/s", + "{n} km/h", + "{n} kt", + "{n} ft/min", + "{n}°", + "M {n}", + "{n} MW", + "{n}%", + "{n} hPa", + "{kind} {name}", + "{h} h {m} min", + "{n} min", + "{n} mm" ], "ru": [ "1900–1945", @@ -1132,7 +1283,14 @@ "ICAO: {id}", "MMSI: {id}", "NORAD: {id}", - "{datasets} · {tiles} · {packs}" + "{datasets} · {tiles} · {packs}", + "NORAD ID", + "MMSI", + "ICAO24", + "{n}°", + "M {n}", + "{n}%", + "{kind} {name}" ], "sv": [ "STATION", @@ -1295,7 +1453,35 @@ "MMSI: {id}", "Status", "Region", - "Japan" + "Japan", + "Wikipedia", + "Wikidata", + "Mach", + "Squawk {code}", + "Signal", + "{n} acres", + "Live · {age}", + "{n} m", + "{n} km", + "storm", + "Squawk", + "Destination", + "Sensor", + "Index", + "MMSI", + "ICAO24", + "{n} ft", + "{n} km/s", + "{n} km/h", + "{n} ft/min", + "{n}°", + "M {n}", + "{n} MW", + "{n} hPa", + "{kind} {name}", + "{h} h {m} min", + "{n} min", + "{n} mm" ], "uk": [ "1900–1945", @@ -1326,7 +1512,14 @@ "{division}, {country}", "ICAO: {id}", "MMSI: {id}", - "NORAD: {id}" + "NORAD: {id}", + "NORAD ID", + "MMSI", + "ICAO24", + "{n}°", + "M {n}", + "{n}%", + "{kind} {name}" ], "zh-CN": [ "1090 MHz", @@ -1397,7 +1590,20 @@ "CC BY 4.0", "acartia.io ↗", "iNaturalist ↗", - "iNaturalist" + "iNaturalist", + "{n} m", + "{n} km", + "MMSI", + "ICAO24", + "{n} ft", + "{n} km/s", + "{n} km/h", + "{n} ft/min", + "{n}°", + "M {n}", + "{n} MW", + "{n}%", + "{n} hPa" ], "zh-Hant": [ "1090 MHz", @@ -1468,7 +1674,20 @@ "CC BY 4.0", "acartia.io ↗", "iNaturalist ↗", - "iNaturalist" + "iNaturalist", + "{n} m", + "{n} km", + "MMSI", + "ICAO24", + "{n} ft", + "{n} km/s", + "{n} km/h", + "{n} ft/min", + "{n}°", + "M {n}", + "{n} MW", + "{n}%", + "{n} hPa" ], "he": [ "{speed} kn", @@ -1568,6 +1787,21 @@ "Ironbow", "ICAO: {id}", "MMSI: {id}", - "NORAD: {id}" + "NORAD: {id}", + "{n} m", + "{n} km", + "MMSI", + "ICAO24", + "{n} ft", + "{n} km/s", + "{n} km/h", + "{n} kt", + "{n} ft/min", + "{n}°", + "M {n}", + "{n} MW", + "{n}%", + "{n} hPa", + "{kind} {name}" ] } diff --git a/src/layers/awareness/panel.js b/src/layers/awareness/panel.js index 9d9bf75af..9ccda4e92 100644 --- a/src/layers/awareness/panel.js +++ b/src/layers/awareness/panel.js @@ -222,9 +222,14 @@ export function createPanel({ state: layerState, parts }) { ensurePanel(); layerState.panelRenders += 1; const { subject, cohorts } = layerState.results; + const windowLabel = t('{distance} FLIGHT / VESSEL WINDOW', { + distance: presentAwarenessDistance(AWARENESS_RADIUS_M), + }); publish({ kind: 'results', - subject: `${subject.label} · ${t('{distance} FLIGHT / VESSEL WINDOW', { distance: presentAwarenessDistance(AWARENESS_RADIUS_M) })}`, + subject: `${subject.label} · ${windowLabel}`, + subjectIdentity: { layerId: subject.layerId, id: subject.id }, + subjectLabel: subject.label, subjectNames: presentNames(subject.memberNames), photo: presentPhoto(subject), navigation: presentNavigation(), diff --git a/src/layers/flights/queries.js b/src/layers/flights/queries.js index 91ed4ea95..3e3074f95 100644 --- a/src/layers/flights/queries.js +++ b/src/layers/flights/queries.js @@ -246,6 +246,19 @@ export function createQueries({ * routeDestination: string|null}} */ + /** An airport at one end of a route, when it has a position. */ + function routeEnd(airport) { + const lat = Number(airport?.lat ?? airport?.latitude); + const lon = Number(airport?.lon ?? airport?.longitude); + if (!Number.isFinite(lat) || !Number.isFinite(lon)) return null; + return { + code: String(airport?.code ?? '').trim() || null, + name: String(airport?.name ?? airport?.municipality ?? '').trim() || null, + lat, + lon, + }; + } + function mapAnalystRecord( icao24, info, @@ -293,6 +306,19 @@ export function createQueries({ lastContactAtMs: num(info?.lastContactEpochMs), routeOrigin: routeOk ? text(info?.route?.origin?.code) : null, routeDestination: routeOk ? text(info?.route?.destination?.code) : null, + // The airports themselves, for the context card's route globe. + routeFrom: routeOk ? routeEnd(info?.route?.origin) : null, + routeTo: routeOk ? routeEnd(info?.route?.destination) : null, + // The scheduled route when it does not fit where the plane is (often + // another leg of the same flight number): the card shows it marked + // unverified, everything else still treats the flight as routeless. + routeScheduled: + !routeOk && info?.route?.origin?.code && info?.route?.destination?.code + ? { + from: text(info.route.origin.code), + to: text(info.route.destination.code), + } + : null, }; } const methods = { @@ -748,6 +774,18 @@ export function createQueries({ return result; }, + /** + * Ask for an aircraft's scheduled route (origin and destination airports), + * as tracking does; it lands on the record when the lookup answers. + * @param {string} icao24 + */ + requestRoute(icao24) { + if (icao24) + parts.enrichment._requestRouteEnrichment( + String(icao24).trim().toLowerCase(), + ); + }, + /** * Start camera-tracking an aircraft by ICAO24 address. * @param {string} icao24 - ICAO 24-bit transponder address. diff --git a/src/layers/transit/queries.js b/src/layers/transit/queries.js index 28aff8b63..738a1c17c 100644 --- a/src/layers/transit/queries.js +++ b/src/layers/transit/queries.js @@ -5,12 +5,23 @@ import { transitDetectionClass, transitDetectionId, transitDetectionMetric, + vehicleReportTimeMs, } from './policy.js'; import { TRANSIT_ENABLED_FEEDS, getRegisteredTransitFeed, + transitRouteLabel, } from '../../data/transitFeeds.js'; import { transitModeTier } from '../../data/transitPresetStyle.js'; +import { displayMotion } from './movement.js'; + +/** The display's motion word as a record field for the Context card. */ +const MOTION_FIELD = Object.freeze({ + 'EN ROUTE': 'moving', + STOPPED: 'stopped', + WAITING: 'waiting', + 'NO FIX': 'no-fix', +}); /** Regions, not feeds: one region can carry several feeds (Rio has two). */ const TRANSIT_REGION_COUNT = new Set( @@ -211,10 +222,14 @@ export function createQueries({ state, parts }) { * query engine. On demand only (once per spoken query); [] while the * layer is off. * @param {number} [maxCount=Infinity] Most records to return. - * @returns {Array} {id, label, routeId, mode, lat, lon, speedMps, courseDeg, status, occupancy}. + * @returns {Array} {id, label, routeId, mode, lat, lon, speedMps, courseDeg, status, occupancy}, + * plus `key` (the layer's own vehicle key, which a map click carries), + * `route`, `operator`, `place`, `observedMs` and `motion` (what the + * display shows: moving, stopped, waiting or no-fix) for the Context card. */ getAnalystRecords(maxCount = Infinity) { if (!state._enabled) return []; + const now = Date.now(); const num = (v) => (Number.isFinite(v) ? v : null); const result = []; for (const entry of state._vehicles.values()) { @@ -222,6 +237,8 @@ export function createQueries({ state, parts }) { const record = entry.record || {}; if (!Number.isFinite(record.lat) || !Number.isFinite(record.lon)) continue; + const feed = feedForEntry(state, entry); + const reportedMs = vehicleReportTimeMs(record, entry.fetchedAt); result.push({ id: record.label || record.id || entry.key, label: record.label || null, @@ -233,6 +250,15 @@ export function createQueries({ state, parts }) { courseDeg: num(entry.courseDeg ?? record.bearing), status: record.status || null, occupancy: record.occupancy || null, + key: entry.key, + route: + record.routeId && feed + ? transitRouteLabel(feed, record.routeId) + : record.routeId || null, + operator: feed?.name || null, + place: feed?.region || null, + observedMs: Number.isFinite(reportedMs) ? reportedMs : null, + motion: MOTION_FIELD[displayMotion(entry, now).word] || null, }); } return result; diff --git a/src/ui/applicationShell.js b/src/ui/applicationShell.js index 35a5e2062..3546f3800 100644 --- a/src/ui/applicationShell.js +++ b/src/ui/applicationShell.js @@ -71,6 +71,8 @@ import { useHudStore } from './stores/hud.js'; import { useDisplayStore } from './stores/display.js'; import { useLocaleStore } from './stores/locale.js'; import { useLocationStore } from './stores/location.js'; +import { useOmnibarStore } from './stores/omnibar.js'; +import { installEntityContext } from './entityContextBridge.js'; import { installRailEdgeScroll } from './railEdgeScroll.js'; import { useCockpitStore } from './stores/cockpit.js'; import { useGlobeActionsStore } from './stores/globeActions.js'; @@ -171,6 +173,12 @@ export class StyleManager extends ShellFacade { }); // Vue views share this runtime and its stores; dispose unmounts them. this._ui = createUiRuntime({ pinia: applicationPinia() }); + // The omnibar and Context list and toggle data layers through the shell. + useOmnibarStore(applicationPinia()).connect({ + layers: () => this._dataManager?.getAll?.() || [], + setLayer: (id, enabled) => + this._dataManager?.setEnabled(id, enabled, { origin: 'user' }), + }); // Scrolling at a screen edge steps through that side's rail panels. this._removeRailEdgeScroll = installRailEdgeScroll(); this._feedback = new ShellFeedback({ @@ -184,6 +192,15 @@ export class StyleManager extends ShellFacade { this._updateGlobalLoadingFeedback(), ); this.viewer = viewer; + // A click on anything a layer can identify opens its card in Context. + this._removeEntityContext = installEntityContext({ + viewer, + getDataManager: () => this._dataManager, + pinia: applicationPinia(), + pickWorld: services.pickWorldFromScreen, + regionalBrief: services.fetchRegionalBrief, + overlayHit: services.hitTestWorldOverlay, + }); this.mapStackController = mapStackController; this.placeSearch = placeSearch; @@ -1879,7 +1896,9 @@ export class StyleManager extends ShellFacade { const { destroyTrackedReadout, destroyWorldOverlay, destroyDetection } = this.services; if (this._disposed) return; + useOmnibarStore(applicationPinia()).connect(null); this._removeRailEdgeScroll?.(); + this._removeEntityContext?.(); this._shareRestoration.destroy(); this._feedback.clearLoadingStatus(); this._disposed = true; diff --git a/src/ui/cockpitTrackingController.js b/src/ui/cockpitTrackingController.js index edbb61d0d..8e3868bb7 100644 --- a/src/ui/cockpitTrackingController.js +++ b/src/ui/cockpitTrackingController.js @@ -809,10 +809,11 @@ export function exit({ restoreTracking = true } = {}) { this.services.satellitesLayer?.refocusTrackedById?.(satelliteSubject); } this.syncEntry(); - // Back to whichever entry was used: the Contacts button or the readout's. + // Return to the card or readout control that opened Cockpit. const readoutEntry = document.getElementById('cockpit-entry-readout'); const restoreTarget = this.entryFocusOrigin === this.entry || + this.entryFocusOrigin?.hasAttribute('data-entity-cockpit-entry') || (readoutEntry && this.entryFocusOrigin === readoutEntry) ? this.entryFocusOrigin : this.entry || this.entryFocusOrigin; diff --git a/src/ui/composition.js b/src/ui/composition.js index 169e73e53..3a24fe464 100644 --- a/src/ui/composition.js +++ b/src/ui/composition.js @@ -29,6 +29,7 @@ import { import { activateWorldOverlayAction, destroyWorldOverlay, + hitTestWorldOverlay, initWorldOverlay, subscribeWorldOverlayActions, } from '../overlays/worldOverlay.js'; @@ -73,6 +74,7 @@ export class StyleManager extends ApplicationShell { super(viewer, { ...options, services: { + hitTestWorldOverlay, CITY_POIS, GLOBE_VIEW, flyToGlobeView, diff --git a/src/ui/contextLayerChanges.js b/src/ui/contextLayerChanges.js index 295242239..25ee7725c 100644 --- a/src/ui/contextLayerChanges.js +++ b/src/ui/contextLayerChanges.js @@ -249,6 +249,21 @@ export function _handleContextLayerChange(change) { ); } } + if ( + change.type === 'visibility' && + change.enabled && + change.origin === 'user' && + !this.cockpitView?.active && + (change.layerId === 'radio' || change.layerId === 'rocket-launches') + ) { + // Context's panel shows its main tab for them (ContextView listens). + globalThis.dispatchEvent?.(new Event('gev:context-show-view')); + this.actions.setPanelCollapsed('global-context-panel', false, { + explicit: true, + }); + if (change.layerId === 'radio') + this.actions.setPanelCollapsed('radio-panel', false, { explicit: true }); + } // Turning off the layer the view rides ends it; every other layer may be // turned on or off freely during a session. const riddenLayerId = this.cockpitView?.active diff --git a/src/ui/contextLayerTabs.js b/src/ui/contextLayerTabs.js new file mode 100644 index 000000000..f7402515e --- /dev/null +++ b/src/ui/contextLayerTabs.js @@ -0,0 +1,95 @@ +import { computed, ref } from 'vue'; +import { msg } from '../i18n/index.js'; + +// Context's layer tabs: when a layer that has its own settings is on, those +// settings move out of the panel they normally live in (Visual) into a tab +// in the Context panel, so they sit beside what they affect. +// Each tab's content is teleported into `#context-tab-`; when the layer +// goes off the content returns to its usual panel. +const AIRCRAFT = ['flights', 'military', 'local-adsb']; + +// Layers that draw labels and cards through the world overlay, which the +// Dense settings (density, allocation, fade, outside) govern. +export const LABEL_LAYERS = new Set([ + 'satellites', + 'ais-live-vessels', + 'rocket-launches', + 'cctv', + 'transit', + 'bikeshare', + 'radio', + 'local-adsb', + 'earthquakes', + 'local-firms', + 'fire-perimeters', + 'weather-cyclones', + 'air-quality', + 'alpr-cameras', + 'drone-airspace', + 'military-installations', + 'telegeography-submarine-cables', + 'osm-places', + 's2-ghostmaps', + 'directions', +]); + +// Which of the layers that are on each tab acts on. +export const TAB_AFFECTS = { + labels: (on) => [...on].filter((id) => LABEL_LAYERS.has(id)), + aircraft: (on) => [...on].filter((id) => AIRCRAFT.includes(id)), +}; + +export const LAYER_TABS = [ + // Labels and cards the world overlay draws for the label layers. + { + id: 'labels', + label: msg('Labels'), + icon: 'label', + when: (on) => TAB_AFFECTS.labels(on).length > 0, + }, + { + id: 'aircraft', + label: msg('3D aircraft'), + icon: 'flight', + when: (on) => TAB_AFFECTS.aircraft(on).length > 0, + }, +]; + +/** Ids of the layers that are on; Context refreshes it. */ +export const enabledLayerIds = ref(new Set()); + +export function setEnabledLayers(ids) { + const next = new Set(ids); + const prev = enabledLayerIds.value; + if (next.size === prev.size && [...next].every((id) => prev.has(id))) return; + enabledLayerIds.value = next; +} + +/** Whether Context is mounted and can host tab content. */ +export const contextReady = ref(false); + +/** The tabs available now. */ +export const availableTabs = computed(() => + contextReady.value + ? LAYER_TABS.filter((tab) => tab.when(enabledLayerIds.value)) + : [], +); + +export const hasTab = (id) => availableTabs.value.some((tab) => tab.id === id); + +/** The tab Context shows: 'view' (the card) or a layer tab's id. */ +export const activeTab = ref('view'); + +// Each tab's content lands in an element made here, before any panel mounts, +// so a panel that mounts ahead of Context still has a real target; Context +// places these elements in its tab panes when it mounts. +const targets = new Map(); +export function tabTarget(id) { + if (!targets.has(id) && globalThis.document) { + const el = document.createElement('div'); + el.className = 'context-tab-body'; + el.dataset.tab = id; + targets.set(id, el); + } + return targets.get(id) ?? 'body'; +} diff --git a/src/ui/contextRadius.js b/src/ui/contextRadius.js new file mode 100644 index 000000000..807c3ac51 --- /dev/null +++ b/src/ui/contextRadius.js @@ -0,0 +1,45 @@ +import { ref } from 'vue'; + +// How far out Context looks for what is "nearby": one distance for every +// nearby block (flights, vessels, hazards, alerts, other loaded items). The +// control in the Context panel steps through a few distances; the choice is +// kept for the next visit. +const KEY = 'gev.contextRadiusKm'; + +/** The distances the control steps through, in km. */ +export const CONTEXT_RADIUS_STEPS = Object.freeze([ + 25, 50, 100, 250, 500, 1000, 2500, +]); +export const DEFAULT_CONTEXT_RADIUS_KM = 250; + +/** The step closest to a distance; the default for anything unusable. */ +export function nearestRadiusStep(km) { + const value = Number(km); + if (!Number.isFinite(value) || value <= 0) return DEFAULT_CONTEXT_RADIUS_KM; + return CONTEXT_RADIUS_STEPS.reduce((best, step) => + Math.abs(step - value) < Math.abs(best - value) ? step : best, + ); +} + +function read() { + try { + const saved = globalThis.localStorage?.getItem(KEY); + return saved === null || saved === undefined + ? DEFAULT_CONTEXT_RADIUS_KM + : nearestRadiusStep(saved); + } catch { + return DEFAULT_CONTEXT_RADIUS_KM; + } +} + +/** The radius every nearby block uses, in km. */ +export const contextRadiusKm = ref(read()); + +export function setContextRadiusKm(km) { + contextRadiusKm.value = nearestRadiusStep(km); + try { + globalThis.localStorage?.setItem(KEY, String(contextRadiusKm.value)); + } catch { + // Without storage the choice lasts for this visit. + } +} diff --git a/src/ui/contextSearch.js b/src/ui/contextSearch.js new file mode 100644 index 000000000..ebf5835b1 --- /dev/null +++ b/src/ui/contextSearch.js @@ -0,0 +1,31 @@ +import { computed, ref } from 'vue'; + +// The Context panel's own search: one field in its header that narrows what +// the panel is showing (the selected item's details, and every list of what +// is nearby or in view) to what holds the typed text. + +/** Whether the search field is showing. */ +export const contextSearchOpen = ref(false); +/** The text as typed. */ +export const contextSearchText = ref(''); +/** The text to match against: trimmed, lower case, '' when not searching. */ +export const contextNeedle = computed(() => + contextSearchOpen.value ? contextSearchText.value.trim().toLowerCase() : '', +); + +/** Whether any of the given strings holds the searched text (true when not searching). */ +export function matchesContextSearch(...parts) { + const needle = contextNeedle.value; + if (!needle) return true; + return parts.some( + (part) => + part !== null && + part !== undefined && + String(part).toLowerCase().includes(needle), + ); +} + +export function closeContextSearch() { + contextSearchOpen.value = false; + contextSearchText.value = ''; +} diff --git a/src/ui/entityContextBridge.js b/src/ui/entityContextBridge.js new file mode 100644 index 000000000..6bfa6b24f --- /dev/null +++ b/src/ui/entityContextBridge.js @@ -0,0 +1,360 @@ +import { resolvePickedContext } from '../data/pickedContext.js'; +import { followedOf, onFollowChanged } from '../data/followed.js'; +import { fromDegreesInto } from '../geo/ellipsoid.js'; +import { inputFor } from '../input/dispatcher.js'; +import { + isTrackingClickGesture, + isTrackingSelectionGesture, +} from '../data/trackingClickGesture.js'; +import { findCamera } from '../render/rendererOf.js'; +import { useCockpitStore } from './stores/cockpit.js'; +import { useEntityCardStore } from './stores/entityCard.js'; +import { useOmnibarStore } from './stores/omnibar.js'; +import { usePanelChromeStore } from './stores/panelChrome.js'; +import { useVoiceStore } from './stores/voice.js'; + +/** Camera distance (m) that frames an item of each kind. */ +const FRAME_RANGE = Object.freeze({ + aircraft: 30_000, + vessel: 9_000, + satellite: 2_500_000, + earthquake: 120_000, + storm: 1_500_000, + fire: 20_000, + 'fire perimeter': 40_000, +}); +const DEFAULT_RANGE = 8_000; +/** + * Items the camera can follow: their layers follow through the camera port + * with a key naming the item (src/data/followed.js). A vessel is flown to. + */ +const FOLLOWABLE = new Set(['flights', 'military', 'satellites']); + +/** + * Connects the Context panel's entity card to the globe: a click on anything a + * layer can identify opens its card, and the card's actions fly to it, follow + * it or ask GEV about it. Layers keep their own click behaviour; this listens + * alongside them. + * @param {object} options + * @param {object} options.viewer Cesium viewer. + * @param {() => object} options.getDataManager Layer lifecycle. + * @param {object} options.pinia + * @param {(viewer: object, x: number, y: number) => ({lat: number, lon: number}|null)} [options.pickWorld] + * The ground under a normalized screen point; the view's centre falls back + * to the point under the camera without it. + * @param {(lat: number, lon: number) => Promise} [options.regionalBrief] + * The app's regional brief service, for the weather and news Context shows. + * @param {(x: number, y: number) => object|null} [options.overlayHit] + * The overlay card under a screen point, if any (a vessel's, a fire's). + * @returns {() => void} disconnects + */ +export function installEntityContext({ + viewer, + getDataManager, + pinia, + pickWorld, + regionalBrief, + overlayHit, +}) { + const store = useEntityCardStore(pinia); + const omnibar = useOmnibarStore(pinia); + const voice = useVoiceStore(pinia); + const cockpitStore = useCockpitStore(pinia); + const chrome = usePanelChromeStore(pinia); + /** Whether Context is open; a closed panel reads nothing. */ + const isOpen = () => + chrome.panels['global-context-panel']?.collapsed === false; + const doc = globalThis.document; + let disposed = false; + // The renderer's camera; looked up on use, as a renderer can be bound + // after Context is installed. + const camera = () => findCamera(viewer); + /** Whether the camera follows this card's item (the follow's key). */ + const followsCard = (card, followed = followedOf(viewer)) => { + const key = followed?.key; + if (!key || !card) return false; + return key === card.key || key === `${card.layerId}:${card.identity?.id}`; + }; + const inCockpit = () => + Boolean(doc?.body?.classList.contains('cockpit-mode')); + + function openPanel() { + const button = doc?.querySelector( + '.ui-rail--right .ui-rail__item[data-rail-item="global-context-panel"]', + ); + if (button && button.getAttribute('aria-pressed') !== 'true') + button.click(); + } + + function flyTo(card) { + const port = camera(); + if (!port || !Number.isFinite(card?.lat) || !Number.isFinite(card?.lon)) + return; + const height = Number.isFinite(card.altitudeM) ? card.altitudeM : 0; + const range = FRAME_RANGE[card.kind] ?? DEFAULT_RANGE; + port.flyToBounds( + { + center: fromDegreesInto(card.lon, card.lat, Math.max(0, height), { + x: 0, + y: 0, + z: 0, + }), + radius: 1, + }, + { + offset: { + heading: port.pose().heading, + pitch: ((card.kind === 'satellite' ? -90 : -45) * Math.PI) / 180, + range, + }, + durationS: 2, + }, + ); + } + + function follow(card) { + const run = omnibar.runner; + if (!run || !FOLLOWABLE.has(card.layerId)) return flyTo(card); + Promise.resolve( + run('track_entity', { + query: card.identity.id || card.title, + layerId: card.layerId, + }), + ).catch(() => {}); + } + + // Closing the card lets go of the camera, when the camera follows the + // card's own item and nothing else took it over since. + function letGo(card) { + if (!followsCard(card)) return; + // Only the card's own layer lets go, as the person's own action; other + // layers' selections stay as they are. + const layer = getDataManager()?.layers?.get?.(card.layerId); + try { + layer?.module?.stopTracking?.({ origin: 'user' }); + } catch { + // A layer going away meanwhile has nothing left to let go of. + } + } + + // Aircraft can be flown from, and a satellite ridden in the orbital view: + // track the craft, then enter Cockpit on it. Only layers the tracking + // action can follow are offered (local ADS-B cannot be tracked). + const COCKPIT_LAYERS = new Set(['flights', 'military', 'satellites']); + async function cockpit(card) { + try { + await enterCockpit(card); + } catch { + // The craft left the feed or tracking failed; the card stays as it is. + } + } + async function enterCockpit(card) { + const run = omnibar.runner; + if (!run || !COCKPIT_LAYERS.has(card.layerId)) return; + await run('track_entity', { + query: card.identity.id || card.title, + layerId: card.layerId, + }); + if (disposed) return; + if (card.layerId !== 'satellites') { + await run('control_cockpit', { action: 'enter' }); + return; + } + // A satellite is ridden through the app's own Cockpit entry, which offers + // the orbital view once the satellite is tracked. Wait for it to say so; + // if it never does (a class that cannot be ridden), nothing is entered. + for (let tries = 0; tries < 40; tries++) { + // Another pick or a closed card in the meantime calls the ride off. + if (disposed || store.card?.key !== card.key) return; + const presence = cockpitStore.presence; + if (presence?.entryAvailable && presence.entryKind === 'satellite') { + doc?.getElementById('cockpit-entry')?.click(); + return; + } + await new Promise((resolve) => setTimeout(resolve, 100)); + } + } + + function askText(prompt) { + voice.controls?.emit('chat-restore'); + voice.controls?.emit('chat-prompt', prompt); + voice.controls?.emit('chat-submit'); + } + + function ask(card) { + const where = + Number.isFinite(card.lat) && Number.isFinite(card.lon) + ? ` at ${card.lat.toFixed(3)}, ${card.lon.toFixed(3)}` + : ''; + const prompt = `Tell me about the ${card.kind} ${card.title} (${card.layerName})${where}, and what is around it.`; + voice.controls?.emit('chat-restore'); + voice.controls?.emit('chat-prompt', prompt); + voice.controls?.emit('chat-submit'); + } + + store.connect({ + dataManager: getDataManager, + openPanel, + flyTo, + follow, + letGo, + isOpen, + regionalBrief, + ask, + askText, + cockpit, + canCockpit: (card) => + Boolean(omnibar.runner) && COCKPIT_LAYERS.has(card?.layerId), + canFollow: (card) => FOLLOWABLE.has(card?.layerId), + // Where the camera is, so a search prefers what is close by. + here: () => { + const pose = camera()?.pose(); + return pose && Number.isFinite(pose.lat) && Number.isFinite(pose.lon) + ? { lat: pose.lat, lon: pose.lon } + : null; + }, + }); + + // What the camera shows, for the Context panel to describe when nothing is + // picked: the ground under the middle of the screen, the view's bounds and + // the height. Read when the camera settles, not every frame. + const readView = () => { + const port = camera(); + if (!port || !isOpen()) return; + const pose = port.pose(); + if (![pose.lat, pose.lon, pose.height].every(Number.isFinite)) return; + const middle = pickWorld?.(viewer, 0.5, 0.5); + const center = middle + ? { lat: middle.lat, lon: middle.lon } + : { lat: pose.lat, lon: pose.lon }; + const rect = port.viewRectangle() ?? { + west: -180, + south: -90, + east: 180, + north: 90, + }; + store.setView({ center, rect, heightM: pose.height }); + }; + // Read when the camera settles. A camera that keeps moving (following an + // aircraft, a long fly-to) never settles, and a jump (a share link, a + // restored view) raises no moveEnd, so also read it on large changes: at + // most once a second, and once more after the last change, so the view it + // stops at is the one described. + let lastRead = 0; + let trailing = null; + const onChanged = () => { + clearTimeout(trailing); + const now = performance.now(); + if (now - lastRead >= 1000) { + lastRead = now; + readView(); + return; + } + trailing = setTimeout( + () => { + lastRead = performance.now(); + readView(); + }, + 1000 - (now - lastRead), + ); + }; + let cameraOff = []; + const listen = () => { + const port = camera(); + if (!port || cameraOff.length) return; + cameraOff = [port.on('moveEnd', readView), port.on('changed', onChanged)]; + }; + listen(); + const firstRead = setTimeout(() => { + listen(); + readView(); + }, 0); + // Opening the panel describes the view as it is now. + let wasOpen = isOpen(); + const offChrome = chrome.$subscribe(() => { + const open = isOpen(); + if (open && !wasOpen) readView(); + wasOpen = open; + }); + + /** Layers whose own map click already follows what was clicked. */ + const CLICK_FOLLOWS = new Set(['flights', 'military', 'satellites']); + + // Keep the card's "following" in step with the camera: it says Following + // while the camera follows the card's own item (the follow's key names + // it) and not otherwise, whoever started or ended the follow. A layer + // switching what it follows lets go for a moment and takes hold again in + // the same turn, so this is checked once that settles. + let followCheck = 0; + const offFollow = onFollowChanged(viewer, () => { + clearTimeout(followCheck); + const card = store.card; + // Taking hold of the card's item shows at once; letting go waits a + // moment, in case the layer is only switching follows. + if (followsCard(card)) { + store.following = card.key; + return; + } + followCheck = setTimeout(() => { + const now = store.card; + store.following = followsCard(now) ? now.key : null; + }, 250); + }); + + // A click on anything a layer can identify opens its card. The input + // dispatcher hands every subscriber the same click, picked once before + // any layer acts on it, and only while no tool holds the pointer. + const offClick = inputFor(viewer).onClick((event) => { + // Cockpit has its own picks, and Context is hidden while it runs. A + // camera drag never selects, even if it ends over something. + if (inCockpit() || !isTrackingSelectionGesture(event.gesture)) return; + const identity = resolvePickedContext(event.hit, { + dataManager: getDataManager(), + }); + if (identity) { + // These layers start following on their own click; following again + // from here would fight them (the flights layer reads a second track + // of the same plane as a click on empty map and lets go). + store.select(identity, { follow: !CLICK_FOLLOWS.has(identity.layerId) }); + return; + } + // A click on open ground, sea or sky lets go of what was selected. A + // click on something else Context cannot describe (a label, a trail) + // leaves the card as it is. + // Only a clean click lets go, as the layers' own clicks do; a card + // painted on the overlay (a vessel's, a fire's) is not open map. + if ( + event.surface && + isTrackingClickGesture(event.gesture) && + !overlayHit?.(event.screenPosition?.x, event.screenPosition?.y) + ) + store.clear(); + }); + + // Layers that select through the context store (GeoJSON sites, fires, + // installations) announce it; their selection opens the card too. + const onSelected = ({ detail: record }) => { + if (!record?.layerId || inCockpit()) return; + store.select({ + layerId: record.layerId, + id: record.id, + label: record.label || record.properties?.name, + lat: record.latitude, + lon: record.longitude, + }); + }; + globalThis.addEventListener?.('gev:entity-selected', onSelected); + + return () => { + disposed = true; + clearTimeout(firstRead); + offClick(); + for (const off of cameraOff) off?.(); + clearTimeout(trailing); + offFollow(); + offChrome(); + clearTimeout(followCheck); + globalThis.removeEventListener?.('gev:entity-selected', onSelected); + store.connect(null); + }; +} diff --git a/src/ui/spotConditions.js b/src/ui/spotConditions.js new file mode 100644 index 000000000..963b65cf2 --- /dev/null +++ b/src/ui/spotConditions.js @@ -0,0 +1,248 @@ +import { codeWord, distanceKm } from '../data/entityContext.js'; +import { formatNumber, msg, t, tn } from '../i18n/index.js'; +import { createUsgsEarthquakeSource } from '../layers/earthquakes/source.js'; +import { createCycloneSource } from '../layers/cyclones/source.js'; +import { createWfigsPerimeterSource } from '../layers/perimeters/source.js'; +import { createFirmsSource } from '../layers/firms/source.js'; + +// What is going on around one spot on the map: the weather there now and the +// local headlines (the app's regional brief, the same one Cockpit shows), and +// the natural hazards near it from the feeds the hazard layers read +// (earthquakes, tropical storms, wildfire perimeters, satellite fire hits). +// The feeds are global snapshots, so each is fetched once and kept for a few +// minutes whichever spot asks; the brief is kept per spot. + +const BRIEF_TTL_MS = 10 * 60_000; +const FEED_TTL_MS = 5 * 60_000; + +const briefs = new Map(); +/** + * The regional brief for a spot: `{weather, articles, place, newsSource}`, + * read with `load`, the app's regional service. A failed read is not kept, + * so the next ask tries again. + * @param {number} lat + * @param {number} lon + * @param {(lat: number, lon: number) => Promise} load + * @param {{force?: boolean}} [options] `force` reads again whatever is kept. + */ +export function regionalBrief(lat, lon, load, { force = false } = {}) { + const key = `${lat.toFixed(2)},${lon.toFixed(2)}`; + const kept = briefs.get(key); + if (!force && kept && Date.now() - kept.at < BRIEF_TTL_MS) + return kept.promise; + const forget = () => { + if (briefs.get(key)?.promise === promise) briefs.delete(key); + return null; + }; + const promise = Promise.resolve() + .then(() => load(lat, lon)) + .then((brief) => brief ?? forget(), forget); + briefs.set(key, { at: Date.now(), promise }); + if (briefs.size > 40) briefs.delete(briefs.keys().next().value); + return promise; +} + +const feeds = new Map(); +function snapshot(name, load, force) { + const kept = feeds.get(name); + if (!force && kept && Date.now() - kept.at < FEED_TTL_MS) return kept.promise; + const promise = load().catch(() => null); + feeds.set(name, { at: Date.now(), promise }); + return promise; +} +const quakes = (force) => + snapshot('quakes', () => createUsgsEarthquakeSource().getSnapshot(), force); +const storms = (force) => + snapshot('storms', () => createCycloneSource().getSnapshot(), force); +const perimeters = (force) => + snapshot( + 'perimeters', + () => createWfigsPerimeterSource().getSnapshot(), + force, + ); +const fires = (force) => + snapshot('fires', () => createFirmsSource().getSnapshot(), force); + +// English compass points, which the UI shows through t(). +const COMPASS = [ + msg('N'), + msg('NE'), + msg('E'), + msg('SE'), + msg('S'), + msg('SW'), + msg('W'), + msg('NW'), +]; +/** The compass point from one spot to another, like "NE". */ +export function compassPoint(from, to) { + const rad = Math.PI / 180; + const y = Math.sin((to.lon - from.lon) * rad) * Math.cos(to.lat * rad); + const x = + Math.cos(from.lat * rad) * Math.sin(to.lat * rad) - + Math.sin(from.lat * rad) * + Math.cos(to.lat * rad) * + Math.cos((to.lon - from.lon) * rad); + const deg = (Math.atan2(y, x) / rad + 360) % 360; + return compassName(deg); +} + +/** The compass point for a bearing in degrees. */ +export function compassName(deg) { + return COMPASS[Math.round((((deg % 360) + 360) % 360) / 45) % 8]; +} + +// The middle of a perimeter's first ring, close enough for "how far". +function perimeterMiddle(row) { + const ring = row?.polygons?.[0]?.[0]; + if (!Array.isArray(ring) || !ring.length) return null; + let lat = 0; + let lon = 0; + for (const [x, y] of ring) { + lon += x; + lat += y; + } + return { lat: lat / ring.length, lon: lon / ring.length }; +} + +/** A storm as "Hurricane Melissa": its class in words when the code has them. */ +function stormTitle(storm) { + const word = codeWord('classification', storm.classification); + if (!word) + return [storm.classification, storm.name].filter(Boolean).join(' '); + return storm.name + ? t('{kind} {name}', { kind: t(word), name: storm.name }) + : t(word); +} + +/** + * Hazards within a radius of a spot, nearest first within each kind: + * `[{kind, icon, title, detail, distanceKm, at}]`. Every kind uses the same + * radius, the one Context's radius control sets. Satellite fire hits need a + * FIRMS key the browser cannot see, so they are read only with `fires`: while + * the FIRMS layer is on, which has found the key works. + */ +export async function hazardsNear( + lat, + lon, + radiusKm = 250, + { fires: withFires = false, force = false } = {}, +) { + const here = { lat, lon }; + const [quakeRows, stormSnap, perimeterRows, fireSnap] = await Promise.all([ + quakes(force), + storms(force), + perimeters(force), + withFires ? fires(force) : null, + ]); + const found = []; + const add = (row) => { + row.distanceKm = distanceKm(here, row.at); + row.direction = compassPoint(here, row.at); + found.push(row); + }; + + for (const quake of Array.isArray(quakeRows) ? quakeRows : []) { + const at = { lat: quake.lat, lon: quake.lon }; + if (!(distanceKm(here, at) <= radiusKm)) continue; + add({ + kind: 'quake', + icon: 'earthquake', + title: Number.isFinite(Number.parseFloat(quake.mag)) + ? t('M{mag} earthquake', { mag: Number(quake.mag).toFixed(1) }) + : t('Earthquake'), + detail: quake.place || '', + time: quake.time, + at, + }); + } + for (const storm of stormSnap?.storms || []) { + const at = { + lat: storm.position?.latitude, + lon: storm.position?.longitude, + }; + if (!(distanceKm(here, at) <= radiusKm)) continue; + add({ + kind: 'storm', + icon: 'cyclone', + title: stormTitle(storm), + detail: storm.windKt ? t('{n} kt winds', { n: storm.windKt }) : '', + time: Date.parse(storm.positionAt) || null, + at, + }); + } + for (const fire of Array.isArray(perimeterRows) ? perimeterRows : []) { + const at = perimeterMiddle(fire); + if (!at || !(distanceKm(here, at) <= radiusKm)) continue; + const acres = Number(fire.acres); + add({ + kind: 'wildfire', + icon: 'local_fire_department', + title: fire.name || t('Wildfire'), + detail: [ + Number.isFinite(acres) + ? t('{n} acres', { n: formatNumber(Math.round(acres)) }) + : '', + Number.isFinite(fire.containedPct) + ? t('{n}% contained', { n: fire.containedPct }) + : '', + fire.category === 'RX' ? t('prescribed burn') : '', + ] + .filter(Boolean) + .join(' · '), + time: fire.updatedTime || fire.discoveredTime || null, + at, + }); + } + // Satellite fire hits are many small points: count the close ones. + const hits = (Array.isArray(fireSnap?.fires) ? fireSnap.fires : []) + .map((fire) => ({ + lat: Number(fire.lat ?? fire.latitude), + lon: Number(fire.lon ?? fire.longitude), + })) + .filter((at) => distanceKm(here, at) <= radiusKm); + if (hits.length) { + const nearest = hits.reduce((a, b) => + distanceKm(here, a) <= distanceKm(here, b) ? a : b, + ); + add({ + kind: 'hotspots', + icon: 'local_fire_department', + title: tn( + hits.length, + '{count} satellite fire hit', + '{count} satellite fire hits', + ), + detail: t('last day'), + time: null, + at: nearest, + }); + } + const order = { storm: 0, wildfire: 1, hotspots: 2, quake: 3 }; + return found.sort( + (a, b) => order[a.kind] - order[b.kind] || a.distanceKm - b.distanceKm, + ); +} + +/** Title-case copy for a WMO weather code, and the icon that goes with it. */ +export function weatherLook(code) { + const value = Number(code); + if (!Number.isFinite(value)) + return { label: msg('Conditions unknown'), icon: 'partly_cloudy_day' }; + if (value === 0) return { label: msg('Clear'), icon: 'sunny' }; + if (value <= 2) + return { label: msg('Partly cloudy'), icon: 'partly_cloudy_day' }; + if (value === 3) return { label: msg('Overcast'), icon: 'cloud' }; + if (value === 45 || value === 48) return { label: msg('Fog'), icon: 'foggy' }; + if (value >= 51 && value <= 57) + return { label: msg('Drizzle'), icon: 'rainy' }; + if (value >= 61 && value <= 67) return { label: msg('Rain'), icon: 'rainy' }; + if (value >= 71 && value <= 77) + return { label: msg('Snow'), icon: 'weather_snowy' }; + if (value >= 80 && value <= 82) + return { label: msg('Rain showers'), icon: 'rainy' }; + if (value >= 85 && value <= 86) + return { label: msg('Snow showers'), icon: 'weather_snowy' }; + if (value >= 95) return { label: msg('Thunderstorm'), icon: 'thunderstorm' }; + return { label: msg('Mixed conditions'), icon: 'partly_cloudy_day' }; +} diff --git a/src/ui/stores/entityCard.js b/src/ui/stores/entityCard.js new file mode 100644 index 000000000..fa8a148ec --- /dev/null +++ b/src/ui/stores/entityCard.js @@ -0,0 +1,345 @@ +import { defineStore } from 'pinia'; +import { markRaw, ref, shallowRef } from 'vue'; +import { sourceLabel } from '../layerNames.js'; +import { + alertsNear, + describeEntity, + layerBreakdown, + nearbyByKind, + layerMatches, + searchEntities, + viewSummary, +} from '../../data/entityContext.js'; +import { formatDate, formatNumber, t } from '../../i18n/index.js'; + +const FACT_DATE = Object.freeze({ + day: 'numeric', + month: 'short', + year: 'numeric', + timeZone: 'UTC', +}); + +/** + * Words from entityContext (a fact's, an insight's or a warning's `words`) in + * the active language, or `fallback` (its English as given) when it has none. + * @param {?{text?: string, values?: object, context?: string, fixed?: number, date?: number}} words + * @param {string} [fallback] + * @returns {string} + */ +export function sayWords(words, fallback = '') { + if (!words) return fallback; + if (words.date !== undefined) return formatDate(words.date, FACT_DATE); + const digits = + words.fixed === undefined + ? { maximumFractionDigits: 2 } + : { + minimumFractionDigits: words.fixed, + maximumFractionDigits: words.fixed, + }; + const values = {}; + for (const [name, value] of Object.entries(words.values || {})) + values[name] = + typeof value === 'number' + ? formatNumber(value, digits) + : value && typeof value === 'object' + ? sayWords(value) + : value; + if (words.context) values.context = words.context; + return t(words.text, values); +} + +/** A fact's or insight's value in the active language. */ +export const factValue = (fact) => sayWords(fact?.words, fact?.value ?? ''); + +/** + * A fact's label in the active language. Labels whose plain English means + * something else elsewhere in the catalog take a context here. + */ +export function factLabel(fact) { + if (fact?.label === 'Country') return t('Country', { context: 'place' }); + return t(fact?.label || '', fact?.labelValues); +} + +/** + * A figure split for a tile, so its number can lead: `{number, unit}` in the + * active language. A value that does not start with its number shows whole. + */ +export function factFigure(fact) { + const words = fact?.words; + if (words?.text?.startsWith('{n}') && typeof words.values?.n === 'number') + return { + number: sayWords({ ...words, text: '{n}' }), + unit: sayWords({ ...words, values: { ...words.values, n: '' } }).trim(), + }; + return { number: factValue(fact), unit: '' }; +} + +/** How often an open card re-reads its item, so moving things stay current. */ +const REFRESH_MS = 2000; + +/** + * The thing the Context panel is about: whatever was last clicked on the + * globe, chosen in the omnibar, or picked from the card's nearby list. + * + * The shell connects `{dataManager(), flyTo(card), follow(card), openPanel()}`; + * until then nothing can be selected. + */ +export const useEntityCardStore = defineStore('gev-entity-card', () => { + const shell = shallowRef(null); + /** The card model from `describeEntity`, or null. */ + const card = shallowRef(null); + /** True once a moving item has dropped out of its feed. */ + const lost = ref(false); + /** Bumped on each refresh, so ages shown on the card tick. */ + const tick = ref(0); + /** + * What the camera shows, for the panel to describe when nothing is picked: + * `{center: {lat, lon}, rect: {west, south, east, north}, heightM}`. + */ + const view = shallowRef(null); + let timer = null; + + function connect(next) { + shell.value = next ? markRaw(next) : null; + if (!next) clear(); + } + + const dataManager = () => shell.value?.dataManager?.() || null; + + function read(identity) { + const next = describeEntity(dataManager(), identity); + if (!next) return false; + card.value = markRaw(next); + lost.value = false; + tick.value++; + return true; + } + + /** + * Where a card's data comes from, for its footer: the item's own source, + * else its layer's live feed (the name the layer list shows). + */ + function sourceOf(current) { + if (!current) return ''; + if (current.source) return current.source; + const dm = shell.value?.dataManager?.(); + const layer = dm?.getAll?.().find((row) => row.id === current.layerId); + const stats = layer?.stats || {}; + const raw = + stats.sourceVerbatim === true && stats.source + ? stats.source + : sourceLabel(stats.source || layer?.source); + return raw || ''; + } + const canCockpit = () => Boolean(shell.value?.canCockpit?.(card.value)); + function cockpit() { + if (card.value) shell.value?.cockpit?.(card.value); + } + + function setView(next) { + view.value = next ? markRaw(next) : null; + } + /** Ask a flight's layer for its route, so the card can draw it. */ + function requestRoute(identity) { + if (!identity?.id || !['flights'].includes(identity.layerId)) return; + const layer = shell.value?.dataManager?.()?.layers?.get?.(identity.layerId); + try { + layer?.module?.requestRoute?.(identity.id); + } catch { + // No route then; the card shows without one. + } + } + + /** A layer's items in an area that pass a test (see layerMatches). */ + function matchesIn(layerId, area) { + const dm = shell.value?.dataManager?.(); + if (!dm || !dm.isEnabled?.(layerId)) return null; + return layerMatches(dm, layerId, area); + } + + /** What the loaded layers have in the current view, by layer. */ + function inView(options) { + const dm = shell.value?.dataManager?.(); + if (!dm || !view.value) return []; + return viewSummary(dm, view.value.rect, view.value.center, options); + } + /** Ask GEV about the view, with what is in it. */ + function askAboutView(summary) { + const where = view.value; + if (!where) return; + const counts = summary + .map((group) => `${group.count} ${group.layerName}`) + .join(', '); + shell.value?.askText?.( + `What am I looking at? The view is centred on ${where.center.lat.toFixed(4)}, ${where.center.lon.toFixed(4)} from about ${Math.round(where.heightM)} m up${counts ? `, showing ${counts}` : ''}. What is here and what stands out?`, + ); + } + + /** What is loaded around a ground point, as the card's nearby lists. */ + /** The layers that are on, as the data manager lists them. */ + function liveLayers() { + const dm = shell.value?.dataManager?.(); + try { + return (dm?.getAll?.() || []).filter((row) => row.enabled); + } catch { + return []; + } + } + + /** What a layer's items are made of (see layerBreakdown). */ + function breakdown(layerId, options) { + return layerBreakdown(shell.value?.dataManager?.(), layerId, options); + } + + /** Loaded records near a point that broadcast a warning. */ + function alertsAt(lat, lon, options) { + return alertsNear(shell.value?.dataManager?.(), { lat, lon }, options); + } + + /** + * What the loaded layers have within a radius of a point, grouped the way + * every card lists it: `{flights, vessels, other}` (see nearbyByKind). + */ + function nearbyGroups(lat, lon, options) { + return nearbyByKind(shell.value?.dataManager?.(), { lat, lon }, options); + } + + /** Whether a card's layer is known to the layer manager and switched off. */ + function layerOff(layerId) { + const dm = dataManager(); + const id = layerId; + if (!dm?.isEnabled || !dm.layers?.has?.(id)) return false; + return dm.isEnabled(id) === false; + } + + function refresh() { + const current = card.value; + if (!current) return; + // A card does not outlive its layer: turning the layer off (or clearing + // all layers) closes it and lets go of the camera. + if (layerOff(current.layerId)) return clear(); + // A closed panel shows nothing, so it reads nothing until it opens. + if (shell.value?.isOpen && !shell.value.isOpen()) return; + const next = describeEntity(dataManager(), current.identity); + // Keep showing the last reading when the item drops out of its feed. + if (!next || next.key !== current.key || next.basis !== 'record') { + lost.value = current.basis === 'record'; + tick.value++; + return; + } + card.value = markRaw(next); + lost.value = false; + tick.value++; + } + + /** + * Show an item on the card. + * @param {object} identity `{layerId, id, label, lat, lon, record?}` + * @param {object} [options] + * @param {boolean} [options.fly] Also fly the camera to it. + * @returns {boolean} Whether a card could be made. + */ + /** Things that move are followed as soon as they are picked. */ + const AUTO_FOLLOW = new Set(['flights', 'military', 'satellites']); + /** + * The key of the item the camera follows, if any. The shell sets it from + * the camera's own follow, so it is never claimed before the camera does. + */ + const following = ref(null); + /** The item a follow was last asked for, so it is asked once per item. */ + let asked = null; + + /** + * @param {object} identity + * @param {{fly?: boolean, follow?: boolean}} [options] `follow: false` + * keeps the camera where it is even for an aircraft. + */ + function select(identity, { fly = false, follow: autoFollow = true } = {}) { + if (!read(identity)) return false; + clearInterval(timer); + timer = setInterval(refresh, REFRESH_MS); + shell.value?.openPanel?.(); + const current = card.value; + const followNow = + autoFollow && + AUTO_FOLLOW.has(current?.layerId) && + shell.value?.canFollow?.(current); + if (followNow) { + // Tracking can announce the craft again; following what is already + // followed would loop, so it only starts once per item. + if (following.value !== current.key && asked !== current.key) { + asked = current.key; + shell.value?.follow?.(current); + } + } else { + asked = null; + if (fly) shell.value?.flyTo?.(current); + } + requestRoute(current?.identity); + return true; + } + + function clear() { + if (following.value) shell.value?.letGo?.(card.value); + following.value = null; + asked = null; + clearInterval(timer); + timer = null; + card.value = null; + lost.value = false; + } + + const flyTo = () => card.value && shell.value?.flyTo?.(card.value); + const follow = () => { + if (!card.value) return; + asked = card.value.key; + shell.value?.follow?.(card.value); + }; + const isFollowing = () => + Boolean(card.value && following.value === card.value.key); + const ask = () => card.value && shell.value?.ask?.(card.value); + /** The regional brief (weather, local news) for a spot, from the shell. */ + const readBrief = (lat, lon) => + shell.value?.regionalBrief + ? shell.value.regionalBrief(lat, lon) + : Promise.resolve(null); + const canFollow = () => Boolean(shell.value?.canFollow?.(card.value)); + /** Loaded items whose name or id matches typed text, for the omnibar. */ + const search = (query, options) => + shell.value + ? searchEntities(dataManager(), query, { + near: shell.value.here?.() || null, + ...options, + }) + : []; + + return { + card, + lost, + tick, + connect, + select, + clear, + refresh, + flyTo, + follow, + ask, + readBrief, + canFollow, + isFollowing, + following, + search, + nearbyGroups, + alertsAt, + liveLayers, + breakdown, + view, + setView, + matchesIn, + sourceOf, + canCockpit, + cockpit, + inView, + askAboutView, + }; +}); diff --git a/src/ui/stores/omnibar.js b/src/ui/stores/omnibar.js new file mode 100644 index 000000000..68c2e4e25 --- /dev/null +++ b/src/ui/stores/omnibar.js @@ -0,0 +1,33 @@ +import { defineStore } from 'pinia'; +import { markRaw, shallowRef } from 'vue'; + +/** + * The top-bar omnibar's link to the shell. The shell connects the actions + * the omnibar offers: `layers()` lists the data layers as `{id, name, + * enabled}`, and `setLayer(id, enabled)` turns one on or off as a user click + * would. Place search runs through the location controls and Ask GEV through + * the voice controls, so neither is repeated here. + */ +export const useOmnibarStore = defineStore('gev-omnibar', () => { + /** `{layers(), setLayer(id, enabled)}`, or null while disconnected. */ + const controls = shallowRef(null); + + /** @param {?object} next The shell's omnibar actions, or null. */ + function connect(next) { + controls.value = next && markRaw(next); + } + + /** + * The voice action runner, `(name, args) → Promise`: the same + * actions voice and chat call, run directly without a model. Null while no + * voice runtime is up. + */ + const runner = shallowRef(null); + + /** @param {?Function} next The runner, or null to disconnect. */ + function connectRunner(next) { + runner.value = next ? markRaw(next) : null; + } + + return { controls, connect, runner, connectRunner }; +}); diff --git a/src/ui/styles/context-dock.css b/src/ui/styles/context-dock.css new file mode 100644 index 000000000..e02ecd486 --- /dev/null +++ b/src/ui/styles/context-dock.css @@ -0,0 +1,243 @@ +/* ── Context expanded ─────────────────────────────────────────────────── + Expanded, Context becomes a full-height column over the right edge of the + screen. The globe and HUD stay where they are, under it. */ +:root { + --context-dock-width: clamp(360px, 30vw, 460px); +} + +/* The column: edge to edge, top to bottom, no rail beside it. */ +body.context-docked #right-context-rail { + z-index: 170; + top: 0 !important; + right: 0 !important; + bottom: 0 !important; + width: var(--context-dock-width) !important; + max-height: none !important; + height: 100vh !important; +} + +/* The map credits stay readable beside the column: their row ends short of + it. creditAttribution.test.mjs pins this. */ +body.context-docked:not(.ui-clean-view):not(.recording-mode) #cesium-credits, +body.context-docked:not(.ui-clean-view):not(.recording-mode) #gev-credits, +body.context-docked:not(.ui-clean-view):not(.recording-mode):has( + #intel-hud[data-variant='minimal'].active + ) + #cesium-credits, +body.context-docked:not(.ui-clean-view):not(.recording-mode):has( + #intel-hud[data-variant='minimal'].active + ) + #gev-credits { + max-width: calc(100vw - 3rem - var(--context-dock-width)); +} + +body.context-docked #right-context-rail > .gev-panel-rail { + display: none; +} + +body.context-docked + #right-context-rail + > :not(#global-context-panel):not(.gev-panel-rail) { + display: none !important; +} + +body.context-docked #right-context-rail > #global-context-panel { + flex: 1 1 auto !important; + width: 100% !important; + height: 100% !important; + max-height: none !important; +} + +body.context-docked #global-context-panel .global-context-panel-inner { + height: 100%; + padding: 22px 24px 16px; + background: rgba(10, 11, 16, 0.94); + border: 0; + border-left: 1px solid rgba(255, 255, 255, 0.08); + border-radius: 0; + box-shadow: -18px 0 40px rgba(0, 0, 0, 0.35); +} + +body.context-docked #global-context-panel .panel-glow { + display: none; +} + +/* The expand button sits beside the collapse button in the header. */ +.context-dock-btn { + display: grid; + flex: none; + place-items: center; + width: 28px; + height: 28px; + margin-inline-end: 6px; + padding: 0; + color: var(--text-secondary); + background: transparent; + border: 1px solid var(--glass-border); + border-radius: var(--btn-radius); + cursor: pointer; +} + +.context-dock-btn .material-symbols-outlined { + font-size: 16px; +} + +.context-dock-btn:hover, +.context-dock-btn:focus-visible, +.context-dock-btn[aria-pressed='true'] { + color: var(--accent); + border-color: var(--accent-dim); + background: var(--accent-dim); +} + +/* Phones keep their sheets; the dock is a desktop layout. */ +body.mobile-shell .context-dock-btn { + display: none; +} + +/* Context's own search field, under the header: narrows what the panel shows. + Sized and framed like the tab bar beneath it. */ +.context-search { + position: sticky; + top: 0; + z-index: 2; + display: flex; + flex: none; + box-sizing: border-box; + align-items: center; + gap: 8px; + min-height: 34px; + margin: 0 0 0.5rem; + padding: 0 6px 0 10px; + color: rgba(199, 214, 222, 0.65); + background: rgba(16, 22, 28, 0.94); + border: 1px solid rgba(54, 220, 255, 0.35); + border-radius: 10px; + backdrop-filter: blur(8px); +} + +.context-search:focus-within { + color: #7af0ff; + border-color: rgba(54, 220, 255, 0.7); + box-shadow: 0 0 0 3px rgba(54, 220, 255, 0.1); +} + +.context-search .material-symbols-outlined { + font-size: 17px; +} + +.context-search__input::placeholder { + color: rgba(199, 214, 222, 0.45); +} + +.context-search__input { + flex: 1; + min-width: 0; + height: 100%; + padding: 0; + color: var(--text-primary, #e8eaed); + font: inherit; + font-size: 0.74rem; + line-height: 32px; + background: transparent; + border: 0; + outline: 0; +} + +.context-search__input::-webkit-search-cancel-button { + display: none; +} + +.context-search__clear { + display: grid; + flex: none; + place-items: center; + width: 24px; + height: 24px; + padding: 0; + color: rgba(199, 214, 222, 0.65); + background: transparent; + border: 0; + border-radius: 50%; + cursor: pointer; +} + +.context-search__clear:hover, +.context-search__clear:focus-visible { + color: var(--accent); +} + +.entity-card__no-match { + margin: 0 0 0.7rem; + color: rgba(199, 214, 222, 0.6); + font-size: 0.66rem; +} + +.context-search__input:focus, +.context-search__input:focus-visible { + outline: 0; + box-shadow: none; +} + +/* While a search is typed, what cannot match steps aside so the matches lead: + the weather, the view's own figures, the route and altitude graph, and the + layer switches. The radius stays: it sets how far the search looks. */ +.context-searching + :is( + .spot-conditions__weather, + .spot-conditions__loading, + .spot-conditions__source, + .view-context__facts, + .view-context__live, + .view-context__total, + .view-context__actions, + .view-context__towns:has(.view-context__chip--layer), + .altitude-graph, + .entity-card__route, + .entity-card__route-stats, + .entity-card__route-places, + .entity-card__route-note, + .entity-card__links + ) { + display: none; +} + +/* With the minimal HUD the credits sit at the bottom right, where the + column is: they move out to its left. */ +body.context-docked:not(.ui-clean-view):not(.recording-mode):has( + #intel-hud[data-variant='minimal'].active + ) + :is(#cesium-credits, #gev-credits) { + right: calc(36px + var(--context-dock-width)); +} + +/* Right to left, the rail sits on the left edge (rtl.css), and so does the + expanded column; the credits start past it. */ +html[dir='rtl'] + body.context-docked:not(.ui-clean-view):not(.recording-mode) + :is(#cesium-credits, #gev-credits) { + left: calc(36px + var(--context-dock-width)); +} + +html[dir='rtl'] + body.context-docked:not(.ui-clean-view):not(.recording-mode):has( + #intel-hud[data-variant='minimal'].active + ) + :is(#cesium-credits, #gev-credits) { + right: 36px; + left: auto; +} + +html[dir='rtl'] body.context-docked #right-context-rail { + right: auto !important; + left: 0 !important; +} + +html[dir='rtl'] + body.context-docked + #global-context-panel + .global-context-panel-inner { + border-left: 0; + border-right: 1px solid rgba(255, 255, 255, 0.08); + box-shadow: 18px 0 40px rgba(0, 0, 0, 0.35); +} diff --git a/src/ui/styles/context-tabs.css b/src/ui/styles/context-tabs.css new file mode 100644 index 000000000..1dd7c23e4 --- /dev/null +++ b/src/ui/styles/context-tabs.css @@ -0,0 +1,125 @@ +/* ── Context layer tabs ───────────────────────────────────────────────── + Settings for the layers that are on, as tabs beside the card. */ +.context-tabs { + display: flex; + flex: none; + min-height: 34px; + box-sizing: border-box; + gap: 4px; + margin: 0 0 0.7rem; + padding: 3px; + overflow-x: auto; + background: rgba(255, 255, 255, 0.03); + border: 1px solid rgba(255, 255, 255, 0.07); + border-radius: 10px; + scrollbar-width: none; +} + +.context-tabs::-webkit-scrollbar { + display: none; +} + +.context-tabs__tab { + display: inline-flex; + flex: none; + min-height: 26px; + align-items: center; + gap: 0.3rem; + max-width: 9.5rem; + padding: 0.3rem 0.55rem; + color: rgba(199, 214, 222, 0.65); + font-family: var(--font-mono); + font-size: 0.56rem; + letter-spacing: 0.08rem; + text-transform: uppercase; + background: none; + border: 1px solid transparent; + border-radius: 7px; + cursor: pointer; +} + +.context-tabs__tab .material-symbols-outlined { + font-size: 14px; +} + +.context-tabs__label { + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} + +.context-tabs__tab:hover { + color: #fff; + background: rgba(255, 255, 255, 0.05); +} + +.context-tabs__tab.active { + color: #7af0ff; + background: rgba(54, 220, 255, 0.12); + border-color: rgba(54, 220, 255, 0.35); +} + +.context-tab-pane[hidden] { + display: none !important; +} + +/* Controls moved in from Visual show their rows openly here. */ +.context-tab-pane .pp-toggle-group { + margin: 0; +} + +/* Two even tabs: Inspector and Properties. */ +.context-tabs__tab { + flex: 1 1 0; + justify-content: center; + max-width: none; +} + +.context-props[hidden] { + display: none !important; +} + +.context-props__section + .context-props__section { + margin-top: 0.9rem; +} + +.context-props__heading { + display: flex; + align-items: center; + gap: 0.4rem; + margin: 0 0 0.45rem; + color: rgba(199, 214, 222, 0.55); + font-family: var(--font-mono); + font-size: 0.56rem; + font-weight: 500; + letter-spacing: 0.14rem; + text-transform: uppercase; +} + +.context-props__heading .material-symbols-outlined { + font-size: 14px; +} + +.context-props__layers { + display: flex; + flex-wrap: wrap; + gap: 0.25rem 0.75rem; + margin: -0.15rem 0 0.5rem; + padding: 0; + list-style: none; +} + +.context-props__layers li { + display: inline-flex; + align-items: center; + gap: 0.35rem; + color: rgba(214, 228, 236, 0.8); + font-size: 0.66rem; +} + +.context-props__layers i { + width: 7px; + height: 7px; + border-radius: 50%; + box-shadow: 0 0 6px currentColor; +} diff --git a/src/ui/styles/entity-card.css b/src/ui/styles/entity-card.css new file mode 100644 index 000000000..2f8f09840 --- /dev/null +++ b/src/ui/styles/entity-card.css @@ -0,0 +1,1770 @@ +/* ── Context panel: the card for one thing on the map ────────────────── + Sits at the top of the Context panel, above the mode switch. Glass like + the omnibar sheet; the title in the mono face the HUD uses. */ +.entity-card { + margin: 0 0 0.75rem; + padding: 0.7rem 0.75rem 0.6rem; + color: rgba(225, 236, 242, 0.92); + background: rgba(40, 44, 52, 0.55); + border: 1px solid rgba(255, 255, 255, 0.09); + border-radius: 10px; +} + +.entity-card__head { + display: flex; + align-items: center; + gap: 0.5rem; +} + +.entity-card__icon { + display: grid; + flex: none; + place-items: center; + width: 1.9rem; + height: 1.9rem; + color: #36dcff; + font-size: 1.1rem; + background: rgba(29, 69, 81, 0.35); + border: 1px solid rgba(48, 194, 224, 0.35); + border-radius: 7px; +} + +.entity-card__kind { + display: flex; + flex: 1; + flex-direction: column; + min-width: 0; + font-size: 0.62rem; + letter-spacing: 0.06rem; + text-transform: uppercase; +} + +.entity-card__kind > span:first-child { + color: rgba(225, 236, 242, 0.85); +} + +.entity-card__layer { + overflow: hidden; + color: rgba(199, 214, 222, 0.5); + text-overflow: ellipsis; + white-space: nowrap; +} + +.entity-card__status { + flex: none; + padding: 0.12rem 0.45rem; + font-size: 0.58rem; + white-space: nowrap; + border: 1px solid currentColor; + border-radius: 999px; +} + +.entity-card__status--live { + color: #5ee6a0; +} + +.entity-card__status--live::before { + display: inline-block; + width: 5px; + height: 5px; + margin-right: 0.3rem; + vertical-align: middle; + background: currentColor; + border-radius: 50%; + content: ''; + animation: entity-card-pulse 1.6s ease-in-out infinite; +} + +.entity-card__status--aged { + color: rgba(199, 214, 222, 0.6); +} + +.entity-card__status--lost { + color: #ff9f43; +} + +.entity-card__close { + display: grid; + flex: none; + place-items: center; + width: 1.5rem; + height: 1.5rem; + padding: 0; + color: rgba(199, 214, 222, 0.6); + background: none; + border: 0; + border-radius: 6px; + cursor: pointer; +} + +.entity-card__close:hover, +.entity-card__close:focus-visible { + color: #fff; + background: rgba(255, 255, 255, 0.08); +} + +.entity-card__close .material-symbols-outlined { + font-size: 1rem; +} + +.entity-card__title { + margin: 0.55rem 0 0.1rem; + overflow-wrap: anywhere; + font-family: var(--font-mono); + font-size: 1rem; + font-weight: 600; + letter-spacing: 0.02rem; +} + +.entity-card__where { + margin: 0 0 0.5rem; + color: rgba(199, 214, 222, 0.5); + font-family: var(--font-mono); + font-size: 0.62rem; + white-space: pre; +} + +.entity-card__facts { + display: grid; + grid-template-columns: 1fr 1fr; + gap: 0.4rem 0.75rem; + margin: 0 0 0.55rem; +} + +.entity-card__fact { + min-width: 0; +} + +.entity-card__fact dt { + color: rgba(199, 214, 222, 0.5); + font-size: 0.56rem; + letter-spacing: 0.05rem; + text-transform: uppercase; +} + +.entity-card__fact dd { + margin: 0.1rem 0 0; + overflow: hidden; + font-family: var(--font-mono); + font-size: 0.72rem; + text-overflow: ellipsis; + white-space: nowrap; +} + +.entity-card__empty { + margin: 0 0 0.55rem; + color: rgba(199, 214, 222, 0.55); + font-size: 0.68rem; +} + +.entity-card__links { + display: flex; + flex-wrap: wrap; + gap: 0.35rem; + margin: 0 0 0.55rem; +} + +.entity-card__links a { + padding: 0.15rem 0.5rem; + color: #36dcff; + font-size: 0.64rem; + text-decoration: none; + border: 1px solid rgba(48, 194, 224, 0.35); + border-radius: 999px; +} + +.entity-card__links a:hover, +.entity-card__links a:focus-visible { + background: rgba(48, 194, 224, 0.12); +} + +.entity-card__actions { + display: flex; + gap: 0.35rem; + padding-top: 0.5rem; + border-top: 1px solid rgba(255, 255, 255, 0.07); +} + +.entity-card__action { + display: inline-flex; + flex: 1; + align-items: center; + justify-content: center; + gap: 0.3rem; + height: 1.9rem; + padding: 0 0.4rem; + color: rgba(225, 236, 242, 0.88); + font-size: 0.66rem; + background: rgba(255, 255, 255, 0.04); + border: 1px solid rgba(255, 255, 255, 0.1); + border-radius: 7px; + cursor: pointer; + transition: + background 140ms ease, + border-color 140ms ease; +} + +.entity-card__action .material-symbols-outlined { + font-size: 0.95rem; +} + +.entity-card__action:hover, +.entity-card__action:focus-visible { + background: rgba(48, 194, 224, 0.12); + border-color: rgba(48, 194, 224, 0.45); +} + +.entity-card__action--ask { + color: #ffb877; +} + +.entity-card__action--ask:hover, +.entity-card__action--ask:focus-visible { + background: rgba(255, 159, 67, 0.12); + border-color: rgba(255, 159, 67, 0.5); +} + +.entity-card__nearby { + margin-top: 0.65rem; +} + +.entity-card__nearby h4 { + margin: 0 0 0.25rem; + color: rgba(199, 214, 222, 0.5); + font-size: 0.56rem; + font-weight: 500; + letter-spacing: 0.06rem; + text-transform: uppercase; +} + +.entity-card__nearby ul { + margin: 0; + padding: 0; + list-style: none; +} + +.entity-card__nearby button { + display: flex; + align-items: center; + gap: 0.5rem; + width: 100%; + padding: 0.3rem 0.35rem; + color: rgba(225, 236, 242, 0.85); + font-size: 0.68rem; + text-align: left; + background: none; + border: 0; + border-radius: 6px; + cursor: pointer; +} + +.entity-card__nearby button:hover, +.entity-card__nearby button:focus-visible { + background: rgba(255, 255, 255, 0.06); +} + +.entity-card__nearby .material-symbols-outlined { + color: rgba(199, 214, 222, 0.6); + font-size: 0.95rem; +} + +.entity-card__row-title { + display: flex; + flex: 1; + flex-direction: column; + min-width: 0; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} + +.entity-card__row-title small { + color: rgba(199, 214, 222, 0.45); + font-size: 0.56rem; +} + +.entity-card__row-meta { + flex: none; + color: rgba(199, 214, 222, 0.55); + font-family: var(--font-mono); + font-size: 0.6rem; +} + +.entity-card-enter-active, +.entity-card-leave-active { + transition: + opacity 200ms ease, + transform 220ms cubic-bezier(0.22, 1, 0.36, 1); +} + +.entity-card-enter-from, +.entity-card-leave-to { + opacity: 0; + transform: translateY(-6px); +} + +@keyframes entity-card-pulse { + 50% { + opacity: 0.35; + } +} + +@media (prefers-reduced-motion: reduce) { + .entity-card-enter-active, + .entity-card-leave-active { + transition: opacity 120ms ease; + } + + .entity-card-enter-from, + .entity-card-leave-to { + transform: none; + } + + .entity-card__status--live::before { + animation: none; + } +} + +/* The Properties tab shows only the layers' settings. The idle hint gives + way to the view summary, and Contacts' Cockpit entry to the card's own + while the card offers one. */ +#global-context-panel[data-context-tab='props'] + :is(.global-context-modes, .context-mode-view, #radio-panel), +#global-context-panel #context-mode-standby, +#global-context-panel:has([data-entity-cockpit-entry]) #cockpit-entry { + display: none !important; +} + +#global-context-panel .global-context-actions:has(#tr3b-toggle:not([hidden])) { + grid-template-columns: minmax(0, 1fr) auto; +} + +/* ── In view: what the panel shows while nothing is picked ───────────── */ +.view-context { + margin: 0 0 0.75rem; + padding: 0.7rem 0.75rem 0.6rem; + color: rgba(225, 236, 242, 0.92); + background: rgba(40, 44, 52, 0.55); + border: 1px solid rgba(255, 255, 255, 0.09); + border-radius: 10px; +} + +.view-context__head { + display: flex; + align-items: center; + gap: 0.5rem; +} + +.view-context__icon { + display: grid; + flex: none; + place-items: center; + width: 1.9rem; + height: 1.9rem; + color: #36dcff; + font-size: 1.1rem; + background: rgba(29, 69, 81, 0.35); + border: 1px solid rgba(48, 194, 224, 0.35); + border-radius: 7px; +} + +.view-context__kind { + display: flex; + flex-direction: column; + font-size: 0.62rem; + letter-spacing: 0.06rem; + text-transform: uppercase; +} + +.view-context__sub { + color: rgba(199, 214, 222, 0.5); +} + +.view-context__title { + margin: 0.55rem 0 0.1rem; + overflow-wrap: anywhere; + font-family: var(--font-mono); + font-size: 1rem; + font-weight: 600; +} + +.view-context__where { + margin: 0 0 0.55rem; + color: rgba(199, 214, 222, 0.5); + font-family: var(--font-mono); + font-size: 0.62rem; + white-space: pre; +} + +.view-context__total, +.view-context__empty { + margin: 0 0 0.4rem; + color: rgba(199, 214, 222, 0.7); + font-size: 0.68rem; + line-height: 1.45; +} + +.view-context__group + .view-context__group { + margin-top: 0.45rem; +} + +.view-context__group h4 { + display: flex; + align-items: center; + gap: 0.4rem; + margin: 0 0 0.15rem; + color: rgba(199, 214, 222, 0.6); + font-size: 0.58rem; + font-weight: 500; + letter-spacing: 0.06rem; + text-transform: uppercase; +} + +.view-context__group h4 .material-symbols-outlined { + font-size: 0.95rem; +} + +.view-context__count { + margin-inline-start: auto; + color: #36dcff; + font-family: var(--font-mono); +} + +.view-context__group ul { + margin: 0; + padding: 0; + list-style: none; +} + +.view-context__group button { + display: flex; + align-items: center; + gap: 0.5rem; + width: 100%; + padding: 0.28rem 0.35rem 0.28rem 1.75rem; + color: rgba(225, 236, 242, 0.85); + font-size: 0.68rem; + text-align: left; + background: none; + border: 0; + border-radius: 6px; + cursor: pointer; +} + +.view-context__group button:hover, +.view-context__group button:focus-visible { + background: rgba(255, 255, 255, 0.06); +} + +.view-context__row-title { + flex: 1; + min-width: 0; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} + +/* A moving item's state on its row: green moving, amber stopped, grey + while its feed has nothing new. */ +.view-context__row-motion { + flex: none; + margin-right: 6px; + color: rgba(199, 214, 222, 0.5); + font-size: 14px; +} + +.view-context__row-motion[data-motion='moving'] { + color: #5dff9f; +} + +.view-context__row-motion[data-motion='stopped'] { + color: #ffb86b; +} + +.view-context__row-meta { + flex: none; + color: rgba(199, 214, 222, 0.55); + font-family: var(--font-mono); + font-size: 0.6rem; +} + +.view-context__actions { + display: flex; + margin-top: 0.6rem; + padding-top: 0.5rem; + border-top: 1px solid rgba(255, 255, 255, 0.07); +} + +.context-empty { + display: grid; + justify-items: start; + gap: 6px; + padding: 14px 4px 6px; + color: var(--text-secondary); + font: 12px/1.45 var(--font-sans); +} + +.context-empty .material-symbols-outlined { + color: var(--accent); + font-size: 22px; +} + +.context-empty strong { + color: var(--text-primary); + font: 600 11px/1.2 var(--font-mono); + letter-spacing: 0.14em; + text-transform: uppercase; +} + +/* A warning leads the card, above the name: an emergency, a tsunami flag. */ +.entity-card__warning { + display: flex; + align-items: flex-start; + gap: 0.4rem; + margin: 0.55rem 0 0; + padding: 0.4rem 0.55rem; + color: #ffd6d0; + font-size: 0.68rem; + font-weight: 600; + line-height: 1.35; + background: rgba(255, 75, 62, 0.16); + border: 1px solid rgba(255, 75, 62, 0.55); + border-radius: 7px; +} + +.entity-card__warning .material-symbols-outlined { + flex: none; + color: #ff6b5e; + font-size: 1rem; +} + +/* Where the card's data comes from, and how fresh it is. */ +.entity-card__source { + margin: 0.6rem 0 0; + padding-top: 0.45rem; + color: rgba(199, 214, 222, 0.5); + font-size: 0.6rem; + border-top: 1px solid rgba(255, 255, 255, 0.07); +} + +.entity-card__source span { + letter-spacing: 0.06rem; + text-transform: uppercase; +} + +/* Open, Context fills the right column top to bottom, its card scrolling + inside rather than the panel growing and shrinking with each selection. */ +#right-context-rail > #global-context-panel:not(.collapsed), +#right-context-rail.layout-focus > #global-context-panel:not(.collapsed) { + flex: 0 0 var(--right-stack-max-height, auto); + height: var(--right-stack-max-height, auto); + max-height: var(--right-stack-max-height, 100%); +} + +#right-context-rail + > #global-context-panel:not(.collapsed) + .global-context-panel-inner { + height: 100%; +} + +/* The icon font's own rules (display: block, 24px) beat the badge's; keep + the glyph centred in its square at the badge's size. */ +.entity-card__head .entity-card__icon.material-symbols-outlined, +.view-context__head .view-context__icon.material-symbols-outlined { + display: grid; + place-items: center; + box-sizing: border-box; + width: 1.9rem; + height: 1.9rem; + font-size: 1.1rem; + line-height: 1; + overflow: hidden; +} + +/* The aircraft's model, turning at the top of its card on a soft spotlight. */ + +/* Origin to destination, as one line with the craft on it. */ +.entity-card__route { + display: flex; + align-items: center; + gap: 0.5rem; + margin: 0.15rem 0 0.55rem; + font-family: var(--font-mono); + font-size: 0.85rem; +} + +.entity-card__route-line { + position: relative; + display: grid; + flex: 1; + place-items: center; + height: 1rem; + background: linear-gradient( + 90deg, + rgba(199, 214, 222, 0.35) 50%, + transparent 0 + ) + center / 7px 1px repeat-x; +} + +.entity-card__route-line .material-symbols-outlined { + padding: 0 0.25rem; + color: #36dcff; + font-size: 0.95rem; + background: rgba(40, 44, 52, 1); + transform: rotate(90deg); +} + +/* Headline figures: big numbers, small labels. */ +.entity-card__tiles { + display: grid; + grid-template-columns: repeat(3, minmax(0, 1fr)); + gap: 0.35rem; + margin: 0.2rem 0 0.55rem; +} + +.entity-card__tile { + display: grid; + gap: 0.2rem; + padding: 0.45rem 0.4rem; + background: rgba(255, 255, 255, 0.04); + border: 1px solid rgba(255, 255, 255, 0.07); + border-radius: 8px; +} + +.entity-card__tile span { + color: rgba(199, 214, 222, 0.5); + font-size: 0.54rem; + letter-spacing: 0.06rem; + text-transform: uppercase; +} + +.entity-card__tile strong { + overflow: hidden; + color: rgba(236, 244, 248, 0.95); + font-family: var(--font-mono); + font-size: 0.76rem; + font-weight: 600; + letter-spacing: -0.02em; + text-overflow: ellipsis; + white-space: nowrap; +} + +/* The callout on the turning model, in the frame's top-left corner. The + leader sits under the text: a dot near the craft lights first, the line + draws from it up to the corner, then the label and value fade in. */ + +/* The parts legend and the scan caption, bottom right of the model. */ + +/* ── Card, second pass ────────────────────────────────────────────────── + One surface: inside Context the card is the panel's content, not a box in + a box. Identity leads (kind, name, who and what), then status and place, + the model, headline figures, details, actions, what is near, the source. */ +#global-context-panel .entity-card, +#global-context-panel .view-context { + margin: 0; + padding: 0.15rem 0 0.4rem; + background: none; + border: 0; + border-radius: 0; +} + +.entity-card__head { + align-items: flex-start; + gap: 0.6rem; +} + +.entity-card__name { + display: grid; + flex: 1; + gap: 0.12rem; + min-width: 0; +} + +#entity-card .entity-card__kind { + display: block; + color: rgba(199, 214, 222, 0.5); + font-size: 0.56rem; + letter-spacing: 0.08rem; + text-transform: uppercase; +} + +#entity-card .entity-card__title { + margin: 0; + font-size: 1.15rem; + line-height: 1.1; + letter-spacing: 0.03rem; +} + +.entity-card__subtitle { + overflow: hidden; + color: rgba(225, 236, 242, 0.72); + font-size: 0.7rem; + text-overflow: ellipsis; + white-space: nowrap; +} + +.entity-card__meta { + display: flex; + flex-wrap: wrap; + align-items: center; + gap: 0.35rem 0.6rem; + margin: 0.55rem 0 0.15rem; +} + +#entity-card .entity-card__where { + margin: 0; + font-size: 0.6rem; +} + +/* The model sits edge to edge under the name, framed by hairlines. */ + +/* Tiles: the number leads, its unit sits small beside it. */ +#entity-card .entity-card__tile strong { + display: flex; + align-items: baseline; + gap: 0.2rem; + font-size: 0.95rem; + letter-spacing: -0.01em; +} + +#entity-card .entity-card__tile small { + color: rgba(199, 214, 222, 0.6); + font-size: 0.6rem; + font-weight: 500; +} + +/* Sections get a quiet heading with a hairline under it. */ +.entity-card__section { + margin-top: 0.75rem; +} + +.entity-card__section > h4, +#entity-card .entity-card__nearby h4 { + display: flex; + align-items: center; + gap: 0.4rem; + margin: 0 0 0.35rem; + padding-bottom: 0.3rem; + color: rgba(199, 214, 222, 0.55); + font-size: 0.56rem; + font-weight: 500; + letter-spacing: 0.08rem; + text-transform: uppercase; + border-bottom: 1px solid rgba(255, 255, 255, 0.06); +} + +.entity-card__section > h4 span { + padding: 0 0.3rem; + color: rgba(54, 220, 255, 0.85); + font-family: var(--font-mono); + background: rgba(54, 220, 255, 0.1); + border-radius: 999px; +} + +/* Actions: the three moves in a row, then asking GEV across the width. */ +#entity-card .entity-card__actions { + display: grid; + gap: 0.35rem; + margin-top: 0.8rem; + padding-top: 0; + border-top: 0; +} + +.entity-card__action-row { + display: flex; + gap: 0.35rem; +} + +#entity-card .entity-card__action--ask { + width: 100%; + height: 2.1rem; + color: #ffb86b; + background: rgba(255, 159, 67, 0.08); + border-color: rgba(255, 159, 67, 0.35); +} + +#entity-card .entity-card__action--ask:hover, +#entity-card .entity-card__action--ask:focus-visible { + background: rgba(255, 159, 67, 0.16); + border-color: rgba(255, 159, 67, 0.6); +} + +/* ── Callout states ────────────────────────────────────────────────────── + Enter 0-2.3 s (dot, leader, text), hold to 5.2 s (dot breathes, timer + fills), exit over 1 s (text, then leader back into the dot, then dot). */ + +/* Exit: text first, then the leader retracts toward the dot, then the dot. */ + +/* The route on its small globe, and the Route / Model switch above it. */ + +/* In view, richer: region, the view's figures as tiles, places in view and + layer switches as chips. */ +.view-context__region { + margin: 0 0 0.15rem; + color: rgba(225, 236, 242, 0.7); + font-size: 0.7rem; +} + +.view-context__facts { + display: grid; + grid-template-columns: repeat(2, minmax(0, 1fr)); + gap: 0.35rem; + margin: 0.4rem 0 0.7rem; +} + +.view-context__fact { + display: grid; + gap: 0.18rem; + padding: 0.45rem 0.5rem; + background: rgba(255, 255, 255, 0.04); + border: 1px solid rgba(255, 255, 255, 0.07); + border-radius: 8px; +} + +.view-context__fact span { + color: rgba(199, 214, 222, 0.5); + font-size: 0.54rem; + letter-spacing: 0.06rem; + text-transform: uppercase; +} + +.view-context__fact strong { + overflow: hidden; + color: rgba(236, 244, 248, 0.95); + font-family: var(--font-mono); + font-size: 0.78rem; + font-weight: 600; + text-overflow: ellipsis; + white-space: nowrap; +} + +.view-context__towns { + margin: 0.2rem 0 0.7rem; +} + +.view-context__towns h4 { + margin: 0 0 0.35rem; + padding-bottom: 0.3rem; + color: rgba(199, 214, 222, 0.55); + font-size: 0.56rem; + font-weight: 500; + letter-spacing: 0.08rem; + text-transform: uppercase; + border-bottom: 1px solid rgba(255, 255, 255, 0.06); +} + +.view-context__chips { + display: flex; + flex-wrap: wrap; + gap: 0.3rem; +} + +.view-context__chips button { + display: inline-flex; + align-items: center; + gap: 0.2rem; + padding: 0.28rem 0.6rem; + color: rgba(225, 236, 242, 0.85); + font-size: 0.66rem; + background: rgba(255, 255, 255, 0.05); + border: 1px solid rgba(255, 255, 255, 0.09); + border-radius: 999px; + cursor: pointer; +} + +.view-context__chips button:hover, +.view-context__chips button:focus-visible { + color: #fff; + background: rgba(54, 220, 255, 0.12); + border-color: rgba(54, 220, 255, 0.4); +} + +.view-context__chips .material-symbols-outlined { + font-size: 0.85rem; +} + +/* A scheduled route that does not fit the plane's position: amber, dashed, + with a note, so it cannot pass for the flight's actual route. */ +.entity-card__route--unverified strong { + color: #ffb86b; +} + +.entity-card__route--unverified .entity-card__route-line { + background-image: linear-gradient( + 90deg, + rgba(255, 184, 107, 0.55) 50%, + transparent 0 + ); +} + +.entity-card__route--unverified + .entity-card__route-line + .material-symbols-outlined { + color: #ffb86b; +} + +.entity-card__route-note { + display: flex; + align-items: center; + gap: 0.3rem; + margin: -0.3rem 0 0.55rem; + color: rgba(255, 184, 107, 0.85); + font-size: 0.6rem; +} + +.entity-card__route-note .material-symbols-outlined { + font-size: 0.85rem; +} + +/* Route progress: the line filled from the origin up to the plane, which + sits at its share of the way, and dashed beyond it to the destination. */ +.entity-card__route--progress .entity-card__route-line { + display: block; + background: + linear-gradient(90deg, #36dcff, #36dcff) left center / + var(--route-share, 0%) 2px no-repeat, + linear-gradient(90deg, rgba(199, 214, 222, 0.35) 50%, transparent 0) + center / 7px 1px repeat-x; + transition: background-size 600ms ease; +} + +.entity-card__route--progress + .entity-card__route-line + .material-symbols-outlined { + position: absolute; + top: 50%; + left: var(--route-share, 0%); + padding: 0 0.15rem; + transform: translate(-50%, -50%) rotate(90deg); + transition: left 600ms ease; +} + +.entity-card__route-stats { + display: flex; + justify-content: space-between; + gap: 0.5rem; + margin: -0.3rem 0 0.6rem; + color: rgba(199, 214, 222, 0.6); + font-family: var(--font-mono); + font-size: 0.58rem; +} + +/* The route globe's corner label: each airport's code over its city and + state, on a soft scrim so it reads over the imagery. */ + +/* The airports' cities, under the progress bar: origin left, destination right. */ +.entity-card__route-places { + display: flex; + justify-content: space-between; + gap: 0.75rem; + margin: -0.35rem 0 0.65rem; + color: rgba(225, 236, 242, 0.75); + font-size: 0.64rem; +} + +.entity-card__route-places span { + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} + +.entity-card__route-places span:last-child { + text-align: right; +} + +/* While the preview takes turns, a hairline under the active tab fills until + the switch; a tab the viewer picked stays put and shows no timer. */ +/* The minimap's compass, top right: north at the top (the view is north up), + the cyan needle on the course to the destination, its bearing beneath. */ + +/* Follow, while the camera is on the craft. */ +#entity-card .entity-card__action--on { + color: #36dcff; + background: rgba(54, 220, 255, 0.12); + border-color: rgba(54, 220, 255, 0.45); +} + +/* ── Context refinements: one heading style, one tile style, even rhythm ── */ +.view-context__towns h4, +.view-context__group h4, +.spot-conditions__block h4, +.entity-card__section h4, +.entity-card__nearby h4 { + margin: 0 0 0.4rem; + color: rgba(199, 214, 222, 0.55); + font-family: var(--font-mono); + font-size: 0.56rem; + font-weight: 500; + letter-spacing: 0.14rem; + text-transform: uppercase; +} + +.view-context__towns, +.view-context__groups, +.spot-conditions__block, +.entity-card__section { + margin-top: 0.85rem; +} + +.view-context__fact, +.entity-card__tile, +.spot-conditions__weather { + border-radius: 8px; + border-color: rgba(255, 255, 255, 0.07); +} + +.view-context__title { + letter-spacing: 0.02em; +} + +.view-context__where { + margin-bottom: 0.2rem; +} + +/* Place chips match the omnibox's chips. */ +.view-context__chips button { + border-radius: 999px; +} + +/* ── In view: the layers that are on ── */ +.view-context__live { + margin-top: 0.85rem; +} + +.view-context__live h4 { + display: flex; + align-items: center; + gap: 0.4rem; + margin: 0 0 0.4rem; + color: rgba(199, 214, 222, 0.55); + font-family: var(--font-mono); + font-size: 0.56rem; + font-weight: 500; + letter-spacing: 0.14rem; + text-transform: uppercase; +} + +.view-context__live h4 .view-context__count { + margin-inline-start: auto; +} + +.view-context__live ul { + display: grid; + gap: 0.25rem; + margin: 0; + padding: 0; + list-style: none; +} + +.view-context__live-row { + display: flex; + align-items: center; + gap: 0.55rem; + padding: 0.4rem 0.45rem 0.4rem 0.55rem; + background: rgba(255, 255, 255, 0.035); + border: 1px solid rgba(255, 255, 255, 0.06); +} + +.view-context__live-icon { + flex: none; + font-size: 0.95rem; +} + +.view-context__live-main { + display: grid; + flex: 1 1 auto; + gap: 0.08rem; + min-width: 0; +} + +.view-context__live-name { + overflow: hidden; + color: rgba(236, 244, 248, 0.94); + font-size: 0.72rem; + text-overflow: ellipsis; + white-space: nowrap; +} + +.view-context__live-meta { + overflow: hidden; + color: rgba(199, 214, 222, 0.55); + font-family: var(--font-mono); + font-size: 0.58rem; + text-overflow: ellipsis; + white-space: nowrap; +} + +.view-context__live-state { + flex: none; + padding: 0.12rem 0.4rem; + font-family: var(--font-mono); + font-size: 0.52rem; + letter-spacing: 0.1rem; + text-transform: uppercase; + border: 1px solid currentColor; + border-radius: 999px; +} + +.view-context__live-state--live { + color: #4be3a0; +} +.view-context__live-state--loading { + color: #36dcff; +} +.view-context__live-state--stale { + color: #ffb547; +} +.view-context__live-state--error { + color: #ff5c6c; +} + +.view-context__live-off { + display: grid; + flex: none; + place-items: center; + width: 22px; + height: 22px; + padding: 0; + color: rgba(199, 214, 222, 0.5); + background: none; + border: 1px solid transparent; + border-radius: 6px; + cursor: pointer; +} + +.view-context__live-off .material-symbols-outlined { + font-size: 14px; +} + +.view-context__live-off:hover, +.view-context__live-off:focus-visible { + color: #fff; + border-color: rgba(255, 255, 255, 0.18); +} + +/* ── Selected camera: thumbnail, facts, More info ── */ +.cctv-preview { + display: grid; + gap: 0.5rem; + margin: 0.5rem 0 0.75rem; +} + +.cctv-preview__frame { + position: relative; + display: grid; + place-items: center; + aspect-ratio: 16 / 9; + overflow: hidden; + background: #05080b; + border: 1px solid rgba(255, 255, 255, 0.08); + border-radius: 8px; +} + +.cctv-preview__frame img, +.cctv-preview__live { + width: 100%; + height: 100%; + object-fit: cover; +} + +.cctv-preview__frame.is-empty span:first-child { + color: rgba(199, 214, 222, 0.5); + font-family: var(--font-mono); + font-size: 0.58rem; + letter-spacing: 0.12rem; + text-transform: uppercase; +} + +.cctv-preview__badge { + position: absolute; + left: 6px; + bottom: 6px; + padding: 2px 7px; + color: #4be3a0; + font-family: var(--font-mono); + font-size: 0.5rem; + letter-spacing: 0.1rem; + background: rgba(5, 8, 11, 0.8); + border: 1px solid rgba(75, 227, 160, 0.45); + border-radius: 999px; +} + +.cctv-preview__name { + margin: 0; + color: rgba(236, 244, 248, 0.94); + font-size: 0.78rem; +} + +.cctv-preview__facts { + display: grid; + grid-template-columns: repeat(2, minmax(0, 1fr)); + gap: 0.35rem; + margin: 0; +} + +.cctv-preview__facts div { + padding: 0.35rem 0.5rem; + background: rgba(255, 255, 255, 0.035); + border: 1px solid rgba(255, 255, 255, 0.06); + border-radius: 7px; +} + +.cctv-preview__facts dt { + color: rgba(199, 214, 222, 0.5); + font-size: 0.52rem; + letter-spacing: 0.06rem; + text-transform: uppercase; +} + +.cctv-preview__facts dd { + overflow: hidden; + margin: 0.1rem 0 0; + color: rgba(236, 244, 248, 0.92); + font-family: var(--font-mono); + font-size: 0.68rem; + text-overflow: ellipsis; + white-space: nowrap; +} + +.cctv-preview__more { + justify-content: center; +} + +.cctv-preview__expand { + position: absolute; + top: 6px; + right: 6px; + display: grid; + place-items: center; + width: 26px; + height: 26px; + padding: 0; + color: rgba(236, 244, 248, 0.9); + background: rgba(5, 8, 11, 0.7); + border: 1px solid rgba(255, 255, 255, 0.18); + border-radius: 7px; + cursor: pointer; +} + +.cctv-preview__expand .material-symbols-outlined { + font-size: 15px; +} + +.cctv-preview__expand:hover, +.cctv-preview__expand:focus-visible { + color: #7af0ff; + border-color: rgba(54, 220, 255, 0.6); +} + +/* ── Bigger camera view ── */ +.cctv-popup { + position: fixed; + inset: 0; + z-index: 400; + display: grid; + place-items: center; + padding: 2rem; + background: rgba(2, 4, 8, 0.55); + backdrop-filter: blur(3px); + -webkit-backdrop-filter: blur(3px); + animation: cctv-popup-in 160ms ease; +} + +@keyframes cctv-popup-in { + from { + opacity: 0; + } +} + +.cctv-popup__card { + display: grid; + gap: 0.6rem; + width: min(960px, 92vw); + margin: 0; + padding: 0.7rem; + background: rgba(12, 12, 20, 0.92); + border: 1px solid rgba(255, 255, 255, 0.1); + border-radius: 14px; + box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6); +} + +.cctv-popup__head { + display: flex; + align-items: center; + gap: 0.55rem; + padding: 0 0.2rem; + color: rgba(236, 244, 248, 0.94); + font-family: var(--font-mono); + font-size: 0.8rem; + letter-spacing: 0.04em; +} + +.cctv-popup__head > .material-symbols-outlined { + color: #36dcff; + font-size: 18px; +} + +.cctv-popup__badge { + padding: 2px 8px; + color: #4be3a0; + font-size: 0.55rem; + letter-spacing: 0.1rem; + border: 1px solid rgba(75, 227, 160, 0.45); + border-radius: 999px; +} + +.cctv-popup__close { + display: grid; + place-items: center; + width: 28px; + height: 28px; + margin-inline-start: auto; + padding: 0; + color: rgba(236, 244, 248, 0.8); + background: none; + border: 1px solid rgba(255, 255, 255, 0.14); + border-radius: 8px; + cursor: pointer; +} + +.cctv-popup__close:hover { + color: #fff; + border-color: rgba(255, 255, 255, 0.3); +} + +.cctv-popup__card img { + width: 100%; + max-height: 72vh; + object-fit: contain; + background: #000; + border-radius: 8px; +} + +.cctv-popup__card figcaption { + display: flex; + flex-wrap: wrap; + gap: 0.3rem 1.1rem; + padding: 0 0.2rem 0.1rem; + color: rgba(199, 214, 222, 0.6); + font-family: var(--font-mono); + font-size: 0.6rem; + letter-spacing: 0.08rem; + text-transform: uppercase; +} + +.cctv-popup__card figcaption b { + color: rgba(236, 244, 248, 0.92); + font-weight: 500; +} + +/* CCTV, open, fills the right column top to bottom like Context. */ +#right-context-rail > #cctv-panel:not(.collapsed), +#right-context-rail.layout-focus > #cctv-panel:not(.collapsed) { + flex: 0 0 var(--right-stack-max-height, auto); + height: var(--right-stack-max-height, auto); + max-height: var(--right-stack-max-height, 100%); +} + +#right-context-rail > #cctv-panel:not(.collapsed) > .cctv-panel-inner, +#right-context-rail > #cctv-panel:not(.collapsed) > [class$='-inner'] { + height: 100%; +} + +/* ── Hero tile ─────────────────────────────────────────────────────────── + One slot at the top of every card: an aircraft's route globe and turning + model, a camera's frame, or a quiet placeholder with the item's icon and + name. */ +.entity-hero { + position: relative; + margin: 0 0 0.6rem; + overflow: hidden; + border-radius: 10px; +} + +/* Both previews fill the tile, one over the other; the hidden one keeps its + size, so showing it needs no layout and no fresh canvas. */ + +.entity-hero .cctv-preview { + margin: 0; +} + +.entity-hero__placeholder { + display: grid; + grid-template-columns: auto 1fr; + align-items: center; + gap: 0.9rem; + min-height: 84px; + padding: 0.7rem 0.9rem; + background: + radial-gradient( + ellipse 45% 90% at 12% 50%, + rgba(54, 220, 255, 0.1), + transparent 70% + ), + rgba(255, 255, 255, 0.025); + border: 1px solid rgba(255, 255, 255, 0.07); + border-radius: 10px; +} + +.entity-hero__placeholder--bare { + grid-template-columns: 1fr; + justify-items: center; + gap: 0.3rem; + text-align: center; +} + +.entity-hero__glyph.material-symbols-outlined { + display: grid; + place-items: center; + width: 3.2rem; + height: 3.2rem; + color: #36dcff; + font-size: 1.9rem; + background: rgba(54, 220, 255, 0.08); + border: 1px solid rgba(54, 220, 255, 0.18); + border-radius: 50%; +} + +.entity-hero__figures { + display: flex; + flex-wrap: wrap; + gap: 0.4rem 1.1rem; + min-width: 0; +} + +.entity-hero__figure { + display: grid; + gap: 0.15rem; + min-width: 0; +} + +.entity-hero__figure strong { + overflow: hidden; + color: rgba(240, 247, 250, 0.98); + font-family: var(--font-mono); + font-size: 1.15rem; + font-weight: 600; + line-height: 1.05; + text-overflow: ellipsis; + white-space: nowrap; +} + +.entity-hero__figure strong small { + margin-inline-start: 0.2rem; + color: rgba(199, 214, 222, 0.7); + font-size: 0.62rem; + font-weight: 500; +} + +.entity-hero__figure span, +.entity-hero__kind { + color: rgba(199, 214, 222, 0.55); + font-family: var(--font-mono); + font-size: 0.52rem; + letter-spacing: 0.12rem; + text-transform: uppercase; +} + +/* ── Cockpit leads an aircraft's actions ─────────────────────────────── */ +#entity-card .entity-card__action--primary { + width: 100%; + height: 2.3rem; + color: #04131a; + font-size: 0.74rem; + font-weight: 600; + letter-spacing: 0.04rem; + background: #36dcff; + border-color: #36dcff; + box-shadow: 0 0 18px rgba(54, 220, 255, 0.28); +} + +#entity-card .entity-card__action--primary:hover, +#entity-card .entity-card__action--primary:focus-visible { + color: #04131a; + background: #7be8ff; + border-color: #7be8ff; +} + +/* Following is a state, not the main action: outlined, not filled. */ +#entity-card .entity-card__action--on { + background: transparent; +} + +/* ── Worldwide counts (globe view, nothing selected) ─────────────────── */ +.view-context__world { + margin: 0.6rem 0 0.75rem; +} + +.view-context__world h4 { + margin: 0 0 0.4rem; + color: rgba(199, 214, 222, 0.55); + font-family: var(--font-mono); + font-size: 0.56rem; + font-weight: 500; + letter-spacing: 0.14rem; + text-transform: uppercase; +} + +.view-context__world-grid { + display: grid; + grid-template-columns: repeat(2, minmax(0, 1fr)); + gap: 0.35rem; +} + +.view-context__world-tile { + display: grid; + grid-template-columns: auto 1fr; + align-items: center; + gap: 0.05rem 0.5rem; + padding: 0.5rem 0.6rem; + color: inherit; + font: inherit; + text-align: start; + background: rgba(255, 255, 255, 0.04); + border: 1px solid rgba(255, 255, 255, 0.07); + border-radius: 8px; +} + +.view-context__world-tile .material-symbols-outlined { + grid-row: 1 / 3; + color: #36dcff; + font-size: 1.3rem; +} + +.view-context__world-tile strong { + color: rgba(240, 247, 250, 0.98); + font-family: var(--font-mono); + font-size: 1rem; + font-weight: 600; + line-height: 1.1; +} + +.view-context__world-tile span:last-child { + overflow: hidden; + color: rgba(199, 214, 222, 0.6); + font-size: 0.58rem; + letter-spacing: 0.04rem; + text-overflow: ellipsis; + text-transform: uppercase; + white-space: nowrap; +} + +.view-context__world-tile.is-off { + cursor: pointer; + border-style: dashed; +} + +.view-context__world-tile.is-off .material-symbols-outlined, +.view-context__world-tile.is-off strong { + color: rgba(199, 214, 222, 0.45); +} + +.view-context__world-tile.is-off:hover, +.view-context__world-tile.is-off:focus-visible { + background: rgba(54, 220, 255, 0.08); + border-color: rgba(54, 220, 255, 0.3); +} + +/* An aircraft's altitude as a filled graph, graded by height: bright at + the top, fading towards the baseline. */ +.altitude-graph { + margin: 0 0 0.7rem; + padding: 0.5rem 0.6rem 0.45rem; + border: 1px solid rgba(160, 200, 220, 0.14); + border-radius: 8px; + background: rgba(255, 255, 255, 0.025); +} + +.altitude-graph__head, +.altitude-graph__foot { + display: flex; + align-items: baseline; + justify-content: space-between; + gap: 0.5rem; + margin: 0; +} + +.altitude-graph__label, +.altitude-graph__foot { + color: rgba(199, 214, 222, 0.6); + font-family: var(--font-mono); + font-size: 0.56rem; + letter-spacing: 0.08em; + text-transform: uppercase; +} + +.altitude-graph__now { + color: #eef6fa; + font-family: var(--font-mono); + font-size: 0.78rem; + font-weight: 600; +} + +.altitude-graph__plot { + position: relative; + height: 3.4rem; + margin: 0.35rem 0 0.3rem; + border-bottom: 1px solid rgba(160, 200, 220, 0.22); + background: repeating-linear-gradient( + to bottom, + rgba(160, 200, 220, 0.08) 0 1px, + transparent 1px 25% + ); +} + +.altitude-graph__plot svg { + display: block; + width: 100%; + height: 100%; +} + +.altitude-graph__stop--high { + stop-color: var(--accent); + stop-opacity: 0.75; +} + +.altitude-graph__stop--mid { + stop-color: var(--accent); + stop-opacity: 0.3; +} + +.altitude-graph__stop--low { + stop-color: var(--accent); + stop-opacity: 0.04; +} + +.altitude-graph__line { + fill: none; + stroke: var(--accent); + stroke-width: 1.5; + stroke-linejoin: round; + vector-effect: non-scaling-stroke; +} + +.altitude-graph__head-dot { + position: absolute; + right: -3px; + width: 7px; + height: 7px; + border-radius: 50%; + background: var(--accent); + box-shadow: 0 0 6px var(--accent); + transform: translateY(-50%); +} + +.altitude-graph__scale { + position: absolute; + top: 1px; + left: 2px; + color: rgba(199, 214, 222, 0.45); + font-family: var(--font-mono); + font-size: 0.5rem; +} + +.altitude-graph[data-trend='up'] .altitude-graph__change { + color: #7fe0a8; +} + +.altitude-graph[data-trend='down'] .altitude-graph__change { + color: #f0b46a; +} + +.altitude-graph__scale--low { + top: auto; + bottom: 1px; +} + +/* What a layer that is on is made of: under its row, a bar per split whose + segments are the parts, and a legend with each part's count. */ +.view-context__live-item { + background: rgba(255, 255, 255, 0.035); + border: 1px solid rgba(255, 255, 255, 0.06); +} + +.view-context__live-item > .view-context__live-row { + background: none; + border: 0; +} + +.view-context__split { + display: grid; + gap: 0.45rem; + padding: 0 0.55rem 0.55rem; +} + +.view-context__split-basis { + margin: 0; + color: rgba(199, 214, 222, 0.5); + font-family: var(--font-mono); + font-size: 0.54rem; + letter-spacing: 0.06em; + text-transform: uppercase; +} + +.view-context__split-bar { + display: flex; + gap: 2px; + height: 6px; + overflow: hidden; + border-radius: 3px; + background: rgba(255, 255, 255, 0.06); +} + +.view-context__split-bar i { + min-width: 2px; +} + +.view-context__split-legend { + display: grid; + grid-template-columns: repeat(2, minmax(0, 1fr)); + gap: 0.15rem 0.6rem; + margin: 0.3rem 0 0; + padding: 0; + list-style: none; +} + +.view-context__split-legend li { + display: flex; + align-items: center; + gap: 0.3rem; + min-width: 0; + color: rgba(199, 214, 222, 0.75); + font-size: 0.6rem; +} + +.view-context__split-legend i { + flex: none; + width: 6px; + height: 6px; + border-radius: 50%; +} + +.view-context__split-legend span { + flex: 1; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} + +.view-context__split-legend strong { + color: #eef6fa; + font-family: var(--font-mono); + font-weight: 600; +} + +/* The compact graph: caption, figure and a short line, nothing else. */ +.altitude-graph--compact { + padding-bottom: 0.5rem; +} + +.altitude-graph--compact .altitude-graph__plot { + height: 1.9rem; + margin-bottom: 0; + background: none; +} + +/* "Layers on" leads the view, under the place name. */ +.view-context__live { + margin: 0.6rem 0 0.7rem; +} diff --git a/src/ui/styles/spot-conditions.css b/src/ui/styles/spot-conditions.css new file mode 100644 index 000000000..a45f05bf3 --- /dev/null +++ b/src/ui/styles/spot-conditions.css @@ -0,0 +1,332 @@ +/* ── Conditions around a spot (entity card, In view) ────────────────────── */ +.spot-conditions { + display: grid; + gap: 0.6rem; + margin: 0.5rem 0 0.75rem; +} + +.spot-conditions__weather { + display: grid; + grid-template-columns: auto 1fr; + align-items: center; + gap: 0.3rem 0.65rem; + padding: 0.6rem 0.7rem; + background: linear-gradient(135deg, rgba(54, 220, 255, 0.09), rgba(255, 255, 255, 0.025)); + border: 1px solid rgba(54, 220, 255, 0.16); + border-radius: 10px; +} + +.spot-conditions__weather-icon { + color: #36dcff; + font-size: 2rem; +} + +.spot-conditions__weather-now { + display: grid; + gap: 0.1rem; +} + +.spot-conditions__weather-now strong { + color: rgba(240, 247, 250, 0.98); + font-family: var(--font-mono); + font-size: 1.35rem; + font-weight: 600; + line-height: 1; +} + +.spot-conditions__weather-now span { + color: rgba(199, 214, 222, 0.72); + font-size: 0.68rem; +} + +.spot-conditions__weather-facts { + display: grid; + grid-column: 1 / -1; + grid-template-columns: repeat(4, minmax(0, 1fr)); + gap: 0.3rem; + margin: 0.25rem 0 0; +} + +.spot-conditions__weather-facts div { + display: grid; + gap: 0.1rem; + min-width: 0; +} + +.spot-conditions__weather-facts dt { + color: rgba(199, 214, 222, 0.5); + font-size: 0.52rem; + letter-spacing: 0.06rem; + text-transform: uppercase; +} + +.spot-conditions__weather-facts dd { + overflow: hidden; + margin: 0; + color: rgba(236, 244, 248, 0.92); + font-family: var(--font-mono); + font-size: 0.66rem; + text-overflow: ellipsis; + white-space: nowrap; +} + +.spot-conditions__loading, +.spot-conditions__none { + margin: 0; + color: rgba(199, 214, 222, 0.55); + font-size: 0.66rem; +} + +.spot-conditions__block h4 { + display: flex; + align-items: center; + gap: 0.4rem; + margin: 0 0 0.25rem; + color: rgba(199, 214, 222, 0.6); + font-size: 0.58rem; + font-weight: 500; + letter-spacing: 0.06rem; + text-transform: uppercase; +} + +.spot-conditions__block h4 .material-symbols-outlined { + font-size: 0.95rem; +} + +.spot-conditions__count { + margin-inline-start: auto; + color: rgba(199, 214, 222, 0.6); + font-family: var(--font-mono); +} + +.spot-conditions__count--hot { + color: #ffb547; +} + +.spot-conditions__query { + overflow: hidden; + margin-inline-start: auto; + max-width: 50%; + color: rgba(199, 214, 222, 0.45); + text-overflow: ellipsis; + text-transform: none; + white-space: nowrap; +} + +.spot-conditions__block ul { + display: grid; + gap: 0.2rem; + margin: 0; + padding: 0; + list-style: none; +} + +.spot-conditions__block button, +.spot-conditions__block a { + display: flex; + align-items: center; + gap: 0.5rem; + width: 100%; + padding: 0.4rem 0.5rem; + color: inherit; + text-align: start; + text-decoration: none; + background: rgba(255, 255, 255, 0.035); + border: 1px solid rgba(255, 255, 255, 0.06); + border-left: 2px solid var(--hazard-tone, rgba(54, 220, 255, 0.5)); + border-radius: 7px; + cursor: pointer; +} + +.spot-conditions__block button:hover, +.spot-conditions__block a:hover, +.spot-conditions__block button:focus-visible, +.spot-conditions__block a:focus-visible { + background: rgba(54, 220, 255, 0.08); + border-color: rgba(54, 220, 255, 0.25); + border-left-color: var(--hazard-tone, #36dcff); +} + +.spot-conditions__block button > .material-symbols-outlined { + color: var(--hazard-tone, #36dcff); + font-size: 1.05rem; +} + +.spot-conditions__hazard--quake { --hazard-tone: #ffd166; } +.spot-conditions__hazard--storm { --hazard-tone: #c792ff; } +.spot-conditions__hazard--wildfire, +.spot-conditions__hazard--hotspots { --hazard-tone: #ff7a45; } +.spot-conditions__hazard--alert { --hazard-tone: #ff5c6c; } + +.spot-conditions__row-main { + display: grid; + flex: 1 1 auto; + gap: 0.08rem; + min-width: 0; +} + +.spot-conditions__row-title { + overflow: hidden; + color: rgba(236, 244, 248, 0.94); + font-size: 0.7rem; + text-overflow: ellipsis; + white-space: nowrap; +} + +.spot-conditions__row-title--wrap { + display: -webkit-box; + white-space: normal; + -webkit-box-orient: vertical; + -webkit-line-clamp: 2; +} + +.spot-conditions__row-detail { + overflow: hidden; + color: rgba(199, 214, 222, 0.55); + font-size: 0.6rem; + text-overflow: ellipsis; + white-space: nowrap; +} + +.spot-conditions__row-layer { + display: inline-flex; + align-items: center; + gap: 5px; + margin-top: 2px; + color: rgba(199, 214, 222, 0.5); + font-family: var(--font-mono); + font-size: 0.55rem; + letter-spacing: 0.04em; + text-transform: uppercase; +} + +.spot-conditions__row-dot { + width: 6px; + height: 6px; + border: 1px solid rgba(199, 214, 222, 0.55); + border-radius: 50%; +} + +.spot-conditions__row-layer.is-on { + color: rgba(0, 212, 255, 0.85); +} + +.spot-conditions__row-layer.is-on .spot-conditions__row-dot { + background: #00d4ff; + border-color: #00d4ff; + box-shadow: 0 0 5px rgba(0, 212, 255, 0.7); +} + +.spot-conditions__row-meta { + flex: none; + color: rgba(199, 214, 222, 0.7); + font-family: var(--font-mono); + font-size: 0.6rem; +} + +.spot-conditions__source { + margin: 0; + color: rgba(199, 214, 222, 0.4); + font-size: 0.55rem; +} + +/* The hazard tone as an L along the left edge and the bottom-left corner, + in place of a solid left edge. */ +.spot-conditions__block button, +.spot-conditions__block a { + position: relative; + border-radius: 0; + border-left-width: 1px; + border-left-color: rgba(255, 255, 255, 0.06); +} + +.spot-conditions__block button::before, +.spot-conditions__block a::before { + content: ''; + position: absolute; + inset: -1px auto -1px -1px; + width: 9px; + border-radius: 0; + pointer-events: none; + --tone: var(--hazard-tone, rgba(54, 220, 255, 0.6)); + background: + linear-gradient(var(--tone), var(--tone)) left bottom / 9px 1.5px no-repeat, + linear-gradient(var(--tone), var(--tone)) left bottom / 1.5px 100% no-repeat; +} + +.spot-conditions__block button:hover, +.spot-conditions__block a:hover, +.spot-conditions__block button:focus-visible, +.spot-conditions__block a:focus-visible { + border-left-color: rgba(54, 220, 255, 0.25); +} + +/* A grey rule under each list: hazards, alerts, news. */ +.spot-conditions__block { + padding-bottom: 0.65rem; + border-bottom: 1px solid rgba(255, 255, 255, 0.08); +} + +/* Local time beside the weather on a selected item's card. */ +.spot-conditions__weather--timed { + grid-template-columns: auto 1fr auto; +} + +.spot-conditions__weather-wait { + grid-column: 1 / 3; +} + +.spot-conditions__time { + display: grid; + gap: 0.1rem; + justify-items: end; + grid-column: 3; +} + +.spot-conditions__time strong { + color: rgba(240, 247, 250, 0.98); + font-family: var(--font-mono); + font-size: 1.05rem; + font-weight: 600; + line-height: 1; +} + +.spot-conditions__time span { + color: rgba(199, 214, 222, 0.6); + font-size: 0.56rem; + letter-spacing: 0.05rem; + text-transform: uppercase; +} + +/* The one distance every nearby block looks out to. */ +.spot-conditions__radius { + display: grid; + grid-template-columns: auto 1fr auto; + align-items: center; + gap: 0.6rem; + padding: 0.4rem 0.6rem; + background: rgba(255, 255, 255, 0.03); + border: 1px solid rgba(255, 255, 255, 0.07); + border-radius: 8px; +} + +.spot-conditions__radius-label { + color: rgba(199, 214, 222, 0.6); + font-size: 0.58rem; + font-weight: 500; + letter-spacing: 0.06rem; + text-transform: uppercase; +} + +.spot-conditions__radius-slider { + width: 100%; + min-width: 0; +} + +.spot-conditions__radius-value { + min-width: 4.2rem; + color: #36dcff; + font-family: var(--font-mono); + font-size: 0.7rem; + text-align: end; +} diff --git a/src/ui/styles/sun-dial.css b/src/ui/styles/sun-dial.css new file mode 100644 index 000000000..fe2cc2ab7 --- /dev/null +++ b/src/ui/styles/sun-dial.css @@ -0,0 +1,110 @@ +/* ── Sundial (Context, nothing selected) ──────────────────────────────── */ +.sun-dial { + margin: 0.5rem 0 0.6rem; + padding: 0.35rem 0.3rem 0.45rem; + background: + radial-gradient(90% 70% at 50% 45%, rgba(54, 220, 255, 0.06), transparent 70%), + rgba(255, 255, 255, 0.025); + border: 1px solid rgba(255, 255, 255, 0.07); + border-radius: 8px; +} + +.sun-dial svg { + display: block; + width: 100%; + height: auto; +} + +.sun-dial__hours line { + stroke: rgba(54, 220, 255, 0.38); + stroke-width: 0.5; +} + +.sun-dial__hours line.major { + stroke: rgba(122, 240, 255, 0.7); + stroke-width: 0.8; +} + +.sun-dial__ticks line { + stroke: rgba(54, 220, 255, 0.3); + stroke-width: 0.4; +} + +.sun-dial__ticks line.major { + stroke: rgba(122, 240, 255, 0.65); + stroke-width: 0.7; +} + +.sun-dial__hours text, +.sun-dial__pole { + fill: rgba(196, 244, 255, 0.85); + font-family: var(--font-mono); + font-size: 7px; + font-weight: 500; + letter-spacing: 0.04em; + text-anchor: middle; +} + +.sun-dial__pole { + fill: #ff6b5e; + font-size: 8px; + font-weight: 700; +} + +.sun-dial figcaption { + margin-top: 0.2rem; + color: rgba(199, 214, 222, 0.62); + font-family: var(--font-mono); + font-size: 0.58rem; + letter-spacing: 0.05rem; + text-align: center; +} + +/* Night: the plate under starlight. */ +.sun-dial--night svg { + filter: saturate(0.4) brightness(0.6); +} + +/* Small compass beside the dial, in the same cyan instrument style. */ +.sun-dial__compass-ring { + fill: rgba(5, 14, 20, 0.85); + stroke: rgba(54, 220, 255, 0.5); + stroke-width: 0.8; +} + +.sun-dial__compass-inner { + fill: none; + stroke: rgba(54, 220, 255, 0.18); + stroke-width: 0.5; + stroke-dasharray: 1.5 2; +} + +.sun-dial__compass-tick { + stroke: rgba(122, 240, 255, 0.7); + stroke-width: 0.8; +} + +.sun-dial__compass-north { + fill: #ff6b5e; +} + +.sun-dial__compass-south { + fill: rgba(196, 244, 255, 0.55); +} + +.sun-dial__compass-sun { + fill: #ffd166; + filter: drop-shadow(0 0 2px rgba(255, 209, 102, 0.9)); +} + +.sun-dial__compass-label { + fill: rgba(196, 244, 255, 0.75); + font-family: var(--font-mono); + font-size: 6.5px; + text-anchor: middle; +} + +.sun-dial__compass-label.north { + fill: #ff6b5e; + font-weight: 700; +} diff --git a/src/ui/views/ContextView.vue b/src/ui/views/ContextView.vue index 1c0684002..461774c22 100644 --- a/src/ui/views/ContextView.vue +++ b/src/ui/views/ContextView.vue @@ -1,5 +1,5 @@