Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions docs/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,11 +92,14 @@ window.S = Object.assign({
errNoLegs: 'No legs yet โ€” drop at least two waypoints first.',
flightPlan: 'Flight plan',
fpHeaders: ['#', 'From', 'To', 'Hdg', 'Dist (NM)', 'Speed (kt)', 'Alt (ft)', 'Time', 'Fuel (gal)', 'Cum. time', 'Cum. fuel', ''],
fpHeadersShort: ['#', 'From', 'To', 'Hdg', 'Dist', 'Spd', 'Alt', 'Time', 'Fuel'],
fpDel: 'โœ•',
fpReturn: 'Return route',
fpTotal: 'Total',
fpClose: 'Close',
fpPrint: 'Print',
fpPin: 'Pin',
fpUnpin: 'Unpin',
fpFuel: 'Fuel',
tbAircraft: 'Aircraft',
tbGph: 'Gallons per hour',
Expand Down Expand Up @@ -275,6 +278,17 @@ window.S = Object.assign({
exportNoPageWarn: 'No page size selected โ€” exported image ratio may not match a print page.',
exportLayer: 'Layer',
exportBtn: 'Export',
addPlanToMap: 'Add plan to map',
addPlanToMapTitle: 'Drop a draggable, resizable placeholder on the map; the flight plan table will be drawn into it on export.',
removePlanFromMap: 'Remove plan placeholder',
planPlaceholderLabel: 'PLAN',
planPlacementLabel: 'Flight plan on print:',
planPlacementNone: 'None',
planPlacementTL: 'โ†– TL',
planPlacementTR: 'โ†— TR',
planPlacementBL: 'โ†™ BL',
planPlacementBR: 'โ†˜ BR',
planPlacementCustom: 'Customโ€ฆ',
}, window.S || {});

// Fill data-i18n / data-i18n-title / data-i18n-placeholder / data-i18n-aria
Expand Down Expand Up @@ -347,13 +361,27 @@ var pageOrient = 'portrait';
let pageOffset = { x: 0, y: 0 }; // page-frame drag offset from viewport centre
var aircraft = null; // null | {gph, taxiGal}

// Aircraft fuel-calc defaults. Used both by the Flight Plan modal's
// aircraft inputs and by drawFlightPlanTable when the modal hasn't
// been opened yet โ€” without this, a PNG export taken straight from
// the toolbar would render Fuel as '--' because aircraft was null.
const AIRCRAFT_DEFAULTS = { gph: 8, taxiGal: 1.1 };

function loadAircraft() {
try {
const raw = localStorage.getItem('navaid.aircraft');
if (raw) aircraft = JSON.parse(raw);
} catch (e) { /* storage unavailable */ }
if (!aircraft || typeof aircraft.gph !== 'number') {
aircraft = Object.assign({}, AIRCRAFT_DEFAULTS);
}
}

// Eager-load at module parse time so any code path that reads
// `aircraft` before the Flight Plan modal opens still sees the
// defaults โ€” drawFlightPlanTable (PNG export) is the main case.
loadAircraft();

function saveAircraft() {
try { localStorage.setItem('navaid.aircraft', JSON.stringify(aircraft)); } catch (e) {}
}
Expand Down
13 changes: 13 additions & 0 deletions docs/he/strings.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ window.S = {
fpReturn: 'ืžืกืœื•ืœ ื—ื–ืจื”',
fpClose: 'ืกื’ื•ืจ',
fpPrint: 'ื”ื“ืคืก',
fpPin: 'ื ืขืฅ',
fpUnpin: 'ืฉื—ืจืจ',
fpFuel: 'ื“ืœืง',
tbAircraft: 'ื›ืœื™ ื˜ื™ืก',
tbGph: 'ื’ืœื•ื ื™ื ืœืฉืขื”',
Expand Down Expand Up @@ -226,6 +228,17 @@ window.S = {
exportNoPageWarn: 'ืœื ื ื‘ื—ืจ ื’ื•ื“ืœ ื“ืฃ โ€” ื™ื—ืก ื”ืชืžื•ื ื” ื”ืžื™ื•ืฆืืช ืขืฉื•ื™ ืฉืœื ืœื”ืชืื™ื ืœื”ื“ืคืกื”.',
exportLayer: 'ืฉื›ื‘ืช ืžืคื”',
exportBtn: 'ื™ื™ืฆื',
addPlanToMap: 'ื”ื•ืกืฃ ืžืกืœื•ืœ ืœืžืคื”',
addPlanToMapTitle: 'ืžื™ืงื•ื ืžืฆื™ื™ืŸ-ืžืงื•ื ื”ื ื™ืชืŸ ืœื’ืจื™ืจื” ื•ืœืฉื™ื ื•ื™ ื’ื•ื“ืœ ืขืœ ื”ืžืคื”; ื˜ื‘ืœืช ืชื›ื ื™ืช ื”ื˜ื™ืกื” ืชืฆื•ื™ืจ ืœืชื•ื›ื• ื‘ื™ื™ืฆื•ื.',
removePlanFromMap: 'ื”ืกืจ ืืช ืžืฆื™ื™ืŸ-ื”ืžืงื•ื',
planPlaceholderLabel: 'ืžืกืœื•ืœ',
planPlacementLabel: 'ืžื™ืงื•ื ืชื›ื ื™ืช ื”ื˜ื™ืกื” ื‘ื”ื“ืคืกื”:',
planPlacementNone: 'ืœืœื',
planPlacementTL: 'โ†– ืฉ"ืข',
planPlacementTR: 'โ†— ื™"ืข',
planPlacementBL: 'โ†™ ืฉ"ืช',
planPlacementBR: 'โ†˜ ื™"ืช',
planPlacementCustom: 'ืžื•ืชืืโ€ฆ',

// --- Magnifying glass ------------------------------------------------
tbMagnifier: '๐Ÿ” ื–ื›ื•ื›ื™ืช ืžื’ื“ืœืช (M)',
Expand Down
Loading
Loading