mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-16 08:12:24 +00:00
Mark every UI string the unmarked-text check reported (534) plus text it cannot see (helpers, joined labels, runtime-built panels), and translate the result to Spanish and Russian: 1,679 messages each. - Kept on purpose, with the reason where the text lives: provider and product names, place and camera names, codes and units, dB values, the HUD terminal readouts, demo shot titles that saved projects look up by title, and text for AI tools and the voice model. - Modules shared with the server or AI tools stay free of the i18n import (local msg); the wind reading and voice session stay English and are translated where the page shows them. - npm test now runs the unmarked-text check. - Fixes on the way: a duplicated radio privacy paragraph, the contact panel toggle saying Expand while open, the CSS filter mistaking & for CSS. Co-Authored-By: Claude Opus 5.5 <[email protected]>
48 lines
1.4 KiB
JavaScript
48 lines
1.4 KiB
JavaScript
// This dataset is CC BY-NC-SA 3.0, not the project's MIT license.
|
|
// Commercial users must remove it or obtain a TeleGeography license.
|
|
// See DATA_SOURCES.md and the bundled dataset's source.json.
|
|
// Resolved when read, so importing this module never needs a module URL.
|
|
function cableUrl() {
|
|
return new URL(
|
|
'../../data/local_data/telegeography_submarine_cables/cable-geo.json',
|
|
import.meta.url,
|
|
).href;
|
|
}
|
|
function landingPointUrl() {
|
|
return new URL(
|
|
'../../data/local_data/telegeography_submarine_cables/landing-point-geo.json',
|
|
import.meta.url,
|
|
).href;
|
|
}
|
|
|
|
/** Supply GeoJSON collections without coupling the renderer to asset URLs. */
|
|
export function createBundledCableSource({
|
|
fetchImpl = (...args) => fetch(...args),
|
|
} = {}) {
|
|
async function read(url, signal) {
|
|
signal?.throwIfAborted();
|
|
const response = await fetchImpl(url, { signal, cache: 'force-cache' });
|
|
if (!response.ok) {
|
|
try {
|
|
await response.body?.cancel();
|
|
} catch {
|
|
/* best effort */
|
|
}
|
|
throw new Error(`HTTP ${response.status} for ${url}`);
|
|
}
|
|
const json = await response.json();
|
|
signal?.throwIfAborted();
|
|
return json;
|
|
}
|
|
return {
|
|
label: 'TeleGeography', // i18n-ignore: data provider name
|
|
async fetch(signal) {
|
|
const [cables, landingPoints] = await Promise.all([
|
|
read(cableUrl(), signal),
|
|
read(landingPointUrl(), signal),
|
|
]);
|
|
return { cables, landingPoints };
|
|
},
|
|
};
|
|
}
|