refactor(i18n): key messages by English text; add Russian

Replace the semantic keys with the English source text, so code reads as the
UI does and English needs no catalog: t('Save keys'), tn(count, one, other)
for plurals, msg() for text stored in data, and bare data-i18n* markup that
translates the element's own English. Other languages are one flat JSON each.

- Simplify src/i18n: drop namespaces, the configurable locale pair
  (GEV_DEFAULT_LOCALE / GEV_SECONDARY_LOCALE) and its build defines. Locale
  comes from ?lang=, the stored choice, then browser languages.
- Add scripts/i18n.mjs (npm run i18n): extracts every message from t/tn/msg
  and markup, and fails on missing, unused, placeholder-mismatched or
  wrongly-shaped plural entries. npm test runs it via catalog.test.mjs.
- Add Russian (src/i18n/locales/ru.json, 833 messages), started from the
  community catalog in #312 and reviewed against the current English.
- Fix data-i18n placed on parents that would wipe their children (cockpit
  LEVEL and local weather cells, first-run EXPLORE MANUALLY tile), and a
  doubled degree sign in the TRACK ACQUIRED signal.
- Rewrite docs/TRANSLATORS.md for the new workflow; drop sections the earlier
  merge resurrected in docs/CURRENT-STATE.md.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
German KhokhlovandClaude Opus 5.5 committed 2026-10-12 13:48:56 +04:00
1 parent dfbaeafbd8
commit 13efd411b6
112 files changed
+4419 -4856

No files matched your search

+43 -184
View File
@@ -1,198 +1,57 @@
// Catalog parity gates: every shipped non-English locale (the es follow-up,
// then one PR per further locale) is checked against en — it may never LEAD en
// (no extra keys), every shared key must keep identical placeholder names,
// and plural entries must carry every en variant plus only categories
// Intl.PluralRules reports valid for that locale (see assertVariantSuperset
// below); the strict gate demands exact key-set equality so a forgotten
// translation cannot ship silently behind the English fallback. While English
// is the only shipped locale these loops are vacuous — the gate machinery
// stays so each locale PR meets it from day one.
import { test } from 'node:test';
import assert from 'node:assert/strict';
import { getCatalog, mergeNamespace } from './index.js';
import { CATALOG_LOCALES } from './locale.js';
/*
* PARITY FLIP — how the strict gate is previewed or relaxed.
* ─────────────────────────────────────────────────────────────────────────────
* REQUIRE_FULL_PARITY is on by default: every shipped locale must hold the
* exact en key set. While a NEW catalog is still an untranslated seed that
* lags en, run CI with GEV_I18N_REQUIRE_FULL_LOCALE_PARITY=0 to drop back to
* the subset rules (a locale may be a subset of en, never a superset). The
* pre-generalization name GEV_I18N_REQUIRE_FULL_ES_PARITY is still honored as
* an alias. Record every flip in docs/TRANSLATORS.md.
*/
const PARITY_OPT_OUT = process.env.GEV_I18N_REQUIRE_FULL_LOCALE_PARITY
?? process.env.GEV_I18N_REQUIRE_FULL_ES_PARITY;
const REQUIRE_FULL_PARITY = PARITY_OPT_OUT !== '0';
import {
checkCatalog,
extractMessages,
readCatalog,
shippedLocales,
} from '../../scripts/i18n.mjs';
import { LOCALES } from './locale.js';
const PLACEHOLDER_PATTERN = /\{([A-Za-z0-9_]+)\}/g;
const messages = extractMessages();
/** Placeholder names used by one catalog entry (string or plural variants). */
function placeholdersOf(entry) {
const patterns = typeof entry === 'string' ? [entry] : Object.values(entry || {});
const names = new Set();
for (const pattern of patterns) {
if (typeof pattern !== 'string') continue;
for (const match of pattern.matchAll(PLACEHOLDER_PATTERN)) names.add(match[1]);
}
return names;
}
/*
* PLURAL-SHAPE PARITY, GENERALIZED FOR MULTI-CATEGORY LOCALES
* ─────────────────────────────────────────────────────────────────────────────
* en plural entries carry { one, other } — the only cardinal categories
* Intl.PluralRules reports for English. Slavic locales such as ru/uk select
* one/few/many/other, so exact-shape equality with en would forbid their
* grammars. The rule is now, per locale and shared key:
* (a) the entry must carry EVERY variant en has (they are mandatory — the
* runtime reads entry.<category> ?? entry.other, so dropping an en
* variant strands the fallback), and
* (b) every variant added beyond en's must be a cardinal category
* Intl.PluralRules reports VALID for that locale
* (resolvedOptions().validCategories, spelled pluralCategories on
* older runtimes; e.g. 'few'/'many' are valid for ru/uk but not en).
* en itself can never grow a variant (English's valid set is exactly
* one/other), and a typo'd variant like 'xother' fails loudly for any
* locale. The runtime degrades gracefully the other way: an entry lacking a
* category its locale would select renders entry.other (selectPluralPattern
* in src/i18n/index.js; pinned in i18n.test.mjs).
*/
/** Cardinal plural categories Intl may select for a locale. */
function validPluralCategories(locale) {
const { validCategories, pluralCategories } = new Intl.PluralRules(locale).resolvedOptions();
// The property was renamed pluralCategories → validCategories in newer
// ECMAScript drafts; read whichever the running ICU exposes.
const categories = validCategories ?? pluralCategories;
assert.ok(Array.isArray(categories), `Intl.PluralRules(${locale}) exposes no category set`);
return new Set(categories);
}
/** Assert the plural-shape rule for one locale entry against its en twin. */
function assertVariantSuperset(localeEntry, enEntry, locale, key) {
assert.equal(
typeof localeEntry,
typeof enEntry,
`variant-shape drift on ${locale}:${key}: string ↔ plural-object mismatch`,
);
if (typeof enEntry === 'string') return;
const enVariants = Object.keys(enEntry);
const variants = Object.keys(localeEntry);
const missing = enVariants.filter((variant) => !variants.includes(variant));
test('every catalog file is a shipped locale and every non-English locale has a catalog', () => {
assert.deepEqual(
missing,
[],
`${locale}:${key} must keep every en variant (${enVariants.join(',')})`,
shippedLocales().sort(),
LOCALES.filter((locale) => locale !== 'en').sort(),
);
const valid = validPluralCategories(locale);
const invalid = variants.filter((variant) => !enVariants.includes(variant) && !valid.has(variant));
assert.deepEqual(
invalid,
[],
`${locale}:${key} adds categories Intl.PluralRules(${locale}) never selects: ${invalid.join(',')}`,
);
}
const enKeys = Object.keys(getCatalog('en')).sort();
// Every shipped non-en locale with its sorted key list.
const localeKeys = new Map(
CATALOG_LOCALES
.filter((locale) => locale !== 'en')
.map((locale) => [locale, Object.keys(getCatalog(locale)).sort()]),
);
test('every shipped locale ships a merged catalog', () => {
// English only in the foundation state; a locale PR appends its code here
// alongside its catalog files (docs/TRANSLATORS.md).
assert.deepEqual([...CATALOG_LOCALES].sort(), ['en']);
for (const locale of CATALOG_LOCALES) {
assert.ok(getCatalog(locale), `merged catalog for ${locale}`);
}
});
test('no locale carries keys that en does not have', () => {
for (const [locale, keys] of localeKeys) {
const extras = keys.filter((key) => !enKeys.includes(key));
assert.deepEqual(
extras,
[],
`extra ${locale} keys leak untranslated-only surfaces: ${extras.join(', ')}`,
for (const locale of shippedLocales()) {
test(`${locale} catalog matches the code (npm run i18n)`, () => {
const { missing, stale, errors } = checkCatalog(
locale,
readCatalog(locale),
messages,
);
}
});
assert.deepEqual(
{ missing, stale, errors },
{ missing: [], stale: [], errors: [] },
);
});
}
test('placeholder names match en; plural variants form an en-superset of Intl-valid categories', () => {
const enCatalog = getCatalog('en');
for (const [locale, keys] of localeKeys) {
const catalog = getCatalog(locale);
for (const key of keys) {
assert.deepEqual(
[...placeholdersOf(catalog[key])].sort(),
[...placeholdersOf(enCatalog[key])].sort(),
`placeholder drift on ${locale}:${key}: a renamed {name} would break interpolation at runtime`,
);
assertVariantSuperset(catalog[key], enCatalog[key], locale, key);
}
}
});
test('plural-shape rule: ru accepts its full Intl category set and rejects categories it never selects', () => {
const enEntry = { one: 'Cleared {count} layer', other: 'Cleared {count} layers' };
// ru selects one/few/many/other, so the full four-variant translation of
// an en { one, other } twin is a legal superset (adds only valid ru
// categories) — exactly what stage-B translators must produce…
assert.doesNotThrow(() => assertVariantSuperset(
{ one: '…', few: '…', many: '…', other: '…' },
enEntry,
test('checkCatalog reports missing, stale, placeholder and plural problems', () => {
const fixture = new Map([
['Saved {name}', { plural: false }],
['{count} keys', { plural: true, one: '{count} key' }],
['Untranslated', { plural: false }],
]);
const result = checkCatalog(
'ru',
'layers.clear.toast.cleared',
));
// …while a variant Intl never selects for ru (a typo like 'xother') fails.
assert.throws(
() => assertVariantSuperset({ one: '…', other: '…', xother: '…' }, enEntry, 'ru', 'demo.key'),
/xother/,
{
'Saved {name}': 'Сохранено {nmae}',
'{count} keys': {
one: '{count} ключ',
few: '{count} ключа',
many: '{count} ключей',
},
Removed: 'Удалено',
},
fixture,
);
// Dropping a mandatory en variant fails even when all additions are valid.
assert.throws(
() => assertVariantSuperset({ few: '…', many: '…', other: '…' }, enEntry, 'ru', 'demo.key'),
/every en variant/,
);
// String ↔ plural-object drift still fails exactly as before.
assert.throws(
() => assertVariantSuperset('plain string', enEntry, 'ru', 'demo.key'),
/string ↔ plural-object/,
);
// The gate stays honest about what the runtime can select: validCategories
// is read from Intl, not hardcoded per locale.
assert.deepEqual([...validPluralCategories('en')].sort(), ['one', 'other']);
assert.deepEqual([...validPluralCategories('ru')].sort(), ['few', 'many', 'one', 'other']);
});
test('exact key parity for every shipped locale once translation is complete (parity flip)', () => {
if (!REQUIRE_FULL_PARITY) {
// Subset mode: every locale key resolves; en-only keys fall back silently.
for (const [locale, keys] of localeKeys) {
for (const key of keys) assert.ok(enKeys.includes(key), `${locale}:${key}`);
}
return;
}
for (const [locale, keys] of localeKeys) {
assert.deepEqual(keys, enKeys, `strict gate is on: ${locale} must be key-complete`);
}
});
test('mergeNamespace prefixes relative keys and rejects malformed namespaces', () => {
const merged = mergeNamespace({ NAMESPACE: 'demo', default: { 'a.b': 'x', plain: 'y' } });
assert.deepEqual({ ...merged }, { 'demo.a.b': 'x', 'demo.plain': 'y' });
assert.throws(() => mergeNamespace({}), /must export a lowercase NAMESPACE/);
assert.throws(() => mergeNamespace({ NAMESPACE: 'Nope' }), /must export a lowercase NAMESPACE/);
assert.throws(() => mergeNamespace({ NAMESPACE: '' }), /must export a lowercase NAMESPACE/);
assert.deepEqual({ ...mergeNamespace({ NAMESPACE: 'empty' }) }, {});
});
test('registered namespaces produce the documented dot prefixes', () => {
const prefixes = new Set(enKeys.map((key) => key.split('.')[0]));
assert.deepEqual([...prefixes].sort(), ['cockpit', 'layers', 'setup', 'shell']);
assert.deepEqual(result.missing, ['Untranslated']);
assert.deepEqual(result.stale, ['Removed']);
assert.equal(result.errors.length, 2);
});
+175 -427
View File
@@ -1,457 +1,205 @@
// i18n core behavior: locale resolution precedence (incl. ?lang=), guarded
// storage, English fallback, interpolation, plural selection, document
// application on all four attributes, and hash-exact reload handling.
import { test } from 'node:test';
import { test, afterEach } from 'node:test';
import assert from 'node:assert/strict';
import {
CATALOG_LOCALES,
DEFAULT_LOCALE,
LOCALE_METADATA,
LOCALE_STORAGE_KEY,
applyDocumentLanguage,
availableLocales,
normalizeLocale,
resolveLocale,
resolveLocalePair,
writeStoredLocale,
} from './locale.js';
import {
applyDocumentTranslations,
formatDate,
formatNumber,
formatRelativeTime,
getCatalog,
getLocale,
hasMessage,
msg,
persistLocaleAndReload,
resolveMessage,
selectPluralPattern,
setLocale,
t,
tn,
} from './index.js';
import {
LOCALE_STORAGE_KEY,
applyDocumentLanguage,
normalizeLocale,
resolveLocale,
writeStoredLocale,
} from './locale.js';
// Tests mutate module locale state; each dependent test re-pins it.
function pinLocale(locale) {
assert.equal(setLocale(locale), locale);
}
afterEach(() => setLocale('en'));
test('normalizeLocale folds regional variants and rejects unsupported tags', () => {
assert.equal(normalizeLocale('es'), 'es');
assert.equal(normalizeLocale('ES'), 'es');
assert.equal(normalizeLocale('es-MX'), 'es');
assert.equal(normalizeLocale('es_419'), 'es');
assert.equal(normalizeLocale('en'), 'en');
assert.equal(normalizeLocale('en-GB'), 'en');
assert.equal(normalizeLocale('fr'), 'fr');
assert.equal(normalizeLocale('FR'), 'fr');
assert.equal(normalizeLocale('fr-CA'), 'fr');
assert.equal(normalizeLocale('fr_FR'), 'fr');
assert.equal(normalizeLocale('ru'), 'ru');
assert.equal(normalizeLocale('RU'), 'ru');
assert.equal(normalizeLocale('ru-RU'), 'ru');
assert.equal(normalizeLocale('ru_KZ'), 'ru');
assert.equal(normalizeLocale('uk'), 'uk');
assert.equal(normalizeLocale('UK'), 'uk', 'uppercase country spelling still folds to the language tag');
assert.equal(normalizeLocale('uk-UA'), 'uk');
assert.equal(normalizeLocale('uk_UA'), 'uk');
assert.equal(normalizeLocale('de'), null, 'no shipped de catalog');
assert.equal(normalizeLocale('english'), null);
assert.equal(normalizeLocale(''), null);
assert.equal(normalizeLocale(null), null);
assert.equal(normalizeLocale(42), null);
});
test('resolution precedence: ?lang= is one-shot, pair-scoped, and never persisted', () => {
// English is the only shipped catalog in the foundation state, so the
// offered pair is en-only: an override naming any other locale — a
// planned-but-unshipped code ('es') or garbage ('de') — is ignored while
// the rest of the chain keeps looking. The override-beats-everything pin
// comes back with the first secondary-locale PR (docs/TRANSLATORS.md).
const storage = { getItem: () => 'en', setItem() { throw new Error('must not be written'); } };
assert.equal(resolveLocale({
location: { search: '?lang=es' },
storage,
languages: ['en-US'],
}), 'en');
// A garbage override is ignored — the chain keeps looking.
assert.equal(resolveLocale({
location: { search: '?lang=de' },
storage,
languages: ['en-US'],
}), 'en');
// A locale code that normalizes but has no shipped catalog is equally
// ignored: fr cannot be offered before its locale PR lands.
assert.equal(resolveLocale({
location: { search: '?lang=fr' },
storage,
languages: ['en-US'],
}), 'en');
});
test('resolution precedence: a stored preference is re-checked against the offered pair', () => {
// 'es' may have been stored under a pair that once offered it; while
// English is the only shipped catalog the stored value is out-of-pair and
// reads as absent, so the navigator list decides — the stored preference
// degrades gracefully instead of rendering English under an es <html lang>.
assert.equal(resolveLocale({
location: { search: '' },
storage: { getItem: () => 'es' },
languages: ['en-US', 'en'],
}), 'en');
});
test('resolution precedence: navigator languages resolve before the English default', () => {
// Regional variants normalize to the primary tag and only then face the
// pair check: 'en-GB' resolves through the offered pair, unshipped codes
// ('fr-CA', 'es-MX') defer to the next step.
assert.equal(resolveLocale({
location: { search: '' },
storage: { getItem: () => 'xx' },
languages: ['en-GB'],
}), 'en');
assert.equal(resolveLocale({
location: { search: '' },
storage: { getItem: () => 'xx' },
languages: ['fr-CA', 'es-MX'],
}), 'en', 'no shipped fr/es catalog: neither navigator entry resolves');
assert.equal(resolveLocale({ location: { search: '' }, storage: null, languages: ['fr-CA'] }), 'en');
assert.equal(resolveLocale({ location: null, storage: null, languages: null }), DEFAULT_LOCALE);
});
test('guarded storage: a throwing store (private mode / quota) never escapes', () => {
const hostile = {
getItem() { throw new Error('SecurityError'); },
setItem() { throw new Error('SecurityError'); },
};
assert.equal(resolveLocale({ location: { search: '' }, storage: hostile, languages: ['es'] }), 'en',
'an unshipped navigator locale defers to the en-only default');
assert.equal(writeStoredLocale('es', hostile), false);
assert.equal(writeStoredLocale('es', { setItem() { throw new Error('quota'); } }), false);
assert.equal(writeStoredLocale('es', {}), false, 'no setItem function means no write');
assert.equal(writeStoredLocale('es-AR', { setItem() {} }), true, 'stored value is normalized');
});
test('applyDocumentLanguage reflects lang and dir from locale metadata', () => {
const makeDoc = () => ({ documentElement: { lang: '', dir: '' } });
const enDoc = makeDoc();
assert.equal(applyDocumentLanguage(enDoc, 'en'), true);
assert.deepEqual({ lang: enDoc.documentElement.lang, dir: enDoc.documentElement.dir },
{ lang: 'en', dir: LOCALE_METADATA.en.dir });
assert.equal(LOCALE_METADATA.en.dir, 'ltr', 'English is LTR by metadata');
const esDoc = makeDoc();
assert.equal(applyDocumentLanguage(esDoc, 'es-MX'), true);
assert.deepEqual({ lang: esDoc.documentElement.lang, dir: esDoc.documentElement.dir },
{ lang: 'es', dir: LOCALE_METADATA.es.dir });
assert.equal(LOCALE_METADATA.es.dir, 'ltr', 'Spanish is LTR by metadata');
const frDoc = makeDoc();
assert.equal(applyDocumentLanguage(frDoc, 'fr-CA'), true);
assert.deepEqual({ lang: frDoc.documentElement.lang, dir: frDoc.documentElement.dir },
{ lang: 'fr', dir: LOCALE_METADATA.fr.dir });
assert.equal(LOCALE_METADATA.fr.dir, 'ltr', 'French is LTR by metadata');
const ruDoc = makeDoc();
assert.equal(applyDocumentLanguage(ruDoc, 'ru-RU'), true);
assert.deepEqual({ lang: ruDoc.documentElement.lang, dir: ruDoc.documentElement.dir },
{ lang: 'ru', dir: LOCALE_METADATA.ru.dir });
assert.equal(LOCALE_METADATA.ru.dir, 'ltr', 'Russian is LTR by metadata');
const ukDoc = makeDoc();
assert.equal(applyDocumentLanguage(ukDoc, 'uk_UA'), true);
assert.deepEqual({ lang: ukDoc.documentElement.lang, dir: ukDoc.documentElement.dir },
{ lang: 'uk', dir: LOCALE_METADATA.uk.dir });
assert.equal(LOCALE_METADATA.uk.dir, 'ltr', 'Ukrainian is LTR by metadata');
assert.equal(applyDocumentLanguage(null, 'es'), false);
assert.equal(applyDocumentLanguage({ documentElement: null }, 'es'), false);
// An unsupported locale still yields valid metadata, never an empty dir.
const fallbackDoc = makeDoc();
applyDocumentLanguage(fallbackDoc, 'de');
assert.equal(fallbackDoc.documentElement.lang, DEFAULT_LOCALE);
assert.equal(fallbackDoc.documentElement.dir, 'ltr');
});
test('t() resolves seed keys, interpolates named placeholders, and keeps unknown ones literal', () => {
pinLocale('en');
assert.equal(t('shell.title.subtitle'), 'NO PLACE LEFT BEHIND');
assert.equal(
t('shell.loading.status.tilesUnavailable', { detail: '403 from ion' }),
'Google 3D Tiles unavailable (403 from ion). Loading the keyless globe...',
);
assert.equal(
t('shell.loading.status.tilesUnavailable', {}),
'Google 3D Tiles unavailable ({detail}). Loading the keyless globe...',
'an unprovided name stays visible instead of silently vanishing',
);
});
test('t() selects one/other plural variants through Intl.PluralRules', () => {
pinLocale('en');
assert.equal(t('layers.clear.toast.cleared', { count: 1 }), 'Cleared 1 data layer');
assert.equal(t('layers.clear.toast.cleared', { count: 3 }), 'Cleared 3 data layers');
assert.equal(t('layers.clear.toast.notCleared', { count: 1 }),
'1 data layer could not be cleared');
// Non-en plural-category selection is pinned per locale in that locale's
// PR (es: one/other; ru/uk: one/few/many/other) — with real catalog values,
// not synthetic ones. The selection CONTRACT itself stays pinned below
// through the synthetic missing-category fallback under 'ru'.
});
test('a missing key returns the key itself and never warns outside dev builds', () => {
pinLocale('en');
const warnings = [];
const originalWarn = console.warn;
console.warn = (...args) => warnings.push(args);
try {
assert.equal(t('shell.definitely.not.here'), 'shell.definitely.not.here');
assert.equal(hasMessage('shell.definitely.not.here'), false);
assert.equal(hasMessage('shell.title.subtitle'), true);
} finally {
console.warn = originalWarn;
}
// import.meta.env is absent under node:test, so the DEV gate keeps the
// console quiet here; the warn path itself only runs on the dev server.
assert.deepEqual(warnings, []);
});
test('a key missing in es resolves through the English fallback (pure lookup)', () => {
// The shipped es seed mirrors en key-for-key, so the fallback path is
// exercised through the pure resolver with synthetic catalogs — exactly the
// shape stage-3 leaves behind while es translation lags.
const catalogs = {
es: Object.freeze({}),
en: Object.freeze({ 'a.b': 'EN ONLY' }),
};
assert.equal(resolveMessage(catalogs, 'es', 'a.b'), 'EN ONLY');
assert.equal(resolveMessage(catalogs, 'fr', 'a.b'), 'EN ONLY', 'unsupported locale reads en');
assert.equal(resolveMessage(catalogs, 'es', 'nope'), undefined);
assert.equal(resolveMessage(null, 'es', 'a.b'), undefined, 'no catalogs means no message');
});
test('Intl formatters follow the active locale', () => {
pinLocale('en');
// Five significant digits: Spanish (CLDR minimumGroupingDigits=2) only
// groups from five digits up, so a 4-digit value would hide the difference.
assert.equal(formatNumber(12345.6), '12,345.6');
assert.equal(formatDate(new Date(Date.UTC(2026, 0, 15)), { year: 'numeric', month: 'long', day: 'numeric' }),
'January 15, 2026');
assert.equal(formatRelativeTime(-5, 'minute'), '5 minutes ago');
pinLocale('es');
assert.equal(formatNumber(12345.6), '12.345,6');
assert.equal(formatDate(new Date(Date.UTC(2026, 0, 15)), { year: 'numeric', month: 'long', day: 'numeric' }),
'15 de enero de 2026');
assert.equal(formatRelativeTime(-5, 'minute'), 'hace 5 minutos');
// Formatter cache is keyed per locale: switching back must not leak es forms.
pinLocale('en');
assert.equal(formatNumber(12345.6), '12,345.6');
});
test('persistLocaleAndReload stores the choice, keeps the hash exact, strips ?lang', () => {
const writes = [];
const navigations = [];
const storage = { setItem(key, value) { writes.push([key, value]); } };
const location = {
href: 'http://localhost:4173/?lang=es&welcome=1#cam=30.2672,-97.7431,alt=2500',
assign(url) { navigations.push(url); },
};
assert.equal(persistLocaleAndReload('es-MX', { location, storage }), true);
assert.deepEqual(writes, [[LOCALE_STORAGE_KEY, 'es']], 'normalized value under the versioned key');
assert.equal(navigations.length, 1);
assert.equal(navigations[0], 'http://localhost:4173/?welcome=1#cam=30.2672,-97.7431,alt=2500');
// No ?lang present: the URL round-trips unchanged, hash included.
navigations.length = 0;
persistLocaleAndReload('en', { location: { href: 'http://localhost:4173/#scene=coast', assign: (u) => navigations.push(u) } });
assert.deepEqual(navigations, ['http://localhost:4173/#scene=coast']);
// A blocked store must not block the reload.
const blocked = { setItem() { throw new Error('SecurityError'); } };
navigations.length = 0;
assert.equal(persistLocaleAndReload('es', { location: { href: 'http://x/?lang=es#a', assign: (u) => navigations.push(u) }, storage: blocked }), true);
assert.deepEqual(navigations, ['http://x/#a']);
// Nothing navigable injected: no throw, no reload claim.
assert.equal(persistLocaleAndReload('es', { location: null }), false);
assert.equal(persistLocaleAndReload('es', { location: {} }), false);
// Real-browser shape: a reloadable location MUST force the reload — assign()
// to a byte-identical URL never navigates, which stranded stored-locale
// switches (no ?lang present, hash unchanged).
const reloaded = [];
const assigned = [];
const replaced = [];
assert.equal(persistLocaleAndReload('es', {
location: {
href: 'http://localhost:4173/#scene=coast',
assign: (u) => assigned.push(u),
reload: () => reloaded.push(true),
},
history: { replaceState: (_s, _t, u) => replaced.push(u) },
}), true);
assert.deepEqual(replaced, ['http://localhost:4173/#scene=coast'], '?lang-free URL passes through replaceState');
assert.equal(reloaded.length, 1, 'reload is forced');
assert.equal(assigned.length, 0, 'assign is not used when reload exists');
});
test('a plural entry lacking a category the active locale selects degrades to other (pure selection)', () => {
// Graceful degradation stays pinned after the ru/uk translation landed:
// full-parity catalogs can no longer carry a partial entry, so the
// runtime contract — entry[category] ?? entry.other in selectPluralPattern
// (src/i18n/index.js) — is exercised with a synthetic { one, other } twin
// under ru, which selects few/many for 2–4/5–20. This is the runtime half
// of the plural-superset gate in catalog.test.mjs.
const twin = Object.freeze({ one: 'ONE {count}', other: 'OTHER {count}' });
pinLocale('ru');
assert.equal(selectPluralPattern(twin, { count: 2 }, 'demo.key'), 'OTHER {count}',
"ru selects 'few' for 2 and the entry does not carry it: entry.other renders");
assert.equal(selectPluralPattern(twin, { count: 5 }, 'demo.key'), 'OTHER {count}',
"ru selects 'many' for 5 and the entry does not carry it: entry.other renders");
assert.equal(selectPluralPattern(twin, { count: 21 }, 'demo.key'), 'ONE {count}',
"21 selects 'one', which the entry carries directly");
assert.equal(selectPluralPattern(twin, { count: 1.5 }, 'demo.key'), 'OTHER {count}',
'fractional counts select other');
assert.equal(selectPluralPattern(twin, {}, 'demo.key'), 'OTHER {count}',
'a non-finite count degrades to entry.other ?? entry.one');
pinLocale('en');
});
class FakeElement {
constructor(attributes) {
this.attributes = new Map(Object.entries(attributes));
this.textContent = '';
}
getAttribute(name) { return this.attributes.has(name) ? this.attributes.get(name) : null; }
setAttribute(name, value) { this.attributes.set(name, String(value)); }
}
function fakeDocumentFor(elements) {
function memoryStorage(initial = {}) {
const data = new Map(Object.entries(initial));
return {
querySelectorAll(selector) {
const match = /^\[([a-z0-9-]+)\]$/.exec(selector);
if (!match) return [];
return elements.filter((element) => element.getAttribute(match[1]) !== null);
},
getItem: (key) => (data.has(key) ? data.get(key) : null),
setItem: (key, value) => data.set(key, String(value)),
data,
};
}
test('applyDocumentTranslations writes all four attributes and skips unknown keys', () => {
pinLocale('en');
const elements = [
new FakeElement({ 'data-i18n': 'shell.title.subtitle' }),
new FakeElement({ 'data-i18n-title': 'shell.actions.clearLayers.title' }),
new FakeElement({ 'data-i18n-aria-label': 'shell.actions.share.ariaLabel' }),
new FakeElement({ 'data-i18n-placeholder': 'setup.keySetup.title' }),
new FakeElement({ 'data-i18n': 'shell.missing.key' }),
new FakeElement({ 'data-i18n': '' }),
];
const applied = applyDocumentTranslations(fakeDocumentFor(elements));
assert.equal(applied, 4);
assert.equal(elements[0].textContent, 'NO PLACE LEFT BEHIND');
assert.equal(elements[1].getAttribute('title'), 'Turn off all selected data layers');
assert.equal(elements[2].getAttribute('aria-label'), 'Copy share link');
assert.equal(elements[3].getAttribute('placeholder'), 'Power up the globe');
// A key that resolves nowhere leaves the element untouched.
assert.equal(elements[4].textContent, '');
assert.equal(elements[5].textContent, '');
assert.equal(applyDocumentTranslations(null), 0);
assert.equal(applyDocumentTranslations({}), 0);
test('normalizeLocale folds regional variants and rejects unshipped tags', () => {
assert.equal(normalizeLocale('ru-RU'), 'ru');
assert.equal(normalizeLocale(' RU '), 'ru');
assert.equal(normalizeLocale('en_GB'), 'en');
assert.equal(normalizeLocale('xx'), null);
assert.equal(normalizeLocale(undefined), null);
});
test('getCatalog exposes the merged, dot-prefixed registry for every shipped locale', () => {
assert.deepEqual([...CATALOG_LOCALES], ['en'],
'the foundation ships English only; each locale PR appends its code here');
for (const locale of CATALOG_LOCALES) {
const catalog = getCatalog(locale);
assert.ok(catalog, `catalog for ${locale}`);
assert.ok(Object.keys(catalog).length > 0);
for (const key of Object.keys(catalog)) {
assert.match(key, /^(shell|cockpit|layers|setup)\./, `${locale} key ${key}`);
}
}
// Codes without a shipped catalog stay null even though they normalize
// (locale-code hygiene): shipping is catalog-driven. An unknown locale
// stays null too.
assert.equal(getCatalog('es'), null);
assert.equal(getCatalog('fr'), null);
assert.equal(getCatalog('ru'), null);
assert.equal(getCatalog('uk'), null);
assert.equal(getCatalog('de'), null);
assert.equal(getLocale(), 'en', 'state survived the whole file');
});
test('locale pair: built-in and configured pairs degrade to en-only while only English ships', () => {
// English is the only shipped catalog, so the offered set is ['en'] under
// any configuration — a pair naming anything else names an unshipped
// locale. The dedup-ordering pin (default, secondary, then en as the
// always-shipped fallback) returns with the first secondary-locale PR.
assert.deepEqual([...availableLocales()], ['en'], 'no config = built-in en-only pair');
assert.deepEqual([...availableLocales({ defaultLocale: 'fr', secondaryLocale: 'en' })], ['en'],
'fr has no shipped catalog: the pair degenerates');
// Regional spellings still normalize before validation.
assert.deepEqual([...availableLocales({ defaultLocale: 'FR-fr', secondaryLocale: 'EN' })], ['en']);
// A blank field means "unset" (empty .env line) and takes its built-in default.
assert.deepEqual([...availableLocales({ defaultLocale: ' ' })], ['en']);
const pair = resolveLocalePair();
assert.equal(pair.defaultLocale, 'en');
assert.equal(pair.secondaryLocale, 'en');
assert.ok(Object.isFrozen(pair) && Object.isFrozen(pair.availableLocales));
});
test('locale pair: a configured pair naming an unshipped locale degrades to English resolution', () => {
const config = { defaultLocale: 'fr', secondaryLocale: 'en' };
// fr normalizes but has no shipped catalog: the pair is unusable, the
// built-in en-only pair applies, and every resolution step yields English.
assert.equal(resolveLocale({ location: { search: '' }, storage: null, languages: null, config }), 'en');
assert.equal(resolveLocale({ location: { search: '?lang=fr' }, storage: { getItem: () => 'fr' }, languages: null, config }), 'en');
assert.equal(resolveLocale({ location: { search: '' }, storage: { getItem: () => 'fr' }, languages: ['fr-FR'], config }), 'en');
assert.equal(resolveLocale({ location: { search: '?lang=en' }, storage: { getItem: () => 'en' }, languages: null, config }), 'en');
});
test('locale pair: ?lang= cannot offer a locale without a shipped catalog', () => {
test('resolveLocale: ?lang= wins, then the stored choice, then browser languages, then English', () => {
const storage = memoryStorage({ [LOCALE_STORAGE_KEY]: 'ru' });
assert.equal(
resolveLocale({ location: { search: '?lang=fr' }, storage: { getItem: () => 'en' }, languages: null }),
resolveLocale({
location: { search: '?lang=en' },
storage,
languages: ['ru'],
}),
'en',
'fr has no catalog: the override falls through to the stored preference',
);
assert.equal(
resolveLocale({ location: { search: '' }, storage, languages: ['en'] }),
'ru',
);
assert.equal(
resolveLocale({
location: { search: '?lang=es' },
storage: { getItem: () => 'en' },
languages: null,
config: { defaultLocale: 'es', secondaryLocale: 'fr' },
location: { search: '?lang=xx' },
storage: memoryStorage(),
languages: ['de-DE', 'ru-RU'],
}),
'ru',
);
assert.equal(
resolveLocale({
location: { search: '' },
storage: memoryStorage(),
languages: ['de'],
}),
'en',
'a configured pair cannot smuggle an unshipped locale into the offered set',
);
});
test('locale pair: a stored preference outside the offered pair falls through', () => {
// A stored 'fr'/'es' reads as absent while those locales are unshipped;
// resolution defers to the navigator list and finally the built-in default.
assert.equal(resolveLocale({ location: { search: '' }, storage: { getItem: () => 'fr' }, languages: ['en-US'] }), 'en');
assert.equal(resolveLocale({ location: { search: '' }, storage: { getItem: () => 'es' }, languages: null }), 'en',
'…down to the default');
test('a throwing storage never escapes', () => {
const storage = {
getItem() {
throw new Error('blocked');
},
setItem() {
throw new Error('blocked');
},
};
assert.equal(
resolveLocale({ location: { search: '' }, storage, languages: [] }),
'en',
);
assert.equal(writeStoredLocale('ru', storage), false);
});
test('locale pair: invalid, unshipped, or degenerate values fall back to the built-in en-only pair (dev-warn only)', () => {
const warnings = [];
const originalWarn = console.warn;
console.warn = (...args) => warnings.push(args);
try {
const badPairs = [
{ defaultLocale: 'de', secondaryLocale: 'es' }, // unknown locale code
{ defaultLocale: 'fr', secondaryLocale: 'fr' }, // unshipped + degenerate: same locale twice
{ defaultLocale: 'en', secondaryLocale: 'en' }, // equals the built-in pair: silent, still en-only
{ defaultLocale: 'english', secondaryLocale: 'ES' },
{ defaultLocale: 'en', secondaryLocale: 'es' }, // es is a known code without a shipped catalog
];
for (const bad of badPairs) {
const pair = resolveLocalePair(bad);
assert.equal(pair.defaultLocale, 'en', JSON.stringify(bad));
assert.equal(pair.secondaryLocale, 'en', JSON.stringify(bad));
assert.deepEqual([...pair.availableLocales], ['en'], JSON.stringify(bad));
assert.equal(resolveLocale({ location: { search: '' }, storage: null, languages: null, config: bad }), 'en');
}
} finally {
console.warn = originalWarn;
}
// import.meta.env is absent under node:test, so the DEV gate keeps the
// console quiet here; the warn fires only on the dev server.
assert.deepEqual(warnings, []);
test('applyDocumentLanguage sets lang and dir', () => {
const doc = { documentElement: {} };
applyDocumentLanguage(doc, 'ru-RU');
assert.deepEqual(doc.documentElement, { lang: 'ru', dir: 'ltr' });
});
test('t() returns English text in English and translates in Russian', () => {
assert.equal(t('POWERED UP'), 'POWERED UP');
setLocale('ru');
assert.notEqual(t('POWERED UP'), 'POWERED UP');
});
test('t() interpolates named values and keeps unknown names literal', () => {
assert.equal(
t('Save failed: {detail}', { detail: 'disk full' }),
'Save failed: disk full',
);
assert.equal(
t('Hello {who} {missing}', { who: 'pilot' }),
'Hello pilot {missing}',
);
});
test('t() falls back to English for text without a translation', () => {
setLocale('ru');
assert.equal(t('No such message {n}', { n: 1 }), 'No such message 1');
});
test('tn() picks English and Russian plural forms', () => {
const label = (count) =>
tn(
count,
'POWER UP · {count} KEY WAITING',
'POWER UP · {count} KEYS WAITING',
);
assert.equal(label(1), 'POWER UP · 1 KEY WAITING');
assert.equal(label(3), 'POWER UP · 3 KEYS WAITING');
setLocale('ru');
assert.match(label(1), / 1 КЛЮЧ(?![А-ЯЁ])/);
assert.match(label(3), / 3 КЛЮЧА(?![А-ЯЁ])/);
assert.match(label(5), / 5 КЛЮЧЕЙ(?![А-ЯЁ])/);
assert.match(label(21), / 21 КЛЮЧ(?![А-ЯЁ])/);
});
test('msg() returns its text unchanged', () => {
assert.equal(msg('Live Flights'), 'Live Flights');
});
test('Intl formatters follow the active locale', () => {
const date = new Date(Date.UTC(2026, 0, 15));
const options = {
year: 'numeric',
month: 'long',
day: 'numeric',
timeZone: 'UTC',
};
assert.equal(formatDate(date, options), 'January 15, 2026');
assert.equal(formatNumber(1234.5), '1,234.5');
setLocale('ru');
assert.equal(formatDate(date, options), '15 января 2026 г.');
assert.equal(formatNumber(1234.5), '1 234,5');
});
function fakeElement({ text = '', attributes = {} } = {}) {
const attrs = new Map(Object.entries(attributes));
return {
textContent: text,
getAttribute: (name) => (attrs.has(name) ? attrs.get(name) : null),
setAttribute: (name, value) => attrs.set(name, value),
attrs,
};
}
test('applyDocumentTranslations translates opted-in text and attributes in place', () => {
const label = fakeElement({ text: '\n POWERED\n UP ' });
const pin = fakeElement({ attributes: { title: 'POWERED UP' } });
const unknown = fakeElement({ text: 'No such message' });
const doc = {
querySelectorAll(selector) {
if (selector === '[data-i18n]') return [label, unknown];
if (selector === '[data-i18n-title]') return [pin];
return [];
},
};
assert.equal(
applyDocumentTranslations(doc),
0,
'English leaves markup alone',
);
setLocale('ru');
assert.equal(applyDocumentTranslations(doc), 2);
assert.equal(label.textContent, t('POWERED UP'));
assert.equal(pin.attrs.get('title'), t('POWERED UP'));
assert.equal(unknown.textContent, 'No such message');
});
test('persistLocaleAndReload stores the choice, keeps the hash, strips ?lang', () => {
const storage = memoryStorage();
const calls = [];
const location = {
href: 'https://gev.local/?lang=en&x=1#scene=a',
assign: (url) => calls.push(['assign', url]),
reload: () => calls.push(['reload']),
};
const history = {
replaceState: (_s, _t, url) => calls.push(['replace', url]),
};
assert.equal(
persistLocaleAndReload('ru', { location, history, storage }),
true,
);
assert.equal(storage.data.get(LOCALE_STORAGE_KEY), 'ru');
assert.deepEqual(calls, [
['replace', 'https://gev.local/?x=1#scene=a'],
['reload'],
]);
});
+123 -225
View File
@@ -1,93 +1,32 @@
// God's Eye View i18n core (phase 1): catalog registry, translation, and
// Intl-based formatting. English is the source/fallback catalog; a missing key
// in another locale falls back to English with a development-only warning.
// English is also the ONLY shipped catalog in this foundation change — each
// additional locale lands as a stacked follow-up PR following the recipe in
// docs/TRANSLATORS.md (catalog files + registration + CATALOG_LOCALES entry).
// Every shipped catalog is built UNCONDITIONALLY — the build cost is trivial
// and the registry stays declarative — but only locales in the configured pair
// are offered/accepted (see locale.js resolveLocalePair).
// God's Eye View i18n: the English source text is the message key.
//
// APPEND-ONLY NAMESPACE REGISTRATION
// ─────────────────────────────────────────────────────────────────────────────
// A worker adding a namespace creates locales/<locale>/<ns>.js (exporting
// NAMESPACE plus a default message map of namespace-relative keys), then
// appends ONE import line per locale and pushes the module into that locale's
// array below. Nothing else changes, so concurrent workers merge trivially.
// Namespace-relative keys are prefixed at registration time: shell.*,
// cockpit.*, layers.*, setup.*.
// t('Save keys') → 'Сохранить ключи'
// t('Cleared {name}', { name }) → named interpolation
// tn(count, '{count} camera', '{count} cameras') → plural by Intl.PluralRules
// msg('Live Flights') → marks a string kept in data
// for a later t(); returns it as is
//
// English needs no catalog. Every other locale is one flat JSON file,
// locales/<code>.json, keyed by the English text (for tn, by the English
// plural form). A missing entry falls back to English.
// `npm run i18n:check` keeps the catalogs in step with the code.
import {
DEFAULT_LOCALE,
normalizeLocale,
writeStoredLocale,
} from './locale.js';
import ru from './locales/ru.json' with { type: 'json' };
import * as enShell from './locales/en/shell.js';
import * as enCockpit from './locales/en/cockpit.js';
import * as enLayers from './locales/en/layers.js';
import * as enSetup from './locales/en/setup.js';
// Append new namespace modules here (one import + one entry per locale).
const EN_NAMESPACES = [enShell, enCockpit, enLayers, enSetup];
/**
* Prefix one namespace module's flat, namespace-relative keys with its
* declared namespace: { 'title.subtitle': … } + NAMESPACE 'shell' becomes
* 'shell.title.subtitle'.
* @param {{NAMESPACE: string, default?: object}} namespaceModule
* @returns {Record<string, string|object>} Frozen prefixed message map.
*/
export function mergeNamespace(namespaceModule) {
const prefix =
typeof namespaceModule?.NAMESPACE === 'string'
? namespaceModule.NAMESPACE.trim()
: '';
if (!/^[a-z][a-z0-9-]*$/.test(prefix)) {
throw new Error(
`i18n namespace module must export a lowercase NAMESPACE, got ${JSON.stringify(prefix)}`,
);
}
const merged = {};
for (const [key, value] of Object.entries(namespaceModule.default || {})) {
merged[`${prefix}.${key}`] = value;
}
return Object.freeze(merged);
}
/** Merge namespaces into one catalog, rejecting duplicate dot-prefixed keys. */
function buildCatalog(namespaceModules) {
const catalog = {};
for (const namespaceModule of namespaceModules) {
for (const [key, value] of Object.entries(
mergeNamespace(namespaceModule),
)) {
if (Object.hasOwn(catalog, key)) {
throw new Error(`i18n duplicate catalog key: ${key}`);
}
catalog[key] = value;
}
}
return Object.freeze(catalog);
}
const CATALOGS = Object.freeze({
[DEFAULT_LOCALE]: buildCatalog(EN_NAMESPACES),
});
/**
* The merged catalog for a locale (frozen; for coverage/parity tests and
* tooling — runtime lookups go through t()).
* @param {string} locale
* @returns {Record<string, string|object>|null}
*/
export function getCatalog(locale) {
const normalized = normalizeLocale(locale);
return (normalized && CATALOGS[normalized]) || null;
}
const CATALOGS = Object.freeze({ ru });
let currentLocale = DEFAULT_LOCALE;
/** Active locale (any catalog locale; pair-scoped by resolveLocale at boot). */
/** The catalog for a locale; null for English and unknown codes. */
export function getCatalog(locale) {
return CATALOGS[normalizeLocale(locale)] ?? null;
}
/** Active locale. */
export function getLocale() {
return currentLocale;
}
@@ -106,44 +45,74 @@ export function setLocale(locale) {
return currentLocale;
}
/** Development-only missing-key warning. Off under node:test and prod builds. */
function warnMissingKey(key, detail) {
// Vite replaces import.meta.env at build time; under node:test it is absent,
// so warnings never fire in CI — only on the dev server.
/** Development-only warning; silent under node:test and in production. */
function warnMissing(text) {
if (import.meta.env?.DEV !== true) return;
console.warn(`[i18n] missing key "${key}"${detail ? ` (${detail})` : ''}`);
console.warn(
`[i18n] no ${currentLocale} translation for ${JSON.stringify(text)}`,
);
}
const PLACEHOLDER_PATTERN = /\{([A-Za-z0-9_]+)\}/g;
/** Named {placeholder} interpolation. Unknown names stay literal so a gap
* stays visible instead of silently vanishing. */
function interpolate(pattern, values) {
if (!values) return pattern;
return pattern.replace(PLACEHOLDER_PATTERN, (literal, name) =>
Object.hasOwn(values, name) ? String(values[name]) : literal,
);
}
function lookup(text) {
const catalog = CATALOGS[currentLocale];
if (!catalog) return undefined;
if (Object.hasOwn(catalog, text)) return catalog[text];
warnMissing(text);
return undefined;
}
/**
* Pure lookup shared by t() and the parity tests: the requested locale first,
* then the English fallback catalog.
* @param {Record<string, object>} catalogs Catalog map to read from.
* @param {string} locale Locale to resolve within that map.
* @param {string} key Dot-prefixed message key.
* @returns {string|object|undefined} Raw entry, or undefined when nowhere.
* Translate English source text into the active locale.
* @param {string} text English text, e.g. 'Hold Space to talk'
* @param {object} [values] Named interpolation values
* @returns {string}
*/
export function resolveMessage(catalogs, locale, key) {
const source = catalogs || CATALOGS;
const normalized = normalizeLocale(locale);
if (
normalized &&
source[normalized] &&
Object.hasOwn(source[normalized], key)
) {
return source[normalized][key];
}
const fallback = source[DEFAULT_LOCALE];
return fallback && Object.hasOwn(fallback, key) ? fallback[key] : undefined;
export function t(text, values) {
const entry = lookup(text);
return interpolate(typeof entry === 'string' ? entry : text, values);
}
/** Whether the key resolves in the active locale or the English fallback. */
export function hasMessage(key) {
return resolveMessage(CATALOGS, currentLocale, key) !== undefined;
/**
* Translate a count-dependent message. The catalog entry for `other` holds
* one form per Intl.PluralRules category of the locale ({ one, few, many, other }
* for Russian). `{count}` is always available to the pattern.
* @param {number} count
* @param {string} one English singular, e.g. '{count} camera'
* @param {string} other English plural, e.g. '{count} cameras'
* @param {object} [values] Extra interpolation values
* @returns {string}
*/
export function tn(count, one, other, values) {
const entry = lookup(other);
const category = pluralRules(currentLocale).select(count);
let pattern;
if (entry && typeof entry === 'object') {
pattern = entry[category] ?? entry.other ?? other;
} else {
pattern = pluralRules(DEFAULT_LOCALE).select(count) === 'one' ? one : other;
}
return interpolate(pattern, { ...values, count });
}
/** Mark English text that is stored in data and translated later by t(). */
export function msg(text) {
return text;
}
const pluralRulesCache = new Map();
function pluralRulesFor(locale) {
function pluralRules(locale) {
let rules = pluralRulesCache.get(locale);
if (!rules) {
rules = new Intl.PluralRules(locale);
@@ -152,60 +121,10 @@ function pluralRulesFor(locale) {
return rules;
}
/** Select a plural variant via Intl.PluralRules for the ACTIVE locale;
* an entry lacking the selected category degrades to entry.other. Exported
* for tests: full-parity catalogs can no longer stage a partial entry, so
* the fallback is pinned synthetically (i18n.test.mjs). */
export function selectPluralPattern(entry, values, key) {
const count = values?.count;
if (typeof count !== 'number' || !Number.isFinite(count)) {
warnMissingKey(key, 'plural entry requires a finite {count} value');
return entry.other ?? entry.one;
}
const category = pluralRulesFor(currentLocale).select(count);
return entry[category] ?? entry.other;
}
const PLACEHOLDER_PATTERN = /\{([A-Za-z0-9_]+)\}/g;
/** Named {placeholder} interpolation. Unprovided names stay literal so a gap
* stays visible during development instead of silently vanishing. */
function interpolate(pattern, values) {
if (!values || typeof pattern !== 'string') return pattern;
return pattern.replace(PLACEHOLDER_PATTERN, (literal, name) =>
Object.hasOwn(values, name) ? String(values[name]) : literal,
);
}
/**
* Translate one dot-prefixed key in the active locale. Missing keys in a
* non-English locale fall back to English; keys missing everywhere return the
* key itself. Plural entries ({ one, other }) require a numeric `count` value.
* @param {string} key e.g. 'layers.clear.toast.cleared'
* @param {object} [values] Named interpolation values, e.g. { count: 3, detail: '…' }
* @returns {string}
*/
export function t(key, values) {
const entry = resolveMessage(CATALOGS, currentLocale, key);
if (entry === undefined) {
warnMissingKey(key, `not in ${currentLocale} or en catalog`);
return key;
}
if (
currentLocale !== DEFAULT_LOCALE &&
!Object.hasOwn(CATALOGS[currentLocale] || {}, key)
) {
warnMissingKey(key, `missing in ${currentLocale}, using en fallback`);
}
const pattern =
typeof entry === 'string' ? entry : selectPluralPattern(entry, values, key);
return interpolate(pattern, values);
}
/*
* Intl formatters are memoized per (kind, locale, options): the constructors
* are expensive and stage-3 extraction will format numbers and dates on panel
* refresh paths. The cache is cleared whenever the active locale changes.
* are expensive and panels format on refresh paths. The cache is cleared
* whenever the active locale changes.
*/
const formatterCache = new Map();
@@ -230,12 +149,8 @@ export function formatDate(value, options) {
}
/**
* Locale-aware relative time (Intl.RelativeTimeFormat). `value` is the signed
* distance in `unit`, e.g. formatRelativeTime(-5, 'minute') →
* '5 minutes ago' (en) / 'hace 5 minutos' (es).
* @param {number} value Signed distance in `unit`.
* @param {string} [unit] Intl unit ('second', 'minute', 'hour', 'day', …).
* @param {object} [options] Intl.RelativeTimeFormat options (numeric, style).
* Locale-aware relative time (Intl.RelativeTimeFormat), e.g.
* formatRelativeTime(-5, 'minute') → '5 minutes ago' / '5 минут назад'.
*/
export function formatRelativeTime(value, unit = 'second', options) {
return cachedFormatter('relative', Intl.RelativeTimeFormat, {
@@ -244,54 +159,46 @@ export function formatRelativeTime(value, unit = 'second', options) {
}).format(value, unit);
}
/** DOM write targets for applyDocumentTranslations: textContent plus the
* three presentation attributes vision.md requires to agree with visible
* labels. Never innerHTML — translation functions return text. */
/** Collapse markup whitespace so a message reads the same in HTML and JS. */
export function normalizeMarkupText(text) {
return String(text ?? '')
.replace(/\s+/g, ' ')
.trim();
}
/**
* Markup opt-in: the element's own English text or attribute is the source.
* <span data-i18n>Normal</span>
* <button title="Pin" data-i18n-title>…</button>
* Also data-i18n-aria-label and data-i18n-placeholder.
*/
const DOCUMENT_TRANSLATION_TARGETS = Object.freeze([
Object.freeze({
attribute: 'data-i18n',
apply(element, text) {
element.textContent = text;
},
}),
Object.freeze({
attribute: 'data-i18n-title',
apply(element, text) {
element.setAttribute('title', text);
},
}),
Object.freeze({
attribute: 'data-i18n-aria-label',
apply(element, text) {
element.setAttribute('aria-label', text);
},
}),
Object.freeze({
attribute: 'data-i18n-placeholder',
apply(element, text) {
element.setAttribute('placeholder', text);
},
}),
['data-i18n', null],
['data-i18n-title', 'title'],
['data-i18n-aria-label', 'aria-label'],
['data-i18n-placeholder', 'placeholder'],
]);
/**
* Apply catalog text to every element carrying an i18n attribute in `doc`.
* Elements whose key resolves nowhere are left untouched (warned in dev).
* @param {Document} doc
* Translate every opted-in element in `doc`. Runs once at boot; switching
* locale reloads the page.
* @param {Document|Element} doc
* @returns {number} Count of element/attribute writes performed.
*/
export function applyDocumentTranslations(doc) {
if (typeof doc?.querySelectorAll !== 'function') return 0;
if (!CATALOGS[currentLocale]) return 0;
let applied = 0;
for (const target of DOCUMENT_TRANSLATION_TARGETS) {
for (const element of doc.querySelectorAll(`[${target.attribute}]`)) {
const key = element.getAttribute?.(target.attribute);
if (!key) continue;
if (!hasMessage(key)) {
warnMissingKey(key, `attribute ${target.attribute}`);
continue;
}
target.apply(element, t(key));
for (const [marker, attribute] of DOCUMENT_TRANSLATION_TARGETS) {
for (const element of doc.querySelectorAll(`[${marker}]`)) {
const source = attribute
? element.getAttribute(attribute)
: normalizeMarkupText(element.textContent);
if (!source) continue;
const text = t(source);
if (text === source) continue;
if (attribute) element.setAttribute(attribute, text);
else element.textContent = text;
applied += 1;
}
}
@@ -300,13 +207,8 @@ export function applyDocumentTranslations(doc) {
/**
* Persist a locale choice, then reload preserving window.location.hash exactly
* and stripping ?lang from the search string — the override is one-shot and
* must never graduate into the stored URL. Storage is best-effort: where
* storage is blocked (private mode) the preference simply will not survive.
* @param {string} locale Locale the user chose (normalized here).
* @param {object} [deps]
* @param {{href: string, assign: Function}} [deps.location]
* @param {object} [deps.storage] Injected localStorage-like store.
* and stripping ?lang from the search string, so the override is one-shot.
* Storage is best-effort: where it is blocked the choice will not survive.
* @returns {boolean} true when a reload was triggered.
*/
export function persistLocaleAndReload(
@@ -320,20 +222,16 @@ export function persistLocaleAndReload(
const normalized = normalizeLocale(locale) || DEFAULT_LOCALE;
writeStoredLocale(normalized, storage);
if (!location || typeof location.assign !== 'function') return false;
const stripLang = () => {
try {
const url = new URL(location.href);
url.searchParams.delete('lang');
return url.href;
} catch {
return location.href;
}
};
// location.assign() to the byte-identical URL performs NO navigation in
// real browsers (the common case: no ?lang present, hash unchanged), so a
// stored locale change would never reload. Strip ?lang via replaceState
// (no extra history entry) and force a real reload instead.
const target = stripLang();
let target = location.href;
try {
const url = new URL(location.href);
url.searchParams.delete('lang');
target = url.href;
} catch {
// Keep the current href.
}
// location.assign() to the identical URL does not navigate, so strip ?lang
// in place and force a real reload instead.
try {
history?.replaceState?.(null, '', target);
} catch {
+29 -256
View File
@@ -1,249 +1,52 @@
// Locale identity for God's Eye View (i18n phase 1).
//
// English is the default-without-configuration, the ALWAYS-shipped fallback
// catalog, and the compatibility baseline (docs/TRANSLATORS.md). It is the
// only locale with a shipped catalog in this foundation change: additional
// locales land as stacked follow-up PRs, one per locale, each following the
// recipe in docs/TRANSLATORS.md. Which pair the app actually offers is
// configured at build/dev time through GEV_DEFAULT_LOCALE /
// GEV_SECONDARY_LOCALE (vite.config.js client defines) and resolved here —
// pair members are validated against the shipped catalogs, so while only
// English ships the pair degenerates to en-only (a single EN button).
// This module owns ONLY locale resolution and document language metadata —
// catalogs and translation helpers live in src/i18n/index.js.
// Which locale the page runs in: ?lang= → stored choice → browser languages →
// English. Only shipped locales are ever selected.
/** Durable preference key. Matches the repo convention gev:<name>:v1. */
export const LOCALE_STORAGE_KEY = 'gev:locale:v1';
/**
* Locales with a shipped catalog. 'en' is the fallback catalog locale
* (DEFAULT_LOCALE); every entry here can be normalized and looked up, though
* only locales in the configured PAIR (see resolveLocalePair) are offered in
* the UI and accepted during resolution. A locale PR appends its code here
* alongside its catalogs (docs/TRANSLATORS.md) — nothing else flips shipping.
*/
export const CATALOG_LOCALES = Object.freeze(['en']);
/**
* Locale codes normalizeLocale folds regional variants for. Kept ahead of
* shipping on purpose: normalization is locale-code hygiene ('es-MX' → 'es'),
* while SHIPPING is catalog-driven through CATALOG_LOCALES — so a locale PR
* edits only CATALOG_LOCALES plus its catalog files, and a code listed here
* without a catalog normalizes but is never offerable or resolvable.
*/
const NORMALIZABLE_LOCALES = Object.freeze(['en', 'es', 'fr', 'ru', 'uk']);
/** Fallback catalog locale and no-config default: always English. */
/** Source language and fallback. */
export const DEFAULT_LOCALE = 'en';
/**
* Built-in pair used when no env/config shapes one, or a configured one is
* unusable. English-only while English is the only shipped catalog: the
* selector degenerates to a single EN button until a secondary locale PR
* restores the built-in pair.
* Shipped locales, in selector order. Adding one: locales/<code>.json, an
* import in index.js, and an entry here (see docs/TRANSLATORS.md).
*/
const FALLBACK_PAIR = Object.freeze({
defaultLocale: 'en',
secondaryLocale: 'en',
});
export const LOCALES = Object.freeze(['en', 'ru']);
/** Document metadata per normalizable locale code. All of them are LTR. */
export const LOCALE_METADATA = Object.freeze({
en: Object.freeze({ dir: 'ltr' }),
es: Object.freeze({ dir: 'ltr' }),
fr: Object.freeze({ dir: 'ltr' }),
ru: Object.freeze({ dir: 'ltr' }),
uk: Object.freeze({ dir: 'ltr' }),
});
/** Each locale named in its own language, for the selector. */
export const LOCALE_NAMES = Object.freeze({ en: 'English', ru: 'Русский' });
/** Right-to-left locales. */
const RTL_LOCALES = Object.freeze([]);
/**
* Map any candidate language tag to a known locale code. 'es'/'fr'/'ru'/'uk'
* and every regional variant ('es-MX', 'fr_CA', 'ru-KZ', 'uk_UA') resolve to the
* primary tag; anything unknown (or not a string) resolves to null so the
* caller's precedence chain can keep looking. Knowing a code is hygiene, not
* shipping: offering/resolving a locale additionally requires a catalog
* (CATALOG_LOCALES) — see resolveLocalePair.
* @param {*} candidate Raw locale tag (?lang= value, stored value, navigator entry).
* @returns {'en'|'es'|'fr'|'ru'|'uk'|null}
* Map any language tag to a shipped locale: 'ru-RU' and 'RU' → 'ru'.
* @returns {string|null}
*/
export function normalizeLocale(candidate) {
if (typeof candidate !== 'string') return null;
const primary = candidate.trim().toLowerCase().split(/[-_]/)[0];
return NORMALIZABLE_LOCALES.includes(primary) ? primary : null;
return LOCALES.includes(primary) ? primary : null;
}
/**
* Read the configured pair from the two client defines. Both spellings are
* replaced TEXTUALLY by Vite (vite.config.js `define`), so they must stay
* verbatim member expressions. Under node:test `import.meta.env` is absent
* and the first access throws; the catch turns that into "use the defaults".
* @returns {{defaultLocale?: string, secondaryLocale?: string}}
*/
function readEnvLocalePair() {
function queryLocale(location) {
try {
return {
defaultLocale: import.meta.env.GEV_DEFAULT_LOCALE,
secondaryLocale: import.meta.env.GEV_SECONDARY_LOCALE,
};
} catch {
return {};
}
}
/** A blank string means "unset" (an empty .env line), not an invalid value. */
function orBuiltIn(value, builtIn) {
return typeof value === 'string' && value.trim() ? value : builtIn;
}
/** Development-only diagnostics, same gate as warnMissingKey in index.js. */
function warnInvalidPair(rawDefault, rawSecondary) {
// Vite replaces import.meta.env at build time; under node:test it is absent,
// so warnings never fire in CI — only on the dev server.
if (import.meta.env?.DEV !== true) return;
console.warn(
`[i18n] unusable locale pair ${JSON.stringify(String(rawDefault))}/` +
`${JSON.stringify(String(rawSecondary))} — offering English only`,
);
}
/**
* Resolve the offered locale pair. With no argument the two client defines are
* read (GEV_DEFAULT_LOCALE / GEV_SECONDARY_LOCALE; blank means the built-in
* value); an explicit { defaultLocale, secondaryLocale } injects a pair for
* tests and embedders — injected fields never fall through to the env.
*
* SHIPPING IS CATALOG-DRIVEN: both members must name a locale in
* CATALOG_LOCALES. An unknown code, an unshipped code (a locale PR not yet
* merged), or a degenerate pair (the same locale twice) returns the built-in
* pair instead, and a dev-only console.warn explains why — except when the
* raw values already ARE the built-in pair, which is the normal unconfigured
* state and must stay silent. While English is the only shipped catalog the
* built-in pair is en-only, so the selector renders a single EN button.
*
* availableLocales is the deduped [default, secondary, 'en'] triple — English
* is always shippable because its catalog is the unconditional fallback.
* @param {{defaultLocale?: string, secondaryLocale?: string}} [config]
* @returns {{defaultLocale: string, secondaryLocale: string, availableLocales: readonly string[]}} Frozen.
*/
export function resolveLocalePair(config) {
const injected =
typeof config === 'object' &&
config !== null &&
(config.defaultLocale !== undefined ||
config.secondaryLocale !== undefined);
const raw = injected ? config : readEnvLocalePair();
const rawDefault = orBuiltIn(raw?.defaultLocale, FALLBACK_PAIR.defaultLocale);
const rawSecondary = orBuiltIn(
raw?.secondaryLocale,
FALLBACK_PAIR.secondaryLocale,
);
const defaultLocale = normalizeLocale(rawDefault);
const secondaryLocale = normalizeLocale(rawSecondary);
const offerable = Boolean(
defaultLocale &&
secondaryLocale &&
CATALOG_LOCALES.includes(defaultLocale) &&
CATALOG_LOCALES.includes(secondaryLocale),
);
if (!offerable || defaultLocale === secondaryLocale) {
// The built-in pair itself is never a misconfiguration: only a raw value
// that had to be corrected warns on the dev server.
if (
rawDefault !== FALLBACK_PAIR.defaultLocale ||
rawSecondary !== FALLBACK_PAIR.secondaryLocale
) {
warnInvalidPair(rawDefault, rawSecondary);
}
return pairOf(FALLBACK_PAIR.defaultLocale, FALLBACK_PAIR.secondaryLocale);
}
return pairOf(defaultLocale, secondaryLocale);
}
/** Freeze the deduped pair + always-shipped English. */
function pairOf(defaultLocale, secondaryLocale) {
const availableLocales = [
...new Set([defaultLocale, secondaryLocale, DEFAULT_LOCALE]),
];
return Object.freeze({
defaultLocale,
secondaryLocale,
availableLocales: Object.freeze(availableLocales),
});
}
/**
* Locales the app offers and accepts, in selector order: the configured
* default, the secondary locale, then English if not already present.
* @param {{defaultLocale?: string, secondaryLocale?: string}} [config] Injectable pair (tests/embedders).
* @returns {readonly string[]}
*/
export function availableLocales(config) {
return resolveLocalePair(config).availableLocales;
}
/**
* One-shot `?lang=` override, read from the SEARCH string only.
*
* The override is never persisted, and it must never leak into the URL hash or
* share links: it dies with the URL it arrived in (persistLocaleAndReload in
* src/i18n/index.js strips it when a choice is stored). An unsupported value —
* or a shipped locale outside the configured pair — is ignored rather than
* forced to English; the rest of the precedence chain still gets to speak.
* @param {{search?: string}|null} location
* @param {readonly string[]} availableLocales Resolved pair locales.
* @returns {string|null}
*/
function queryLocaleOverride(location, availableLocales) {
const search = location?.search;
if (!search) return null;
try {
return normalizeIfAvailable(
new URLSearchParams(search).get('lang'),
availableLocales,
);
return normalizeLocale(new URLSearchParams(location?.search).get('lang'));
} catch {
return null;
}
}
/** Normalize a candidate, keeping it only when the pair offers that locale. */
function normalizeIfAvailable(candidate, availableLocales) {
const normalized = normalizeLocale(candidate);
return normalized && availableLocales.includes(normalized)
? normalized
: null;
}
/*
* STORAGE ACCESS IS LAZY AND GUARDED (same pattern as src/firstRunExperience.js):
* the `globalThis.localStorage` getter itself can throw SecurityError in Safari
* private mode or under enterprise policies, so it is only touched inside a
* try/catch at the moment of use — never in a default parameter. An injected
* `storage` (tests, embedders) short-circuits the global entirely; `undefined`
* means "use the global".
*/
/** Read the stored preference, treating every failure as "nothing stored".
* A stored locale outside the current pair reads as absent. */
function readStoredLocale(storage, availableLocales) {
function readStoredLocale(storage) {
try {
const store = storage !== undefined ? storage : globalThis.localStorage;
return normalizeIfAvailable(
store?.getItem?.(LOCALE_STORAGE_KEY),
availableLocales,
);
return normalizeLocale(store?.getItem?.(LOCALE_STORAGE_KEY));
} catch {
return null;
}
}
/**
* Write the stored preference, best-effort. Never throws. The stored value is
* any known locale code (pair membership is re-checked at resolution time, so
* a choice made under one configuration — or for a locale whose catalog has
* not shipped yet — degrades gracefully to the pair's default).
* @returns {boolean} true only if the value actually landed.
*/
/** Store the choice; false when storage is unavailable. */
export function writeStoredLocale(locale, storage) {
const normalized = normalizeLocale(locale) || DEFAULT_LOCALE;
try {
@@ -252,63 +55,33 @@ export function writeStoredLocale(locale, storage) {
store.setItem(LOCALE_STORAGE_KEY, normalized);
return true;
} catch {
// Privacy-restricted or quota-exhausted storage must never break the app.
return false;
}
}
/**
* Resolve the active locale. Precedence (docs/TRANSLATORS.md):
*
* ?lang=<locale> → stored preference → navigator.languages → configured default
*
* Every step only accepts locales in the configured pair (which always
* includes English); each step that yields nothing (absent or out-of-pair)
* defers to the next. Without env configuration the built-in pair is en-only
* (English is the only shipped catalog), so every step resolves English —
* byte-identical to the pre-configuration resolution chain.
* @param {object} [input]
* @param {{search?: string, href?: string}|null} [input.location] Location to read ?lang= from.
* @param {object|null} [input.storage] Injected localStorage-like store; `undefined` uses the global.
* @param {readonly string[]|null} [input.languages] Browser language list.
* @param {{defaultLocale?: string, secondaryLocale?: string}} [input.config] Injectable pair (tests/embedders); omit to read the client defines.
* @returns {string}
*/
/** Resolve the boot locale. Every input is injectable for tests. */
export function resolveLocale({
location = globalThis.location,
storage,
languages = globalThis.navigator?.languages,
config,
} = {}) {
const { availableLocales: offered, defaultLocale } =
resolveLocalePair(config);
const override = queryLocaleOverride(location, offered);
if (override) return override;
const stored = readStoredLocale(storage, offered);
const fromQuery = queryLocale(location);
if (fromQuery) return fromQuery;
const stored = readStoredLocale(storage);
if (stored) return stored;
if (Array.isArray(languages)) {
for (const candidate of languages) {
const normalized = normalizeIfAvailable(candidate, offered);
if (normalized) return normalized;
}
for (const candidate of Array.isArray(languages) ? languages : []) {
const normalized = normalizeLocale(candidate);
if (normalized) return normalized;
}
return defaultLocale;
return DEFAULT_LOCALE;
}
/**
* Reflect the active locale on the document: `<html lang>` and `<html dir>`
* must always agree with the language actually being rendered.
* @param {Document} doc Document whose documentElement carries the metadata.
* @param {string} locale Locale to apply (normalized here).
* @returns {boolean} true when the metadata was written.
*/
/** Set <html lang> and <html dir>. */
export function applyDocumentLanguage(doc, locale = DEFAULT_LOCALE) {
const root = doc?.documentElement;
if (!root) return false;
const normalized = normalizeLocale(locale) || DEFAULT_LOCALE;
root.lang = normalized;
root.dir = (
LOCALE_METADATA[normalized] || LOCALE_METADATA[DEFAULT_LOCALE]
).dir;
root.dir = RTL_LOCALES.includes(normalized) ? 'rtl' : 'ltr';
return true;
}
-562
View File
@@ -1,562 +0,0 @@
// English catalog — cockpit namespace (phase-1 seed).
//
// Owns the first-person cockpit HUD, its Contact summary, and the briefing
// carousel. Keys are namespace-relative; the registry prefixes them with
// `cockpit.`.
export const NAMESPACE = 'cockpit';
export default {
// index.html #cockpit-hud section aria-label
'hud.sectionLabel': 'Aircraft cockpit view',
// index.html #map-view-switch button label
'exit.label': 'EXIT COCKPIT',
// index.html .cockpit-readout-label
'readout.groundSpeed': 'GROUND SPEED',
'readout.altitude': 'ALTITUDE',
// index.html .cockpit-context-kicker / #cockpit-context-subject (initial)
'context.kicker': 'CONTACT',
'context.subjectWindow': 'CONTACTS · 250 KM',
// index.html #cockpit-brief-kicker / #cockpit-brief-subtitle (initial)
'brief.kicker': 'LIVE SIGNALS',
'brief.subtitle': 'OBSERVED / MAPPED PINGS',
// index.html #cockpit-vision-current small label
'vision.current': 'CURRENT',
// index.html #cockpit-radio-station (initial)
'radio.station.ready': 'READY',
// ── Phase-2 static markup extraction (index.html), appended ──────────────
// The shell worker owns ALL index.html static markup in phase 2
// (docs/TRANSLATORS.md cross-surface rule); these keys land here because
// src/ui.js and src/hud.js own the surfaces' runtime half in phase 3.
// index.html #style-indicator / #clean-view-exit (visual-style chrome)
'presets.activeStyleLabel': 'ACTIVE STYLE',
'display.cleanViewExitTitle': 'Return UI controls',
'display.cleanViewExitLabel': 'EXIT CLEAN VIEW',
// index.html control panel — Visual Presets dock tray
'presets.toggleAriaLabel': 'Expand Visual Presets',
// Key-only: the .panel-title node shares its element with the dock-label-icon
// span, so a data-i18n write would wipe the icon; phase 3 wires this via t().
'presets.title': 'VISUAL PRESETS',
'presets.pinAriaLabel': 'Pin visual presets',
'presets.pinTitle': 'Keep visual presets open',
'presets.styleNormalTitle': 'Show the globe without a visual filter.',
'presets.styleNormalLabel': 'Normal',
'presets.styleCrtTitle':
'Emulate a green phosphor CRT with scanlines and screen curvature.',
'presets.styleCrtLabel': 'CRT',
'presets.styleNvgTitle':
'Simulate night-vision goggles with green intensification and a tube vignette.',
'presets.styleNvgLabel': 'NVG',
'presets.styleFlirTitle':
'Simulate FLIR-style thermal contrast. Turn up Ironbow for color.',
'presets.styleFlirLabel': 'FLIR',
'presets.styleAnimeTitle':
'Apply bright cel-shaded color and illustrated outlines.',
'presets.styleAnimeLabel': 'Anime',
'presets.styleNoirTitle': 'Apply high-contrast monochrome film-noir grading.',
'presets.styleNoirLabel': 'Noir',
'presets.styleSnowTitle':
'Add a cold, snowy whiteout treatment to the scene.',
'presets.styleSnowLabel': 'Snow',
// Key-only: the static span text is pinned verbatim by mapStackChips.test.mjs
// (id="map-source-label">MAP SOURCE<), so no attribute can be added without
// touching that test; phase 3 owns the swap.
'presets.mapSourceLabel': 'MAP SOURCE',
// Key-only: the chip-row tag is pinned literally by mapStackChips.test.mjs.
'presets.mapSourceChipsAriaLabel': 'Map source',
'presets.miniStyleLabel': 'Style',
// index.html #pp-toggles DISPLAY rail
// Key-only: .pp-header-label text is pinned verbatim by panelStackLayout.test.mjs.
'display.title': 'DISPLAY',
'display.collapseTitle': 'Collapse panel',
'display.hudToggleTitle': 'Intelligence HUD (H)',
'display.hudLayoutLabel': 'Layout',
'display.hudLayoutAriaLabel': 'HUD layout',
'display.hudLayoutTactical': 'Tactical',
'display.hudLayoutOperator': 'Operator',
'display.hudLayoutMinimal': 'Minimal',
'display.detectionToggleTitle': 'Detection Overlay (D)',
'display.detectionAriaLabel': 'Detection overlay',
'display.detectionLabel': 'DETECT',
'display.densityLabel': 'Density',
'display.densityAriaLabel': 'Detection label density',
'display.allocationLabel': 'Allocation',
'display.allocationAriaLabel': 'Detection label allocation',
'display.allocationElastic': 'Elastic',
'display.allocationWeighted': 'Weighted',
'display.fadeLabel': 'Fade',
'display.fadeAriaLabel': 'Detection fade distance',
'display.fadeTitle':
'World-overlay fade distance outside the keyhole as a percentage of its radius',
'display.outsideLabel': 'Outside',
'display.outsideAriaLabel': 'Detection opacity outside the keyhole',
'display.outsideTitle':
'World-overlay label and card opacity beyond the fade distance',
'display.parametersTitle': 'PARAMETERS',
'display.parametersCollapseTitle': 'Collapse panel',
'display.modelsToggleTitle':
'3D aircraft — flat icons zoomed out, 3D models up close',
'display.modelsLabel': 'Models',
'display.modelsCoverageAriaLabel': '3D model coverage',
'display.modelsModeProximity': 'Proximity',
'display.modelsModeAll': 'All',
'display.scopeToggleTitle': 'Scope — the circular viewport mask',
'display.scopeLabel': 'Scope',
'display.featherLabel': 'Feather',
'display.featherTitle':
'Scope edge feather as a percentage of the keyhole radius',
'display.celestialToggleTitle': 'Celestial ring — reveal the full globe',
'display.celestialLabel': 'Celestial',
'display.cleanViewToggleTitle': 'Hide UI chrome',
'display.cleanViewLabel': 'Clean UI',
'display.bloomToggleTitle': 'Bloom / Glow',
'display.bloomLabel': 'Bloom',
'display.sharpenToggleTitle': 'Sharpening',
'display.sharpenLabel': 'Sharpen',
// index.html location bar (dock locations tray; ui.js owns the runtime half)
// Key-only: .location-toolbar-label shares its element with dock-label-icon.
'location.toolbarLabel': 'LOCATION',
'location.collapseTitle': 'Collapse panel',
'location.pinAriaLabel': 'Pin location tray',
'location.pinTitle': 'Keep location tray open',
// Initial mini-status values; ui.js rewrites both once a place resolves.
'location.miniCityInitial': '📍 Location: --',
'location.miniPoiInitial': 'Landmark: --',
'location.searchToggleTitle': 'Search any location',
'location.searchPlaceholder': 'Search any location...',
// index.html cockpit HUD statics
'hud.level': 'LEVEL',
'hud.routeDirectionAriaLabel': 'Estimated destination direction',
// Initial idle readout; ui.js rewrites it with a live bearing.
'hud.routeDirectionIdle': 'DEST ---°',
'hud.visorPlane': 'OPTICAL PLANE · 01',
'hud.visorLock': 'VISOR LOCK · ACTIVE',
'hud.firstPerson': 'FIRST PERSON',
// Initial meta line; ui.js rewrites it from live track state.
'hud.aircraftMetaInitial': 'LIVE TRACK · COURSE ALIGNED',
'hud.visionGroupAriaLabel': 'Cockpit vision style',
'hud.compassAriaLabel': 'Current aircraft heading',
'readout.rimGroundSpeed': 'GROUND SPEED · KTS',
'readout.rimAltitude': 'ALTITUDE · FT',
// index.html cockpit vision controls
'vision.previousLabel': 'PREV',
'vision.previousAriaLabel': 'Previous cockpit vision style',
'vision.previousTitle': 'Previous vision style',
// The NORMAL token inside these two is the style name; phase 3 splits the
// dynamic token out when the runtime half is extracted.
'vision.currentAriaLabel':
'Current cockpit vision style: NORMAL. Activate for next style.',
'vision.currentTitle': 'Current style: NORMAL — click for next',
'vision.nextLabel': 'NEXT',
'vision.nextAriaLabel': 'Next cockpit vision style',
'vision.nextTitle': 'Next vision style',
// index.html view switcher
'exit.navAriaLabel': 'View switcher',
'exit.resetAriaLabel': 'Reset cockpit to full globe view',
'exit.resetTitle': 'Exit cockpit and return to full globe view',
'exit.resetLabel': 'RESET',
'exit.ariaLabel': 'Exit cockpit view',
'exit.title': 'Exit cockpit view',
// index.html cockpit route card
'route.cardAriaLabel': 'Estimated flight plan',
'route.kicker': 'ESTIMATED FLIGHT PLAN',
'route.statusUnavailable': 'ROUTE DATA UNAVAILABLE',
'route.fromLabel': 'FROM',
'route.toLabel': 'TO',
'route.unknownEndpoint': 'UNKNOWN',
// index.html cockpit briefing carousel
// (brief.kicker 'LIVE SIGNALS' is seeded above but is KEY-ONLY: #cockpit-brief-kicker
// shares its element with the live-dot <i>, so no data-i18n attribute can target it.)
'brief.carouselAriaLabel': 'Cockpit briefing carousel',
'brief.actionsAriaLabel': 'Cockpit briefing controls',
'brief.previousAriaLabel': 'Previous briefing page',
'brief.previousTitle': 'Previous briefing page',
'brief.nextAriaLabel': 'Next briefing page',
'brief.nextTitle': 'Next briefing page',
// Title is static prose; the visible label + aria-label are CYCLE ON/OFF
// states that belong to the phase-3 runtime extraction.
'brief.autoTitle':
'Cycle briefing pages automatically every 9 seconds (Signals → News → Local). Pauses while you hover or focus the panel. Live signal data refreshes continuously either way.',
'brief.collapseAriaLabel': 'Collapse cockpit briefing panel',
'brief.collapseTitle': 'Collapse briefing panel',
'brief.signalsAriaLabel': 'Live signals',
'brief.newsAriaLabel': 'Latest regional news',
'brief.localAriaLabel': 'Location-based information',
'brief.newsAcquiring': 'ACQUIRING REGIONAL NEWS',
'brief.localResolving': 'RESOLVING REGION',
'brief.labelTemp': 'TEMP',
'brief.labelWind': 'WIND',
'brief.labelSky': 'SKY',
'brief.labelPrecip': 'PRECIP',
'brief.sourceNote': 'SOURCE-BACKED EVENTS · NO SYNTHETIC NEWS',
'brief.tabSignalsAriaLabel': 'Show Live Signals',
'brief.tabNewsAriaLabel': 'Show Regional News',
'brief.tabLocalAriaLabel': 'Show Local Info',
// index.html cockpit context panel (right-rail Global Context included)
'context.panelAriaLabel': 'Contact cockpit summary',
'context.navAriaLabel': 'Contact navigation',
'context.previousAriaLabel':
'Previous — prior visited contact in the 250 km window',
'context.previousTitle':
'Previous — prior visited contact in the 250 km window',
'context.nextAriaLabel':
'Next — nearest unvisited contact in the 250 km window',
'context.nextTitle': 'Next — nearest unvisited contact in the 250 km window',
'context.toggleAriaLabel': 'Collapse Contact panel',
'context.toggleTitle': 'Collapse contact panel',
'context.qualifier': 'CONTEXT ONLY',
'context.cohortsAriaLabel': 'Nearby cohort counts',
'context.nearestLabel': 'NEAREST OBSERVED / MAPPED',
'context.nearestEmpty': 'NO AVAILABLE EXAMPLE',
'context.uncertaintyNote': 'AVAILABLE INPUTS ONLY · NOT AN ALL-CLEAR',
'context.weatherEnableAriaLabel': 'Enable cockpit weather effects',
'context.weatherEnableTitle': 'Enable cockpit weather effects',
'context.panelTitle': 'CONTEXT',
'context.collapseTitle': 'Expand panel',
'context.modesAriaLabel': 'Context mode',
'context.contactsTabAriaLabel': 'CONTACTS',
'context.contactsTabTitle':
'Cycles the nearest contacts of whatever type you select — planes, vessels, installations. Satellites track independently.',
'context.contactsTabLabel': 'CONTACTS',
'context.missionsTabLabel': 'SPACE MISSIONS',
'context.standbyTitle': 'SELECT CONTEXT',
'context.actionsAriaLabel': 'Contact Context actions',
'context.cockpitEntryLabel': 'COCKPIT',
'context.searchNearbyLabel': 'SEARCH NEARBY SITES',
'context.tr3bAriaLabel': 'Reclassify tracked contact as TR-3B',
'context.tr3bTitle': 'Reclassify as TR-3B',
'context.awarenessOffTitle': 'CONTACTS CONTEXT OFF',
'context.awarenessOffHint':
'SELECT CONTACTS TO LOAD OBSERVED / MAPPED PROXIMITY',
'context.rosterAriaLabel': 'Available Space Missions',
'context.rosterTitle': 'AVAILABLE MISSIONS',
'context.rosterHint': 'SELECT A MISSION TO INSPECT',
'context.rosterLoading': 'LOADING 30-DAY MISSION INDEX',
'context.radioToggleAriaLabel': 'Open compact Radio controls',
'context.radioToggleTitle': 'Open compact Radio controls',
'context.radioMiniGroupAriaLabel': 'Compact Radio controls',
'context.radioMiniTitle': 'RADIO',
'context.radioMiniReady': 'RADIO READY',
'context.radioDetailsAriaLabel': 'Open detailed Radio controls',
'context.radioDetailsTitle': 'Open detailed Radio controls',
'context.radioCloseAriaLabel': 'Close compact Radio controls',
'context.radioCloseTitle': 'Close compact Radio controls',
'context.radioMiniEnable': 'ENABLE',
'context.radioMiniPrevAriaLabel': 'Previous filtered radio station',
'context.radioMiniPrevTitle': 'Previous station',
'context.radioMiniPlayAriaLabel': 'Play selected radio station',
'context.radioMiniPlayTitle': 'Play',
'context.radioMiniNextAriaLabel': 'Next filtered radio station',
'context.radioMiniNextTitle': 'Next station',
'context.radioMiniVolumeLabel': 'VOLUME',
'context.radioMiniVolumeAriaLabel': 'Compact Radio volume',
// index.html cockpit utility controls + compact radio popover
'utility.controlsAriaLabel': 'Cockpit display and Radio controls',
'utility.displayLabel': 'DISPLAY',
'utility.radioLabel': 'RADIO',
'utility.displayToggleAriaLabel': 'Expand Cockpit display options',
'utility.displayToggleTitle': 'Expand Cockpit display options',
'utility.displayPanelAriaLabel': 'Cockpit display options',
'utility.radioToggleAriaLabel': 'Expand Cockpit Radio controls',
'utility.radioToggleTitle': 'Expand Cockpit Radio controls',
'utility.radioPanelAriaLabel': 'Cockpit compact Radio controls',
'radio.enable': 'ENABLE',
'radio.prevAriaLabel': 'Previous filtered radio station',
'radio.playAriaLabel': 'Play selected radio station',
'radio.nextAriaLabel': 'Next filtered radio station',
'radio.volumeLabel': 'VOLUME',
'radio.volumeAriaLabel': 'Cockpit Radio volume',
// ── Phase-3 runtime extraction (src/ui.js), appended ─────────────────────
// Values stay byte-identical to the previous English literals; existing
// tests pin many of them under the default locale.
// _syncPanelCollapseButton(): composed panel collapse titles. {name} is the
// panel's own (already localized) .panel-title text.
'panel.expandTitle': 'Expand {name}',
'panel.collapseTitle': 'Collapse {name}',
// Fallback when a panel ships no .panel-title/.pp-header-label node.
'panel.fallbackName': 'panel',
// Radio panel collapse state; the expand state reuses the layers.radio.*
// keys seeded on the static button in phase 2.
'panel.radioCollapseTitle': 'Collapse Radio',
'panel.radioCollapseAria': 'Collapse Radio section',
// _updateLocationMiniStatus(): runtime rewrite of the collapsed LOCATION
// readout's single-segment search fallback (initial-state keys
// location.miniCityInitial/miniPoiInitial were seeded in phase 2).
'location.miniSearchedPlaceholder': 'Searched location',
// ── Phase-3 runtime extraction batch 2: cockpit + Context renderers ───────
// syncWeatherToggle(): state-sibling keys for the runtime ON/OFF rewrite
// (context.weatherEnableAriaLabel was seeded on the static button).
'context.weatherDisableAriaLabel': 'Disable cockpit weather effects',
'context.weatherStateOn': 'ON',
'context.weatherStateOff': 'OFF',
// syncTr3bToggle(): converted-state title sibling of context.tr3bTitle.
'context.tr3bRestoreTitle': 'Restore real aircraft',
// setVisionMode(): the style token is dynamic, so the sentence is split out
// of the seeded vision.currentAriaLabel/currentTitle (whose values pin the
// NORMAL default) into {style} templates.
'vision.styleNameNightVision': 'Night vision',
'vision.styleNameThermal': 'Thermal',
'vision.styleNameAnime': 'Anime',
'vision.styleNameNoir': 'Noir',
'vision.styleNameSnow': 'Snow',
'vision.currentAriaTemplate':
'Current cockpit vision style: {style}. Activate for next style.',
'vision.currentTitleTemplate': 'Current style: {style} — click for next',
// Cockpit signal stream (pushCockpitSignal / renderCockpitSignals).
'signal.trackAcquired': 'TRACK ACQUIRED',
'signal.trackDetail': '{label} · COURSE {heading}°',
'signal.selectFlightAria': 'Select flight {title}',
'signal.contextStandby': 'CONTEXT STANDBY',
'signal.contextStandbyHint': 'ENABLE GLOBAL CONTEXT FOR PROXIMITY PINGS',
'signal.contactLostTitle': 'CONTACT LOST · {subject}',
'signal.contactLostDetail':
'SUBJECT LEFT ITS FEED · READOUT HOLDING LAST KNOWN',
'signal.classMilitary': 'MILITARY FLIGHT',
'signal.classCommercial': 'COMMERCIAL FLIGHT',
'signal.contactCurrent': '{aircraftClass} · CURRENT',
'signal.contactRange': '{aircraftClass} · {distance}',
'signal.distanceUnknown': 'DISTANCE UNKNOWN',
'signal.inputsUnknown': {
one: '{count} INPUT UNKNOWN',
other: '{count} INPUTS UNKNOWN',
},
'signal.sourceStatusUnavailable': 'SOURCE STATUS UNAVAILABLE',
// updateHud(): callsign fallback + the composed aircraft meta line (each
// feed state is its own key so no state can leak English later).
'hud.fallbackCallsign': 'AIRCRAFT',
'hud.metaClassMilitary': 'MILITARY',
'hud.metaClassCommercial': 'COMMERCIAL',
'hud.metaFeedAcquiringSurface': 'ACQUIRING SURFACE',
'hud.metaFeedSurfaceFallback': 'SURFACE FALLBACK',
'hud.metaFeedStale': 'STALE FEED',
'hud.metaFeedLive': 'LIVE TRACK',
'hud.aircraftMetaTemplate': '{aircraftClass} · {feedState} · COURSE ALIGNED',
// updateRoute(): runtime state siblings of the seeded route keys.
'route.statusArrowEstimated': 'ARROW · ESTIMATED DIRECTION',
'route.directionLabel': 'DEST {bearing}',
// updateContext(): uncertainty/nearest/bearing readout states.
'context.uncertaintyContactLost':
'CONTACT LOST · LAST KNOWN READOUT · NOT AN ALL-CLEAR',
'context.uncertaintyInputsUnknown': {
one: '{count} INPUT UNKNOWN · NOT AN ALL-CLEAR',
other: '{count} INPUTS UNKNOWN · NOT AN ALL-CLEAR',
},
'context.uncertaintyInputsCurrent':
'AVAILABLE INPUTS CURRENT · NOT AN ALL-CLEAR',
'context.nearestTemplate': '{cohort} · {contact}',
'context.nearestUnavailableAria': '{cohort}, Unavailable',
'context.bearingNone': 'BRG —',
'context.bearingAhead': 'AHEAD',
'context.bearingSide': '{side} {angle}',
'context.sideLeft': 'L',
'context.sideRight': 'R',
// setContextCollapsed()/setSignalCollapsed(): expand-state siblings.
'context.toggleExpandAriaLabel': 'Expand Contact panel',
'context.toggleExpandTitle': 'Expand contact panel',
'brief.expandAriaLabel': 'Expand cockpit briefing panel',
'brief.expandTitle': 'Expand briefing panel',
// setBriefAutoRotate(): cycle toggle states + the ON-state help text (the
// OFF-state help is the seeded brief.autoTitle).
'brief.autoOn': 'CYCLE ON',
'brief.autoOff': 'CYCLE OFF',
'brief.autoTitleOn':
'Stop automatic page cycling. Previous, Next, and the SIG/NEWS/LOCAL tabs stay available.',
// Briefing carousel pages (kicker/subtitle/source per page; the news/local
// source lines are provider attribution and stay English).
'brief.kickerNews': 'REGIONAL NEWS',
'brief.kickerLocal': 'LOCAL INFO',
'brief.subtitleNews': 'LATEST LOCATION-MATCHED REPORTING',
'brief.subtitleLocal': 'PLACE / CONDITIONS / POSITION',
// Local position + regional brief status states.
'brief.positionUnavailable': 'POSITION UNAVAILABLE',
'brief.newsUnavailable': 'REGIONAL NEWS UNAVAILABLE',
'brief.regionUnavailable': 'REGION UNAVAILABLE',
'brief.newsEmpty': 'NO RECENT LOCATION MATCHES',
// renderRegionalBrief(): article metadata, cloud readout, and age chips.
'brief.metadataSourceFallback': 'SOURCE',
'brief.articleMetaTemplate': '{domain} · {age}',
'brief.newsSourceLine': '{source} · LOCATION QUERY',
'brief.age.timeUnknown': 'TIME UNKNOWN',
'brief.age.minutes': '{count}M AGO',
'brief.age.hours': '{count}H AGO',
'brief.age.days': '{count}D AGO',
'brief.wind.dirUnknown': 'DIR UNKNOWN',
'brief.cloudTemplate': 'CLOUD {pct}%',
'brief.cloudUnknown': 'CLOUD UNKNOWN',
// ── Phase-3 runtime extraction batch 3: toasts, loading helpers, map tray ─
// Panel-chrome + share/location toasts.
'panel.layoutResetToast':
'Panel layout updated — positions reset to new defaults',
'share.toastCopied': 'Link copied!',
'share.toastCopyFailed': 'Copy failed',
'location.toastNotFound': 'Location not found',
'location.toastSearchFailed': 'Search failed',
'location.toastFlyToPoiFirst': 'Fly to a POI first',
'actions.clearLayersBusyAria': 'Clearing selected data layers',
'actions.clearLayersFailedToast': 'Selected data layers could not be cleared',
// Global status chip notices (_handleShareTrackingRestoreStatus).
'status.acquiring': 'ACQUIRING',
'status.subjectFallback': 'entity',
'status.sharedSubjectDetail': 'SHARED {subject}',
'status.sharedFollowExpired': 'Shared {subject} follow expired',
'status.sharedRestoreFailed':
'Shared {subject} could not be restored — feed unavailable',
'status.sharedUnavailable': 'Shared {subject} is unavailable',
// Context mode user-facing action failures.
'context.modeContext': 'Context',
'context.modeSpaceMissions': 'Space Missions',
'context.toastStartBlocked':
'{mode} could not start because another layer did not stop cleanly',
'context.toastTransitionFailedContacts':
'Contacts could not complete the requested transition; try again',
'context.toastTransitionFailedMissions':
'Space Missions could not complete the requested transition; try again',
'context.toastInstallationsRefreshFailed':
'Nearby installations could not be refreshed; try again',
'context.toastRestoreFailed':
'Context could not restore every layer; try again',
'context.toastZoomToSearch': 'Zoom in to search mapped installations',
'context.toastInstallationsRefreshed': 'Nearby installations refreshed',
'context.toastLayerUnavailable':
'That layer is unavailable in the current Context mode',
'context.actionStart': 'start',
'context.actionStop': 'stop',
'context.toastLayerLifecycleFailed': '{layerId} could not {action} cleanly',
'radio.toastLifecycleFailed': 'Radio could not {action} cleanly',
// CCTV sync chip captions + calibration/availability toasts.
'cctv.syncLoadingFrames': 'loading frames',
'cctv.syncGridReady': 'camera grid ready',
'cctv.toastCalibrationSaved': 'CCTV calibration saved',
'cctv.toastCalibrationReset': 'CCTV calibration reset',
'cctv.toastLayerUnavailable': 'CCTV layer unavailable',
// _renderMapStackState(): status chip fallback when no stack label resolves
// (stack names themselves are keep-English provider/stack ids).
'presets.mapStackFallback': 'MAP',
// ── Phase-3 runtime extraction batch 4: awareness / CCTV / Radio panels ───
// (radio.* and cctv.* state values that layers.js already seeds are reused
// cross-namespace; these are the runtime-only siblings and compositions.)
// _applyRuntimeStaticHeaderText(): the key-only standby description span
// (both mode descriptions in one span split by a literal <br> in phase 2).
'context.standbyContactsDesc': 'CONTACTS — nearest planes · vessels · sites',
'context.standbyMissionsDesc': 'SPACE MISSIONS — launches & orbital assets',
// _syncContextRadioLauncherState(): close-state sibling of the seeded
// context.radioToggleAriaLabel ('Open compact Radio controls').
'context.radioToggleCloseAriaLabel': 'Close compact Radio controls',
'context.toastMissionsCancelRestoreFailed':
'Space Missions cancellation could not restore the previous layer state',
// Cockpit utility disclosures: collapse-state siblings of the seeded
// utility.*ToggleAriaLabel expand keys.
'utility.displayToggleCollapseAriaLabel': 'Collapse Cockpit display options',
'utility.radioToggleCollapseAriaLabel': 'Collapse Cockpit Radio controls',
// Radio panel runtime states (state-sibling keys so no state can leak
// English later; lifecycle enum labels reuse layers.status.*).
'radio.stateSync': 'SYNC',
'radio.tunerCategoryBand': '{category} BAND',
'radio.tunerNoStations': 'NO STATIONS',
'radio.tunerStationAria': '{name}, station {index} of {total}',
'radio.tunerNoStationAria': 'No station available',
'radio.tunerOffAir': 'OFF AIR',
'radio.tunerStationUnavailable': 'STATION UNAVAILABLE',
'radio.actionPlay': 'Play',
'radio.actionPause': 'Pause',
'radio.actionResume': 'Resume',
'radio.targetSelected': 'selected',
'radio.targetNearest': 'nearest',
'radio.playStateAria': '{action} {target} radio station',
'radio.miniStateUncertain': 'RADIO STATE UNCERTAIN',
'radio.miniSyncingDirectory': 'SYNCING DIRECTORY',
'radio.stationSyncing': 'SYNCING',
'radio.stationFallback': 'station',
'radio.playbackReadyFallback': 'Ready',
// CCTV panel runtime states (layers.cctv.* seeded keys reused where they
// match; these are the runtime-only compositions and flipped states).
'cctv.coverageViewshedOn': 'VIEWSHED ON',
'cctv.frameLoading': 'FRAME · LOADING',
'cctv.frameUnavailable': 'FRAME · UNAVAILABLE',
'cctv.calChipEdited': 'CAL · EDITED (UNSAVED)',
'cctv.calChipTemplate': 'CAL · {badge}',
'cctv.calBadgeCalibrated': 'CALIBRATED',
'cctv.calBadgeCurated': 'CURATED',
'cctv.calBadgeRawPrior': 'RAW PRIOR',
'cctv.metaProjectionMonitor': 'MONITOR',
'cctv.metaProjectionOff': 'OFF',
'cctv.metaTemplate':
'{city} · HDG {heading} · FOV {fov} · RANGE {range}m · {projection}{calBadge} · {provider}{status}',
'cctv.metaCamerasClick': {
one: '{count} camera loaded · click a camera to activate',
other: '{count} cameras loaded · click a camera to activate',
},
'cctv.metaCamerasEnable': {
one: '{count} camera loaded · enable CCTV to activate',
other: '{count} cameras loaded · enable CCTV to activate',
},
'cctv.summaryNoneAvailable': 'No summary available.',
// ── Phase-3 runtime extraction batch 5: remainder + hud.js ────────────────
// _setCelestialRingEnabled(): unsupported-style title sibling of the seeded
// display.celestialToggleTitle.
'display.celestialUnavailableTitle':
'Celestial ring — available in Normal style',
// _updateDetectionButton(): density-profile labels (display.detectionLabel
// 'DETECT' was seeded on the static button) + composed aria.
'display.detectionAriaTemplate': 'Detection overlay: {mode}',
'display.detectionAriaOff': 'Detection overlay: off',
'display.detectionLabelSparse': 'SPARSE',
'display.detectionLabelBalanced': 'BALANCED',
'display.detectionLabelDense': 'DENSE',
// Globe-reset buttons: idle/working aria states (cockpit variant sibling).
'hud.resetGlobeAria': 'Reset to full globe view',
'hud.resetGlobeCockpitAria': 'Reset cockpit to full globe view',
'hud.resettingGlobeAria': 'Resetting to full globe view',
'hud.resettingGlobeCockpitAria': 'Resetting cockpit to full globe view',
// _initOrbit(): indicator caption after the orbit glyph.
'location.orbitLabel': 'ORBIT',
// Intel HUD (src/hud.js): summary caption, idle placeholder, REC indicator.
// Classification banners, terse instrument readout codes (MGRS/GSD/NIIRS/
// ALT/COLL/ONA/BAND/BITS/LVL), and the AI summary line stay keep-English.
'hud.summaryLabel': 'SUMMARY',
'hud.summaryAwaiting': 'Awaiting telemetry...',
'hud.recLabel': 'REC',
// Upstream a11y additions (post-merge follow-up): slider/toggle accessible names.
'display.featherAria': 'Scope edge feather',
'display.bloomAria': 'Bloom intensity',
'display.sharpenAria': 'Sharpen intensity',
'location.searchAria': 'Search location by name or coordinates',
'location.toggleAria': 'Expand LOCATION',
};
-517
View File
@@ -1,517 +0,0 @@
// English catalog — layers namespace (phase-1 seed).
//
// Owns data-layer presentation copy: display names, feed-state labels, and
// layer batch toasts. Machine-readable values (layer ids, status enum keys,
// provider names) are intentionally NOT here — see docs/TRANSLATORS.md
// for the keep-English boundary. Keys are namespace-relative; the registry
// prefixes them with `layers.`.
export const NAMESPACE = 'layers';
export default {
// src/data/manager.js FEED_STATE_LABELS value
'status.unavailable': 'UNAVAILABLE',
// src/data/flights.js / src/data/earthquakes.js layer display names
'name.liveFlights': 'Live Flights',
'name.earthquakes': 'Earthquakes (24h)',
// src/ui.js clearSelectedLayers() result toasts (genuine plural copy)
'clear.toast.noneSelected': 'No selected data layers',
'clear.toast.cleared': {
one: 'Cleared {count} data layer',
other: 'Cleared {count} data layers',
},
'clear.toast.notCleared': {
one: '{count} data layer could not be cleared',
other: '{count} data layers could not be cleared',
},
// ── Phase-2 static markup extraction (index.html), appended ──────────────
// The shell worker owns ALL index.html static markup in phase 2
// (docs/TRANSLATORS.md cross-surface rule); these keys cover the
// layers-worker surfaces (world overlay, CCTV panel, Radio panel) whose
// runtime presentation paths land here in phase 3.
// index.html #world-overlay-actions region (src/overlays/worldOverlay.js)
'overlay.regionAriaLabel': 'Visible map targets',
// index.html CCTV panel chrome. Button texts marked as states (toggleOff,
// coverageOff, autoHopOff, projectionOn) are the shipped initial values; the
// phase-3 layer worker adds the flipped-state siblings.
'cctv.panelTitle': 'CCTV',
'cctv.collapseTitle': 'Collapse panel',
'cctv.sourceUnknown': 'SOURCE · UNKNOWN',
'cctv.metaIdle': 'Enable CCTV to load camera intersections',
'cctv.toggleOff': 'CCTV OFF',
'cctv.nearest': 'NEAREST',
'cctv.prev': 'PREV',
'cctv.cameraAriaLabel': 'CCTV camera',
'cctv.next': 'NEXT',
'cctv.focus': 'FOCUS',
'cctv.coverageOff': 'COVERAGE OFF',
'cctv.autoHopOff': 'AUTO HOP OFF',
'cctv.projectionOn': 'PROJECTION ON',
'cctv.calibrationLabel': 'CALIBRATION',
'cctv.adjustLabel': 'ADJUST',
'cctv.adjustTitle':
'Drag the camera in the world: rings rotate, arrows move, handles set range/FOV',
'cctv.calPoseAriaLabel': 'Camera pose — click a value to type',
'cctv.calHeadingTitle': 'Heading (compass °) — click to type',
'cctv.calPitchTitle': 'Pitch (° up/down) — click to type',
'cctv.calFovTitle': 'Horizontal FOV (°) — click to type',
'cctv.calRangeTitle': 'Range / monitor-plane distance (m) — click to type',
'cctv.calHeightTitle': 'Mount height above ground (m) — click to type',
'cctv.calNorthTitle':
'North offset from catalog position (m) — click to type',
'cctv.calEastTitle': 'East offset from catalog position (m) — click to type',
'cctv.saveCal': 'SAVE CAL',
'cctv.resetCal': 'RESET CAL',
'cctv.summaryLabel': 'SCENE SUMMARY',
'cctv.summaryIdle':
'Enable CCTV to start camera-linked intelligence summaries.',
// index.html Radio panel chrome (right rail #radio-panel)
'radio.panelAriaLabel': 'Internet radio and local SDR',
'radio.panelTitle': 'RADIO',
'radio.expandTitle': 'Expand Radio',
'radio.expandAriaLabel': 'Expand Radio section',
'radio.enable': 'ENABLE',
'radio.stationTagLabel': 'STATION TAG',
'radio.filterAriaLabel': 'Filter stations by station tag',
'radio.filterAll': 'All',
'radio.noStation': 'NO STATION SELECTED',
'radio.stationHint': 'Enable Radio, then choose a globe marker or use next.',
// Key-only: the #radio-tuner-band-label span text is pinned verbatim by
// radioMarkup.test.mjs, so the attribute must be wired by a later phase.
'radio.bandLabel': 'DIRECTORY BAND',
'radio.dragToTune': 'DRAG TO TUNE',
'radio.tunerIdle': 'ALL · DRAG THE NEEDLE',
'radio.snapsNote': 'SNAPS TO AVAILABLE STATIONS',
'radio.transportAriaLabel': 'Radio playback',
'radio.prev': 'PREV',
'radio.prevAriaLabel': 'Previous filtered station',
'radio.play': 'PLAY',
'radio.playAriaLabel': 'Play selected station',
'radio.next': 'NEXT',
'radio.nextAriaLabel': 'Next filtered station',
'radio.stop': 'STOP',
'radio.stopAriaLabel': 'Stop radio playback',
'radio.volumeLabel': 'VOLUME',
'radio.volumeAriaLabel': 'Radio volume',
// Initial idle announcement; the runtime states land with the layers worker.
'radio.playbackOff': 'Radio off',
'radio.stationSite': 'STATION SITE',
'radio.privacyNote':
'Audio connects directly to the broadcaster after you press play. Your IP is visible to that broadcaster.',
// ── Phase-3 runtime extraction (src/data/*), appended ────────────────────
// Layer display names are translated only at the presentation boundary
// (manager.js _renderToggles/_syncToggleButton map layer.id → key here).
// layer.id values, FEED_STATE_LABELS enum KEYS, and lifecycle state keys
// stay English — see docs/TRANSLATORS.md keep-English boundary.
// src/data/manager.js FEED_STATE_LABELS values + toggle-button states.
'status.on': 'ON',
'status.loading': 'LOADING',
'status.degraded': 'DEGRADED',
'status.stale': 'STALE',
'status.fallback': 'FALLBACK',
'status.off': 'OFF',
'status.partial': 'PARTIAL',
'status.uncertain': 'UNCERTAIN',
'status.enabling': 'ENABLING',
'status.disabling': 'DISABLING',
// Layer display names (toggle panel rows + toggle-button aria-label).
'name.militaryFlights': 'Military Flights',
'name.satellites': 'Satellites',
'name.rocketLaunches': 'Space Missions (30d)',
'name.traffic': 'Street Traffic',
'name.cctv': 'CCTV',
'name.radio': 'Radio',
'name.bikeshare': 'Bikeshare',
'name.aisVessels': 'Live AIS Vessels',
'name.installations': 'Mapped Installations',
'name.globalContext': 'Global Context',
'name.datacenters': 'Datacenters',
'name.dams': 'Dams',
'name.submarineCables': 'Submarine Cables',
'name.fires': 'FIRMS Active Fires',
// src/data/manager.js data-panel row meta line (_buildMetaText) + time ago.
'meta.justNow': 'just now',
'meta.secondsAgo': '{count}s ago',
'meta.minutesAgo': '{count}m ago',
'meta.hoursAgo': '{count}h ago',
'meta.never': 'never',
'meta.dataSourceUnavailable': 'Data source unavailable',
'meta.loading': 'loading...',
'meta.uncertainLifecycle':
'UNCERTAIN · {source} · lifecycle state requires reconciliation',
'meta.transitioning': '{state} · {source}',
'meta.stateSourceRetry': '{state} · {source} · {detail} · retry {seconds}s',
'meta.stateSourceDetail': '{state} · {source} · {detail}',
'meta.stateSourceAgo': '{state} · {source} · {ago}',
'meta.stateSourceAgoRetry':
'{state} · {source} · {ago} · retrying in {seconds}s',
'meta.sourceLoading': '{source} · {loadingLabel}',
'meta.sourceAgo': '{source} · {ago}',
'meta.partialCounts': '{accepted} of {raw} records accepted',
'meta.partialIncomplete': 'incomplete snapshot',
'meta.partialDetail': '{state} · {source} · {detail} · {ago}',
'meta.toggleAriaLabel': '{name}: {state}',
// src/data/militaryFlights.js tracked readout fallback captions.
'readout.typeUnknown': 'Type unknown',
'readout.regUnknown': 'Reg unknown',
'readout.operatorUnknown': 'Operator unknown',
'readout.altUnknown': 'Alt unknown',
// src/data/vesselLabels.js AIS type names (display only — the styling
// matcher keeps the English tokens as machine values).
'vessel.type.fishing': 'FISHING',
'vessel.type.towing': 'TOWING',
'vessel.type.dredger': 'DREDGER',
'vessel.type.diveOps': 'DIVE OPS',
'vessel.type.military': 'MILITARY',
'vessel.type.sailing': 'SAILING',
'vessel.type.pleasure': 'PLEASURE',
'vessel.type.pilot': 'PILOT',
'vessel.type.sar': 'SAR',
'vessel.type.tug': 'TUG',
'vessel.type.portTender': 'PORT TENDER',
'vessel.type.antiPollution': 'ANTI-POLLUTION',
'vessel.type.lawEnforce': 'LAW ENFORCE',
'vessel.type.medical': 'MEDICAL',
'vessel.type.highSpeed': 'HIGH-SPEED',
'vessel.type.passenger': 'PASSENGER',
'vessel.type.cargo': 'CARGO',
'vessel.type.tanker': 'TANKER',
'vessel.type.other': 'OTHER',
// src/data/aisLiveVessels.js vessel cards + selected-vessel HUD.
'vessel.fallback': 'VESSEL',
'vessel.posLive': 'POS: LIVE',
'vessel.posAt': 'POS: {time}Z',
'vessel.hudIdle': 'AIS: --',
'vessel.hudName': 'AIS: {name}',
'vessel.hudTypeLine': '{type} SPD: {speed} HDG: {heading}',
'vessel.awaitingFirstPosition': 'awaiting first AIS position…',
// index.html CCTV panel flipped-state siblings (runtime writers live in
// src/ui.js, owned by core-ui — these keys are the layers-surface half of
// the cross-surface rule in docs/TRANSLATORS.md).
'cctv.toggleOn': 'CCTV ON',
'cctv.coverageOn': 'COVERAGE ON',
'cctv.autoHopOn': 'AUTO HOP ON',
'cctv.projectionOff': 'PROJECTION OFF',
'cctv.adjustOn': 'ADJUST ON',
// src/data/cctv.js buildSummaryText() — the SCENE SUMMARY line.
'cctv.summary.standingBy':
'{count} CAMERAS STANDING BY · NO CAMERA SELECTED · CLICK A CAMERA TO ACTIVATE',
'cctv.summary.empty': 'No cameras available in catalog.',
'cctv.summary.city': '{city} CCTV',
'cctv.summary.hdg': 'HDG {value}°',
'cctv.summary.hdgEstimated': 'HDG {value}° (ESTIMATED)',
'cctv.summary.fov': 'FOV {value}°',
'cctv.summary.coverage': 'COVERAGE {value}km²',
'cctv.summary.overlap': 'OVERLAP {count} cams',
'cctv.summary.isolated': 'ISOLATED VIEW',
'cctv.summary.projMonitor': 'PROJ MONITOR',
'cctv.summary.projOff': 'PROJ OFF',
'cctv.summary.viewshed': 'VIEWSHED',
'cctv.summary.cal': 'CAL {value}',
'cctv.summary.src': 'SRC {value}',
'cctv.summary.context': '{value} CONTEXT',
// src/data/radio.js station-tag categories, genre labels, cluster badges.
'radio.category.news': 'News',
'radio.category.talk': 'Talk',
'radio.category.weather': 'Weather / Emergency',
'radio.category.publicSafety': 'Public Safety',
'radio.category.aviationMarine': 'Aviation / Marine',
'radio.category.trafficTransit': 'Traffic / Transit',
'radio.category.music': 'Music',
'radio.category.other': 'Other',
'radio.genre.alternative': 'Alternative',
'radio.genre.ambient': 'Ambient',
'radio.genre.blues': 'Blues',
'radio.genre.classical': 'Classical',
'radio.genre.country': 'Country',
'radio.genre.dance': 'Dance',
'radio.genre.electronic': 'Electronic',
'radio.genre.folk': 'Folk',
'radio.genre.funk': 'Funk',
'radio.genre.hipHop': 'Hip-Hop',
'radio.genre.house': 'House',
'radio.genre.indie': 'Indie',
'radio.genre.jazz': 'Jazz',
'radio.genre.latin': 'Latin',
'radio.genre.metal': 'Metal',
'radio.genre.oldies': 'Oldies',
'radio.genre.pop': 'Pop',
'radio.genre.punk': 'Punk',
'radio.genre.rAndB': 'R&B',
'radio.genre.reggae': 'Reggae',
'radio.genre.rock': 'Rock',
'radio.genre.soul': 'Soul',
'radio.genre.techno': 'Techno',
'radio.genre.trance': 'Trance',
'radio.genre.world': 'World',
'radio.cluster.news': 'NEWS',
'radio.cluster.talk': 'TALK',
'radio.cluster.weather': 'WEATHER',
'radio.cluster.publicSafety': 'SAFETY',
'radio.cluster.aviationMarine': 'AIR / SEA',
'radio.cluster.trafficTransit': 'TRANSIT',
'radio.cluster.music': 'MUSIC',
'radio.cluster.other': 'OTHER',
// Radio right-rail panel runtime states (seeded here per the ownership
// contract; src/ui.js wires the writes — core-ui). English values mirror
// the literals ui.js writes today so wiring is byte-identical under 'en'.
'radio.noStationAvailable': 'NO STATION AVAILABLE',
'radio.disable': 'DISABLE',
'radio.reconcile': 'RECONCILE',
'radio.enableAria': 'Enable Radio',
'radio.disableAria': 'Disable Radio',
'radio.reconcileAria': 'Reconcile Radio — lifecycle uncertain',
'radio.meta.loading': 'Loading station directory…',
'radio.meta.metadataOnly': 'Directory metadata only',
'radio.meta.chooseHint': 'Choose a globe marker or use next.',
'radio.tags': 'TAGS · {tags}',
'radio.state.ready': 'Ready — playback starts only from your action',
'radio.state.loading': 'Connecting directly to broadcaster…',
'radio.state.buffering': 'Buffering broadcaster stream…',
'radio.state.playing': 'Playing {station}',
'radio.state.paused': 'Paused {station}',
'radio.state.error': 'Broadcaster stream unavailable',
'radio.state.degradedDirectory': ' · degraded directory',
'radio.state.staleDirectory': ' · stale directory',
'radio.state.staleDegradedDirectory': ' · stale/degraded directory',
'radio.state.outsideFilter': ' · outside current filter',
'radio.state.voiceMuted': ' · muted during voice interaction',
'radio.state.voiceRestoring': ' · restoring volume after voice',
'radio.state.staticNoAudio': ' · static indicates no broadcaster audio',
'radio.state.tuningStatic': ' · tuning static until broadcaster starts',
'radio.state.stationUnavailable':
'Station unavailable after directory refresh — choose another channel',
'radio.state.enabling': 'Radio is enabling…',
'radio.state.disabling': 'Radio is disabling…',
'radio.state.uncertain':
'Radio lifecycle is uncertain — use Enable or Disable to reconcile',
// src/data/rocketLaunches.js space-mission surface (runtime-built panel,
// roster, replay overlay, and map cards).
'missions.launchSite': 'LAUNCH SITE',
'missions.launchSiteValue': 'LAUNCH SITE · {site}',
'missions.panel.selectedHeader': 'SELECTED SPACE MISSION',
'missions.panel.showAllTitle': 'Show all missions',
'missions.panel.deselectAria': 'Deselect mission',
'missions.panel.mission': 'MISSION',
'missions.panel.status': 'STATUS · ',
'missions.panel.launchSite': 'LAUNCH SITE · ',
'missions.panel.launchTime': 'LAUNCH TIME · ',
'missions.panel.orbit': 'ORBIT · ',
'missions.panel.ascentPath': 'ASCENT PATH · ',
'missions.panel.distance': 'CURRENT DISTANCE FROM EARTH · ',
'missions.panel.speed': 'SATELLITE SPEED · ',
'missions.panel.payload': 'PAYLOAD',
'missions.panel.colName': 'NAME',
'missions.panel.colType': 'TYPE',
'missions.panel.colDestination': 'DESTINATION',
'missions.panel.stagesSection': 'STAGE / RE-ENTRY / RECOVERY',
'missions.panel.colStage': 'STAGE',
'missions.panel.colStatus': 'STATUS',
'missions.panel.colFinalPosition': 'FINAL POSITION',
'missions.panel.focus': 'FOCUS',
'missions.panel.prev': 'PREV',
'missions.panel.next': 'NEXT',
'missions.panel.prevTitle': 'Previous mission',
'missions.panel.nextTitle': 'Next mission',
'missions.panel.showAll': 'SHOW ALL / DESELECT',
'missions.roster.empty': 'NO MISSIONS AVAILABLE IN THE CURRENT 30-DAY WINDOW',
'missions.roster.count': '{count} / 30D',
'missions.roster.dateUnavailable': 'DATE UNAVAILABLE',
'missions.roster.unspecifiedOperator': 'UNSPECIFIED OPERATOR',
'missions.roster.selectAria': 'Select {mission}',
'missions.rows.additionalPayloads': '+{count} additional payload records',
'missions.rows.classified': 'PAYLOAD DATA UNAVAILABLE',
'missions.rows.noStageData': 'NO STAGE RE-ENTRY / RECOVERY DATA',
'missions.rows.unspecified': 'UNSPECIFIED',
'missions.rows.unavailable': 'UNAVAILABLE',
'missions.rows.flightNumber': 'FLIGHT {count}',
'missions.rows.reused': 'REUSED',
'missions.rows.positionUnavailable': 'POSITION UNAVAILABLE',
'missions.rows.kmDownrange': '{value} KM DOWNRANGE',
'missions.rows.plannedPrefix': 'PLANNED · ',
'missions.rows.suppliedTrajectory': 'SUPPLIED TRAJECTORY POINTS',
'missions.rows.reconstructedEstimate': 'RECONSTRUCTED ESTIMATE',
'missions.telemetry.km': '{value} KM',
'missions.telemetry.kmPerSecond': '{value} KM/S',
'missions.replay.start': 'REPLAY ASCENT',
'missions.replay.startTitle':
'Replay the estimated ascent with a following camera',
'missions.replay.pause': 'Pause replay',
'missions.replay.resume': 'Resume replay',
'missions.replay.cancel': 'Cancel replay',
'missions.replay.speedLabel': 'REPLAY SPEED',
'missions.replay.speedAria': 'Replay speed multiplier',
'missions.replay.countdown': 'T−{time} · {mission}',
'missions.replay.standbyDetail': 'LAUNCH STANDBY',
'missions.replay.liftoff': 'LIFTOFF · {mission}',
'missions.replay.ascentReplay': 'ASCENT REPLAY · {mission}',
'missions.replay.ascentEstimate': 'ASCENT ESTIMATE · {mission}',
'missions.replay.recovery': 'STAGE RE-ENTRY / RECOVERY · {mission}',
'missions.replay.orbit': 'ORBIT REPLAY · {mission}',
'missions.replay.pausedPrefix': 'PAUSED · {title}',
'missions.replay.phaseCountdown': 'T minus {seconds}',
'missions.replay.phasePreparing': 'Preparing launch site',
'missions.replay.phaseLiftoff': 'Liftoff',
'missions.replay.phaseAscent': 'Ascent replay',
'missions.replay.phaseOrbit': 'Orbit replay',
'missions.replay.pausedSuffix': ', paused',
// src/data/satellites.js dense-shell chip + src/data/satelliteClass.js
// class labels and legend blurbs.
'satellites.denseChip': 'DENSE',
'satellites.denseChipLoading': 'DENSE ···',
'satellites.denseChipFailed': 'DENSE ✕',
'satellites.denseTitleAdd':
'Add the full Starlink broadband shell (thousands of extra points)',
'satellites.denseTitleLoading': 'Loading the Starlink shell…',
'satellites.denseTitleFailed': 'Starlink {detail} — click to retry',
'satellites.loadFailed': 'load failed',
'satellites.denseTitleActive':
'Showing the full Starlink shell — click for the core catalog only',
'satellites.class.station': 'STATION',
'satellites.class.stationBlurb':
'Crewed stations and their visiting vehicles',
'satellites.class.nav': 'NAV',
'satellites.class.navBlurb': 'GNSS navigation — GPS, GLONASS, Galileo',
'satellites.class.geo': 'GEO',
'satellites.class.geoBlurb':
'Geostationary belt — comms and weather, fixed over the equator',
'satellites.class.visual': 'VISUAL',
'satellites.class.visualBlurb':
'Brightest naked-eye objects — CelesTrak visual group',
'satellites.class.comms': 'COMMS',
'satellites.class.commsBlurb':
'Broadband constellation shell — shown only in DENSE mode',
// src/data/firmsHeatmap.js stats labels + fire/cell cards.
'meta.refreshing': 'refreshing...',
'firms.keyRequired': 'KEY REQUIRED',
'firms.staleCached': 'STALE · cached {age}',
'firms.liveUpdated': 'LIVE · updated {age}',
'firms.underMinuteAgo': '<1m ago',
'firms.card.fire': 'FIRE · {frp} MW',
'firms.card.ambient': '▲ {frp} MW',
'firms.card.fireNoun': 'FIRE',
'firms.card.firesNoun': 'FIRES',
'firms.card.confSuffix': '{value} conf',
'firms.card.ageSuffix': '{value} ago',
'firms.card.maxFrp': 'max {value} MW',
'firms.card.newAge': 'new {value}',
'firms.card.night': 'NIGHT',
'firms.card.sensorUnavailable': 'sensor n/a',
'firms.card.focusAria': 'Focus fire detection {title}, {details}',
// src/data/traffic.js feed presentation (manager meta loadingLabel values).
'traffic.loadingSyncing':
'Syncing flow · Roads: OpenStreetMap · Flow: TomTom · Unmatched: simulated',
'traffic.liveCoverage':
'LIVE · Roads: OpenStreetMap · Flow: TomTom · {percent}% cov',
'traffic.liveCoverageUnmatched':
'LIVE · Roads: OpenStreetMap · Flow: TomTom · {percent}% cov · Unmatched: simulated',
'traffic.simulatedNoMatches':
'SIMULATED · Roads: OpenStreetMap · Flow: TomTom (no matches)',
'traffic.syncingRoads': 'Syncing flow · Roads: {source}',
'traffic.liveRoadsFlowHidden':
'LIVE · Roads: {source} · Roads without flow hidden',
'traffic.liveRoadsNoFlowInView':
'LIVE · Roads: {source} · No flow roads in view',
'traffic.roadsFlowLive': 'LIVE · Roads: {source} · Flow {percent}%',
'traffic.roadsFlowSimulated': 'SIMULATED · Roads: {source} · Flow {percent}%',
'traffic.simUnavailable': 'SIMULATED — traffic service unreachable',
'traffic.simKeyless': 'SIMULATED — add TomTom key for live',
// src/data/bikeshare.js loading labels + selected-station card.
'bike.loadingSyncing': 'syncing {count} city feeds...',
'bike.loadingScanning': 'scanning nearby systems...',
'bike.card.capacity': '🚲 {bikes} avail · {docks} docks · {capacity} cap',
'bike.warning.notInstalled': '⚠️ Not installed',
'bike.warning.notRenting': '⚠️ Not renting',
'bike.warning.notReturning': '⚠️ Not returning',
'bike.stationFallback': 'Station',
'bike.stationWithId': 'Station {id}',
// src/data/militaryInstallations.js + installationFeedback.js.
'installations.fallbackTitle': 'MAPPED INSTALLATION',
'installations.loading': 'loading mapped installation context',
'installations.feedback.reason.rateLimited': 'Overpass rate-limited',
'installations.feedback.reason.timeout': 'Overpass timed out',
'installations.feedback.reason.queryFailed':
'Overpass could not complete the query',
'installations.feedback.reason.unavailable':
'Overpass temporarily unavailable',
'installations.feedback.retrying': 'Retrying mapped sites…',
'installations.feedback.fetching': 'Fetching mapped sites…',
'installations.feedback.retryIn': '{reason} — retrying in {seconds}s',
'installations.feedback.retryPending': '{reason} — retry pending',
'installations.feedback.zoomIn': 'Zoom in to search mapped installations',
'installations.feedback.cached': 'Showing cached mapped sites',
'installations.feedback.notLoaded': 'Mapped sites not loaded',
'installations.feedback.loaded': 'Mapped sites loaded',
// src/data/militaryAwareness.js panel + militaryAwarenessEngine.js reasons.
'awareness.standbyReady': 'CONTEXT READY',
'awareness.standbyOff': 'GLOBAL CONTEXT OFF',
'awareness.standbySelect': 'SELECT A FLIGHT, VESSEL, OR MAPPED INSTALLATION',
'awareness.standbyEnable': 'ENABLE TO LOAD OBSERVED / MAPPED PROXIMITY',
'awareness.controlsAria': 'Global Context navigation',
'awareness.previous': 'PREVIOUS',
'awareness.focus': 'FOCUS',
'awareness.next': 'NEXT',
'awareness.previousTitle':
'Previous — prior visited contact in the 250 km window',
'awareness.nextTitle':
'Next — nearest unvisited contact in the 250 km window',
'awareness.note':
'Open-source mapped/observed context. Missing broadcasts, unloaded map areas, or unmapped sites are not evidence of absence.',
'awareness.unavailableAria': 'Unavailable',
'awareness.focusAria': 'Focus {label}',
'awareness.cohort.flights': 'Flights',
'awareness.cohort.military': 'Military flights',
'awareness.cohort.vessels': 'AIS vessels',
'awareness.cohort.installations': 'Mapped installations',
'awareness.coverage.viewport': 'CURRENT VIEWPORT ONLY',
'awareness.coverage.within': 'WITHIN {km} KM',
'awareness.hdg': 'HDG {value}°',
'awareness.brg': 'BRG {value}°',
'awareness.brgUnknown': 'BRG —',
'awareness.crs': 'CRS {value}°',
'awareness.reason.feedUnavailable': 'feed unavailable',
'awareness.reason.feedStale': 'feed stale',
'awareness.reason.nearby': 'observed or mapped nearby context',
'awareness.reason.none': 'no observed or mapped objects in current feeds',
// src/data/regionalBrief.js WMO weather-code labels (cockpit copy).
'weather.conditionsUnknown': 'CONDITIONS UNKNOWN',
'weather.clear': 'CLEAR',
'weather.partlyCloudy': 'PARTLY CLOUDY',
'weather.overcast': 'OVERCAST',
'weather.fog': 'FOG',
'weather.drizzle': 'DRIZZLE',
'weather.rain': 'RAIN',
'weather.snow': 'SNOW',
'weather.rainShowers': 'RAIN SHOWERS',
'weather.snowShowers': 'SNOW SHOWERS',
'weather.thunderstorm': 'THUNDERSTORM',
'weather.mixed': 'MIXED CONDITIONS',
'missions.roster.keyboardHint': 'TAB PREVIEWS · ENTER / SPACE SELECTS',
'vessel.awaitingPositions': 'awaiting usable AIS positions…',
'vessel.awaitingFirstMessage': 'awaiting first AIS message…',
'missions.estDownrange': 'EST. DOWNRANGE',
};
-213
View File
@@ -1,213 +0,0 @@
// English catalog — setup namespace (phase-1 seed).
//
// Owns first-launch onboarding, in-app key setup (Provider Settings), scene
// recipes, and voice-control chrome. Keys are namespace-relative; the registry
// prefixes them with `setup.`.
export const NAMESPACE = 'setup';
export default {
// index.html #first-run-launcher header/title/choices
'firstRun.kicker': 'MISSION CONTROL · FIRST LAUNCH',
'firstRun.title': 'Choose your first view',
'firstRun.choice.contacts': 'LIVE CONTACTS',
'firstRun.suppress': "Don't show this again",
// index.html #key-setup-chip / #key-setup dialog
'keySetup.chip': 'POWER UP',
'keySetup.kicker': 'GROUND STATION · PROVIDER SETTINGS',
'keySetup.title': 'Power up the globe',
'keySetup.apply': 'SAVE KEYS',
// src/keySetup.js submitUpdates() status announcement
'keySetup.status.saving': 'Saving…',
// ── Phase-2 static markup extraction (index.html), appended ──────────────
// The shell worker owns ALL index.html static markup in phase 2
// (docs/TRANSLATORS.md cross-surface rule); these keys cover the
// support-worker surfaces (first-run, key setup, scene director) whose
// runtime paths land here in phase 3.
// index.html #first-run-launcher
// Owner-authored persuasive line, pinned verbatim by firstRunExperience.test.mjs
// (unspaced em dash included) — keep the exact string when translating.
'firstRun.description':
'It feels like a forbidden cockpit—then you realize the sources are public and the data is real.',
'firstRun.choice.contactsSub': 'Aircraft, vessels and nearby intelligence',
'firstRun.choice.spaceMissions': 'SPACE MISSIONS',
'firstRun.choice.spaceMissionsSub':
'Launches, spacecraft and orbital context',
'firstRun.choice.explore': 'EXPLORE MANUALLY',
'firstRun.choice.exploreSub': 'Begin with a clean globe',
'firstRun.dismissHint': 'ESC to dismiss',
// Initial status tip; firstRunExperience.js swaps it for progress/errors.
'firstRun.note':
'Tip: the GEV MIC button in the dock lets you talk to the map.',
// NOT seeded: the environmental tile's <strong>/<small> are pinned verbatim
// by firstRunExperience.test.mjs (and the title is painted from
// ENVIRONMENTAL_LABEL_CHOICE at init) — the support worker wires them in
// phase 3 together with the test update.
// index.html #key-setup
'keySetup.closeAriaLabel': 'Close key setup',
'keySetup.description':
"The globe already flies keyless. Every key below switches on another real feed — paste one and it's saved into this app's local configuration, then the server restarts itself. Server-side keys stay on this machine; Google Maps and Cesium ion run in the browser and must be provider-restricted. Keys you configured elsewhere are shown but never touched.",
'keySetup.hint': 'ESC to close',
'keySetup.note':
'The Google Maps key buys the photorealistic planet — everything else stacks on top.',
// index.html scene director panel chrome (src/scenes/director.js surface)
'scenes.panelTitle': 'SCENES',
'scenes.collapseTitle': 'Collapse panel',
'scenes.recipeAriaLabel': 'Scene recipe',
'scenes.new': 'NEW',
'scenes.delete': 'DEL',
'scenes.capture': 'CAPTURE SHOT',
'scenes.updateShot': 'UPDATE SHOT',
'scenes.start': 'START',
'scenes.stop': 'STOP',
'scenes.next': 'NEXT',
'scenes.exportPresets': 'EXPORT PRESETS',
'scenes.import': 'IMPORT',
'scenes.runLog': 'RUN LOG',
'scenes.statusReady': 'Ready',
// ── Phase-3 runtime extraction (support surfaces), appended ───────────────
// src/firstRunExperience.js — mission busy lines and status/error copy.
// {detail} is the failed layer-id list (machine values, kept raw).
'firstRun.busy.contacts': 'Starting live contacts…',
'firstRun.busy.spaceMissions': 'Opening space missions…',
'firstRun.busy.environmental': 'Scanning active events…',
'firstRun.busy.working': 'Working…',
'firstRun.status.failed':
'Could not open that mission{detail}. Retry or explore manually.',
'firstRun.status.storageBlocked':
'This browser is blocking storage, so that could not be saved.',
// The environmental tile is painted at init from ENVIRONMENTAL_LABEL_CHOICE;
// the subcopy names BOTH feeds (pinned verbatim by firstRunExperience.test.mjs).
'firstRun.choice.environmentalSub':
'Live earthquakes and active fires, from USGS and NASA',
'firstRun.environmentalTitle.environmental': 'ENVIRONMENTAL',
'firstRun.environmentalTitle.earthWatch': 'EARTH WATCH',
'firstRun.environmentalTitle.activeEvents': 'ACTIVE EVENTS',
// src/keySetup.js — chip counter, status line, and remove confirm.
'keySetup.chipWaiting': {
one: 'POWER UP · {count} KEY WAITING',
other: 'POWER UP · {count} KEYS WAITING',
},
'keySetup.chipReady': 'POWERED UP',
'keySetup.status.saveFailed': 'Save failed ({status}).',
'keySetup.status.saveFailedDetail': 'Save failed: {detail}',
'keySetup.status.pasteFirst': 'Paste at least one key first.',
'keySetup.status.saved':
'Saved to {store}. Restarting — this page reloads itself.',
'keySetup.status.removed':
'Removed from {store}. Restarting — this page reloads itself.',
'keySetup.store.pinokio': 'your app configuration',
'keySetup.store.env': 'your local .env',
'keySetup.confirm.remove': 'Remove this key from your saved configuration?',
// src/mapStackChips.js — unavailable-chip tooltip and aria templates.
'mapStack.fallbackName': 'This map stack',
'mapStack.unavailableReason': '{label} is unavailable',
'mapStack.unavailableAriaLabel': '{label} unavailable: {hint}',
// src/scenes/director.js — built-in recipe DISPLAY names only. Recipe ids
// and the URL 'scene' param stay English; stored/renamed project titles are
// user data and render verbatim.
'scenes.recipe.flightsRadar': 'Global Flights Radar',
'scenes.recipe.orbitalWatch': 'Orbital Watch',
'scenes.recipe.thermalThreats': 'Thermal Threat Board',
'scenes.recipe.cityOverload': 'City Overload',
'scenes.recipe.omnisciencePullback': 'Omniscience Pullback',
// src/voice/gevRealtime.js — mic chrome and connection/execution STATUS
// text. Status enum keys (idle/connecting/…) are machine values; tool
// names/schemas and model-facing results stay English (keep-English
// boundary). Tier badges STD/MINI and the MIC/ON-OFF mic label stay machine
// identifiers this phase.
'voice.status.idle': 'OFF',
'voice.status.connecting': 'CONNECTING',
'voice.status.listening': 'LISTENING',
'voice.status.executing': 'EXECUTING',
'voice.status.error': 'ERROR',
'voice.status.sessionCostCap': 'Session ended — cost cap {cost}',
'voice.detail.standby': 'VOICE STANDBY',
'voice.detail.active': 'VOICE ACTIVE',
'voice.detail.unavailable': 'VOICE UNAVAILABLE',
'voice.detail.microphoneUnavailable': 'WebRTC microphone support unavailable',
'voice.detail.requestingMicrophone': 'Requesting microphone',
'voice.detail.holdSpaceTalk': 'Hold Space to talk',
'voice.detail.releaseSpaceSend': 'Release Space to send',
'voice.detail.askOrCommand': 'Ask or command',
'voice.detail.voiceOff': 'Voice off',
'voice.detail.runningCommand': 'Running command',
'voice.detail.radioDidNotStart': 'Radio did not start',
'voice.hint.default':
'Hold Space to speak · tap Space to activate focused controls',
'voice.error.sessionStart': 'Voice session could not be started.',
'voice.error.trayTitle': 'VOICE SYSTEM ERROR',
'voice.error.dismiss': 'DISMISS',
'voice.error.hint':
'Check microphone permission and network access, then try again.',
'voice.kicker.agent': 'AI AGENT',
'voice.kicker.control': 'VOICE CONTROL',
'voice.tier.appliesNextSession': '{tier} applies next session',
'voice.tier.buttonTitle': 'Voice model tier — applies next session',
'voice.cost.buttonTitle': 'Estimated session cost',
'voice.button.ariaLabel':
'Voice control — activate to toggle voice; hold Space to speak',
// ── Stage-4 repair pass: src/scenes/director.js status corpus, appended ───
// Status/confirm lines and the default shot title. {scene}/{shot} carry
// stored project titles (user data, rendered verbatim); {mode} is the raw
// context-mode identifier (machine value, keep-English boundary).
'scenes.status.captureCameraNotReady':
'Cannot capture shot: camera not ready',
'scenes.status.shotTitleDefault': 'Shot {n}',
'scenes.status.captured': 'Captured: {scene} / {shot}',
'scenes.status.selectShotFirst': 'Select a shot first',
'scenes.status.updated': 'Updated: {scene} / {shot}',
'scenes.status.deleteShotConfirm': 'Delete shot "{shot}"?',
'scenes.status.loaded': 'Loaded: {scene} / {shot}',
'scenes.status.cameraUnavailable': 'Camera unavailable — exit cockpit first',
'scenes.status.noShotsToRun': 'No shots to run',
'scenes.status.runningShot': 'Running {index}/{total}: {scene} / {shot}',
'scenes.status.runComplete': 'Scene run complete',
'scenes.status.runError': 'Error: {message}',
'scenes.status.contextExitFailed':
'Could not exit {mode} — scene layers may be refused',
// ── Stage-4 repair pass: keySetup dev-surface copy, appended ──────────────
// src/keySetup.js buildRow() remove chrome (dev-server-only surface).
'keySetup.row.remove': 'REMOVE',
'keySetup.row.removeTitle': "Remove {title} from this app's saved keys",
// src/keySetupCore.mjs keySetupRequirement(): availability sentence naming
// the registry env vars (machine values stay raw).
'keySetup.requirement': 'Needs {envVars} — add it in Provider Settings',
// src/keySetupCore.mjs KEY_SETUP_KEYS `unlocks` copy, keyed by registry id;
// en values must stay byte-identical to the registry strings.
'keySetup.unlocks.google-maps': 'The photorealistic 3D planet + place search',
'keySetup.unlocks.google-maps-server':
'Places context + Street View fallback; optional separate key',
'keySetup.unlocks.openai': 'Voice control — API key or ChatGPT OAuth',
'keySetup.unlocks.aisstream': 'Live ships, worldwide',
'keySetup.unlocks.firms': 'Live active-fire detections',
'keySetup.unlocks.tomtom': 'Real live traffic (keyless runs a simulation)',
'keySetup.unlocks.cesium-ion': 'Bing imagery map stacks + world terrain',
'keySetup.unlocks.opensky':
'More flight-polling credits (anonymous works without)',
'keySetup.unlocks.launch-library': 'Higher space-missions request allowance',
'keySetup.unlocks.mapillary':
'Street-level imagery and coverage in the Street Level layer. Free: register an app in the Mapillary developer dashboard and paste its Client Token',
'scenes.status.actionFailed': 'Scene action failed',
'scenes.status.projectExported': 'Project exported',
'voice.tierNextSession':
'Next session: {pendingId} — this session stays on {modelId}',
'voice.tierSwitchHint':
'Voice model: {pendingId} — click to switch to {target}; applies next session',
'voice.costTooltip':
'Estimated session cost on {modelId} — {responses} response(s). Warns at {warn}, ends the session at {cap}.',
};
-82
View File
@@ -1,82 +0,0 @@
// English catalog — shell namespace (phase-1 seed).
//
// Owns the global application chrome: title bar, loader status, top-center
// actions, panel titles, and the shared global status surface. Keys are
// namespace-relative; the registry in src/i18n/index.js prefixes them with
// `shell.`. Values are plain strings or { one, other } plural variant objects
// with named {placeholder} interpolation.
export const NAMESPACE = 'shell';
export default {
// index.html #title-bar .subtitle
'title.subtitle': 'NO PLACE LEFT BEHIND',
// index.html .loader-status (initial paint)
'loading.initialStatus': 'Initializing photorealistic world...',
// src/main.js init() loaderStatus writes
'loading.status.configuring': 'Configuring viewer...',
'loading.status.tilesUnavailable':
'Google 3D Tiles unavailable ({detail}). Loading the keyless globe...',
'loading.status.flying': 'Flying to Austin, TX...',
'loading.status.restoring': 'Restoring shared view...',
// index.html #global-loading-label (initial) and
// src/loadingFeedback.js presentLoadingFeedback() labels
'status.loadingLiveData': 'LOADING LIVE DATA',
'status.loadComplete': 'LOAD COMPLETE',
'status.loadFailed': 'LOAD FAILED',
'status.loadCancelled': 'LOAD CANCELLED',
// index.html #traffic-sync-label (initial) and
// src/loadingFeedback.js reduceTrafficSyncFeedback() neutral fallback
'status.trafficSyncing': 'syncing road network',
'status.retryingIn': 'retrying in {seconds}s',
'status.retryPending': 'retry pending',
// index.html #top-center-actions buttons
'actions.clearLayers.ariaLabel': 'Clear selected data layers',
'actions.clearLayers.title': 'Turn off all selected data layers',
'actions.share.ariaLabel': 'Copy share link',
'actions.resetView.ariaLabel': 'Reset to full globe view',
// index.html #data-toggles panel header
'panels.dataLayers': 'DATA LAYERS',
// index.html .panel-collapse-btn on #data-panel
'panels.collapseTitle': 'Collapse panel',
// ── Phase-2 static markup extraction (index.html), appended ──────────────
// index.html #command-dock nav region
'dock.ariaLabel': 'Navigation, voice, and visual preset controls',
// index.html #top-center-actions nav
'actions.navAriaLabel': 'Globe actions',
'actions.share.title': 'Copy share link',
'actions.resetView.title': 'Reset camera and return to full globe view',
// index.html #cctv-sync-label (initial); src/ui.js setSplitFlapText() fallback
'status.framesLoading': 'loading frames',
// Locale selector (index.html #control-panel tray): the group container is
// static; its buttons are runtime-rendered by ui.js _initLocaleSelector()
// from the configured locale pair (keys at the end of this file).
'locale.groupAriaLabel': 'Language',
// ── Phase-3 runtime extraction (support worker), appended ─────────────────
// src/main.js init() loaderStatus write sites without a phase-1/2 key.
'loading.status.tilesGoogle': 'Loading Google 3D Tiles...',
'loading.status.tilesKeyless': 'Loading the keyless globe...',
'loading.status.systems': 'Initializing systems...',
// src/loadingFeedback.js presentLoadingFeedback() labels beyond the phase-1
// seeds. 'OpenStreetMap · Overpass' detail strings are provider names and
// stay verbatim at the call site.
'status.liveDataOff': 'LIVE DATA OFF',
'status.mappedSitesLoaded': 'MAPPED SITES LOADED',
'status.retryingMappedSites': 'RETRYING MAPPED SITES',
'status.fetchingMappedSites': 'FETCHING MAPPED SITES',
'status.turningOffLiveData': 'TURNING OFF LIVE DATA',
'status.refreshingLiveData': 'REFRESHING LIVE DATA',
// ── Configurable locale pair (GEV_DEFAULT_LOCALE / GEV_SECONDARY_LOCALE,
// vite.config.js client defines), appended ────────────────────────────
// ui.js _initLocaleSelector() renders one runtime button per offered
// locale and reads shell.locale.<code>.ariaLabel for its aria-label.
// Only SHIPPED locales get a key: each locale PR appends its label to every
// shipped catalog (docs/TRANSLATORS.md), so an unshipped locale can never
// render a selector button.
'locale.en.ariaLabel': 'Switch to English',
'credits.closeAria': 'Close data attribution',
};
+870
View File
@@ -0,0 +1,870 @@
{
"Flying to Austin, TX...": "Перелёт в Остин, Техас...",
"Restoring shared view...": "Восстановление общего вида...",
"Initializing systems...": "Инициализация систем...",
"Configuring viewer...": "Настройка просмотрщика...",
"Loading Google 3D Tiles...": "Загрузка Google 3D Tiles...",
"Loading the keyless globe...": "Загрузка глобуса без ключа...",
"Google 3D Tiles unavailable ({detail}). Loading the keyless globe...": "Google 3D Tiles недоступны ({detail}). Загрузка глобуса без ключа...",
"Close data attribution": "Закрыть атрибуцию данных",
"observed or mapped nearby context": "наблюдаемое или картографированное окружение",
"no observed or mapped objects in current feeds": "нет наблюдаемых или картографированных объектов в текущих потоках",
"feed unavailable": "поток данных недоступен",
"feed stale": "поток данных устарел",
"Brightest naked-eye objects — CelesTrak visual group": "Самые яркие объекты невооружённым глазом — визуальная группа CelesTrak",
"COMMS": "СВЯЗЬ",
"Broadband constellation shell — shown only in DENSE mode": "Оболочка широкополосной группировки — только в режиме ПЛОТНО",
"STATION": "СТАНЦИЯ",
"Crewed stations and their visiting vehicles": "Пилотируемые станции и прибывающие к ним корабли",
"NAV": "NAV",
"GNSS navigation — GPS, GLONASS, Galileo": "Навигация GNSS — GPS, ГЛОНАСС, Galileo",
"GEO": "GEO",
"Geostationary belt — comms and weather, fixed over the equator": "Геостационарный пояс — связь и погода, неподвижно над экватором",
"VISUAL": "ВИДИМЫЕ",
"FISHING": "РЫБОЛОВНОЕ",
"TOWING": "БУКСИРОВКА",
"DREDGER": "ЗЕМСНАРЯД",
"DIVE OPS": "ВОДОЛАЗНОЕ",
"MILITARY": "ВОЕННОЕ",
"SAILING": "ПАРУСНИК",
"PLEASURE": "ПРОГУЛОЧНОЕ",
"PILOT": "ЛОЦМАН",
"SAR": "СПАСАТЕЛЬНОЕ",
"TUG": "БУКСИР",
"PORT TENDER": "ПОРТОВОЕ",
"ANTI-POLLUTION": "НЕФТЕСБОРЩИК",
"LAW ENFORCE": "ПАТРУЛЬНОЕ",
"MEDICAL": "МЕДИЦИНСКОЕ",
"HIGH-SPEED": "СКОРОСТНОЕ",
"PASSENGER": "ПАССАЖИРСКОЕ",
"CARGO": "ГРУЗОВОЕ",
"TANKER": "ТАНКЕР",
"OTHER": "ДРУГОЕ",
"Starting live contacts…": "Запуск контактов в реальном времени…",
"Opening space missions…": "Открытие космических миссий…",
"Scanning active events…": "Сканирование активных событий…",
"Live earthquakes and active fires, from USGS and NASA": "Землетрясения и активные пожары в реальном времени от USGS и NASA",
"It feels like a forbidden cockpit—then you realize the sources are public and the data is real.": "Будто вы в запретной кабине — а потом понимаете: источники открыты, а данные настоящие.",
"ENVIRONMENTAL": "ПРИРОДА",
"EARTH WATCH": "ДОЗОР ЗЕМЛИ",
"ACTIVE EVENTS": "АКТИВНЫЕ СОБЫТИЯ",
"Working…": "Работаем…",
"Could not open that mission{detail}. Retry or explore manually.": "Не удалось открыть эту миссию{detail}. Повторите попытку или исследуйте вручную.",
"This browser is blocking storage, so that could not be saved.": "Браузер блокирует хранилище, поэтому сохранить не удалось.",
"SUMMARY": "СВОДКА",
"Awaiting telemetry...": "Ожидание телеметрии...",
"REC": "REC",
"REMOVE": "УДАЛИТЬ",
"Remove {title} from this app's saved keys": "Удалить {title} из сохранённых ключей этого приложения",
"POWER UP · {count} KEYS WAITING": {
"one": "ЗАПУСК · {count} КЛЮЧ В ОЖИДАНИИ",
"few": "ЗАПУСК · {count} КЛЮЧА В ОЖИДАНИИ",
"many": "ЗАПУСК · {count} КЛЮЧЕЙ В ОЖИДАНИИ",
"other": "ЗАПУСК · {count} КЛЮЧА В ОЖИДАНИИ"
},
"POWERED UP": "ЗАПУЩЕНО",
"your app configuration": "ваша конфигурация приложения",
"your local .env": "ваш локальный .env",
"Saving…": "Сохранение…",
"Save failed ({status}).": "Не удалось сохранить ({status}).",
"Save failed: {detail}": "Не удалось сохранить: {detail}",
"Paste at least one key first.": "Сначала вставьте хотя бы один ключ.",
"Saved to {store}. Restarting — this page reloads itself.": "Сохранено: {store}. Перезапуск — страница перезагрузится сама.",
"Remove this key from your saved configuration?": "Удалить этот ключ из сохранённой конфигурации?",
"Removed from {store}. Restarting — this page reloads itself.": "Удалено: {store}. Перезапуск — страница перезагрузится сама.",
"More flight-polling credits (anonymous works without)": "Больше кредитов на опрос рейсов (анонимно работает и без ключа)",
"Street-level imagery and coverage in the Street Level layer. Free: register an app in the Mapillary developer dashboard and paste its Client Token": "Уличные снимки и покрытие в слое «Street Level». Бесплатно: зарегистрируйте приложение в панели разработчика Mapillary и вставьте его Client Token",
"Higher space-missions request allowance": "Повышенный лимит запросов для космических миссий",
"The photorealistic 3D planet + place search": "Фотореалистичная 3D-планета + поиск мест",
"Places context + Street View fallback; optional separate key": "Контекст Places + резервный Street View; отдельный ключ — по желанию",
"Voice control — API key or ChatGPT OAuth": "Голосовое управление — ключ API или ChatGPT OAuth",
"Live ships, worldwide": "Суда в реальном времени по всему миру",
"Live active-fire detections": "Обнаружение активных пожаров в реальном времени",
"Real live traffic (keyless runs a simulation)": "Реальные пробки в реальном времени (без ключа — симуляция)",
"Bing imagery map stacks + world terrain": "Наборы карт Bing imagery + рельеф мира",
"Global Context navigation": "Навигация глобального контекста",
"Previous — prior visited contact in the 250 km window": "Назад — предыдущий посещённый контакт в радиусе 250 км",
"PREVIOUS": "ПРЕД.",
"FOCUS": "ФОКУС",
"Next — nearest unvisited contact in the 250 km window": "Далее — ближайший непосещённый контакт в радиусе 250 км",
"NEXT": "СЛЕД.",
"Open-source mapped/observed context. Missing broadcasts, unloaded map areas, or unmapped sites are not evidence of absence.": "Контекст из открытых источников. Отсутствие трансляций, незагруженные области карты или неотмеченные объекты — не доказательство отсутствия.",
"CONTEXT READY": "КОНТЕКСТ ГОТОВ",
"GLOBAL CONTEXT OFF": "ГЛОБАЛЬНЫЙ КОНТЕКСТ ВЫКЛ.",
"SELECT A FLIGHT, VESSEL, OR MAPPED INSTALLATION": "ВЫБЕРИТЕ РЕЙС, СУДНО ИЛИ ОБЪЕКТ НА КАРТЕ",
"ENABLE TO LOAD OBSERVED / MAPPED PROXIMITY": "ВКЛЮЧИТЕ ДЛЯ ЗАГРУЗКИ НАБЛЮДАЕМОГО / КАРТОГРАФИРОВАННОГО ОКРУЖЕНИЯ",
"Unavailable": "Недоступно",
"Focus {label}": "Фокус на {label}",
"HDG {value}°": "КУРС {value}°",
"BRG {value}°": "ПЕЛ. {value}°",
"BRG —": "ПЕЛ. —",
"CRS {value}°": "ПУТЬ {value}°",
"Military flights": "Военные рейсы",
"AIS vessels": "Суда AIS",
"Mapped installations": "Картографированные объекты",
"CURRENT VIEWPORT ONLY": "ТОЛЬКО ТЕКУЩАЯ ОБЛАСТЬ ОБЗОРА",
"WITHIN {km} KM": "В РАДИУСЕ {km} КМ",
"Flights": "Рейсы",
"syncing {count} city feeds...": "синхронизация городских потоков: {count}...",
"scanning nearby systems...": "поиск ближайших систем...",
"Station {id}": "Станция {id}",
"Station": "Станция",
"🚲 {bikes} avail · {docks} docks · {capacity} cap": "🚲 доступно {bikes} · своб. мест {docks} · вмест. {capacity}",
"⚠️ Not installed": "⚠️ Не установлена",
"⚠️ Not renting": "⚠️ Не выдаёт",
"⚠️ Not returning": "⚠️ Не принимает",
"HDG {value}° (ESTIMATED)": "КУРС {value}° (ОЦЕНКА)",
"{count} CAMERAS STANDING BY · NO CAMERA SELECTED · CLICK A CAMERA TO ACTIVATE": "КАМЕР В ГОТОВНОСТИ: {count} · КАМЕРА НЕ ВЫБРАНА · НАЖМИТЕ КАМЕРУ ДЛЯ АКТИВАЦИИ",
"No cameras available in catalog.": "В каталоге нет доступных камер.",
"{city} CCTV": "CCTV: {city}",
"FOV {value}°": "ОБЗОР {value}°",
"COVERAGE {value}km²": "ОХВАТ {value} КМ²",
"OVERLAP {count} cams": "ПЕРЕКРЫТИЕ {count} кам.",
"ISOLATED VIEW": "ИЗОЛИРОВАННЫЙ ВИД",
"PROJ MONITOR": "ПРОЕКЦ. МОНИТОР",
"PROJ OFF": "ПРОЕКЦ. ВЫКЛ.",
"VIEWSHED": "ЗОНА ВИДИМОСТИ",
"CAL {value}": "КАЛИБР. {value}",
"SRC {value}": "ИСТ. {value}",
"{value} CONTEXT": "КОНТЕКСТ {value}",
"Focus fire detection {title}, {details}": "Фокус на очаге пожара {title}, {details}",
"{value} conf": "увер. {value}",
"{value} ago": "{value} назад",
"sensor n/a": "сенсор н/д",
"FIRE · {frp} MW": "ПОЖАР · {frp} МВт",
"NIGHT": "НОЧЬ",
"▲ {frp} MW": "▲ {frp} МВт",
"FIRE": "ПОЖАР",
"FIRES": "ПОЖ.",
"max {value} MW": "макс. {value} МВт",
"new {value}": "последний {value}",
"just now": "только что",
"<1m ago": "<1 мин назад",
"{count}m ago": "{count} мин назад",
"{count}h ago": "{count} ч назад",
"STALE · cached {age}": "УСТАРЕЛ · кэш {age}",
"STALE": "УСТАРЕЛ",
"refreshing...": "обновление...",
"loading...": "загрузка...",
"KEY REQUIRED": "ТРЕБУЕТСЯ КЛЮЧ",
"LIVE · updated {age}": "ОНЛАЙН · обновлено {age}",
"Retrying mapped sites…": "Повторный запрос объектов…",
"Fetching mapped sites…": "Загрузка объектов…",
"Zoom in to search mapped installations": "Приблизьте, чтобы искать картографированные объекты",
"Showing cached mapped sites": "Показаны объекты из кэша",
"Mapped sites not loaded": "Объекты не загружены",
"Mapped sites loaded": "Объекты загружены",
"Overpass rate-limited": "Overpass: превышен лимит запросов",
"Overpass timed out": "Overpass: истекло время ожидания",
"Overpass could not complete the query": "Overpass не смог завершить запрос",
"Overpass temporarily unavailable": "Overpass временно недоступен",
"loading mapped installation context": "загрузка контекста объектов",
"{reason} — retrying in {seconds}s": "{reason} — повтор через {seconds} с",
"{reason} — retry pending": "{reason} — ожидается повтор",
"MAPPED INSTALLATION": "КАРТОГРАФИРОВАННЫЙ ОБЪЕКТ",
"LAUNCH SITE · {site}": "МЕСТО ПУСКА · {site}",
"LAUNCH SITE": "МЕСТО ПУСКА",
"T−{time} · {mission}": "T−{time} · {mission}",
"LAUNCH STANDBY": "ОЖИДАНИЕ ПУСКА",
"LIFTOFF · {mission}": "СТАРТ · {mission}",
"ASCENT REPLAY · {mission}": "ПОВТОР ВЫВЕДЕНИЯ · {mission}",
"ASCENT ESTIMATE · {mission}": "РАСЧЁТНОЕ ВЫВЕДЕНИЕ · {mission}",
"STAGE RE-ENTRY / RECOVERY · {mission}": "ВХОД В АТМОСФЕРУ / ВОЗВРАТ СТУПЕНИ · {mission}",
"ORBIT REPLAY · {mission}": "ПОВТОР ОРБИТЫ · {mission}",
"PAUSED · {title}": "ПАУЗА · {title}",
"UNSPECIFIED": "НЕ УКАЗАНО",
"UNAVAILABLE": "НЕДОСТУПНО",
"+{count} additional payload records": "+{count} доп. записи о полезной нагрузке",
"PAYLOAD DATA UNAVAILABLE": "ДАННЫЕ ПОЛЕЗНОЙ НАГРУЗКИ НЕДОСТУПНЫ",
"{value} KM DOWNRANGE": "{value} КМ ПО ТРАССЕ",
"POSITION UNAVAILABLE": "ПОЗИЦИЯ НЕДОСТУПНА",
"FLIGHT {count}": "ПОЛЁТ {count}",
"REUSED": "ЛЕТАВШАЯ",
"NO STAGE RE-ENTRY / RECOVERY DATA": "НЕТ ДАННЫХ О ВХОДЕ В АТМОСФЕРУ / ВОЗВРАТЕ СТУПЕНИ",
"{count} / 30D": "{count} / 30 ДН.",
"NO MISSIONS AVAILABLE IN THE CURRENT 30-DAY WINDOW": "НЕТ МИССИЙ В ТЕКУЩЕМ 30-ДНЕВНОМ ОКНЕ",
"DATE UNAVAILABLE": "ДАТА НЕДОСТУПНА",
"UNSPECIFIED OPERATOR": "ОПЕРАТОР НЕ УКАЗАН",
"Select {mission}": "Выбрать {mission}",
"{value} KM": "{value} КМ",
"{value} KM/S": "{value} КМ/С",
"SELECTED SPACE MISSION": "ВЫБРАННАЯ КОСМИЧЕСКАЯ МИССИЯ",
"Show all missions": "Показать все миссии",
"Deselect mission": "Снять выбор миссии",
"MISSION": "МИССИЯ",
"STATUS · ": "СТАТУС · ",
"LAUNCH SITE · ": "МЕСТО ПУСКА · ",
"LAUNCH TIME · ": "ВРЕМЯ ПУСКА · ",
"ORBIT · ": "ОРБИТА · ",
"ASCENT PATH · ": "ТРАЕКТОРИЯ ВЫВЕДЕНИЯ · ",
"CURRENT DISTANCE FROM EARTH · ": "ТЕКУЩЕЕ РАССТОЯНИЕ ОТ ЗЕМЛИ · ",
"SATELLITE SPEED · ": "СКОРОСТЬ СПУТНИКА · ",
"PAYLOAD": "ПОЛЕЗНАЯ НАГРУЗКА",
"NAME": "НАЗВАНИЕ",
"TYPE": "ТИП",
"DESTINATION": "ПУНКТ НАЗНАЧЕНИЯ",
"STAGE / RE-ENTRY / RECOVERY": "СТУПЕНЬ / ВХОД В АТМОСФЕРУ / ВОЗВРАТ",
"STAGE": "СТУПЕНЬ",
"STATUS": "СТАТУС",
"FINAL POSITION": "КОНЕЧНОЕ ПОЛОЖЕНИЕ",
"REPLAY SPEED": "СКОРОСТЬ ПОВТОРА",
"Replay speed multiplier": "Множитель скорости повтора",
"REPLAY ASCENT": "ПОВТОРИТЬ ВЫВЕДЕНИЕ",
"Previous mission": "Предыдущая миссия",
"PREV": "ПРЕД.",
"Next mission": "Следующая миссия",
"SHOW ALL / DESELECT": "ПОКАЗАТЬ ВСЕ / СНЯТЬ ВЫБОР",
"Pause replay": "Приостановить повтор",
"Cancel replay": "Отменить повтор",
"EST. DOWNRANGE": "РАСЧЁТ ПО ТРАССЕ",
"PLANNED · ": "ПЛАН · ",
"SUPPLIED TRAJECTORY POINTS": "ПРЕДОСТАВЛЕННЫЕ ТОЧКИ ТРАЕКТОРИИ",
"RECONSTRUCTED ESTIMATE": "РЕКОНСТРУИРОВАННАЯ ОЦЕНКА",
"Replay the estimated ascent with a following camera": "Повторить расчётное выведение с камерой сопровождения",
"Resume replay": "Возобновить повтор",
"T minus {seconds}": "T минус {seconds}",
"Preparing launch site": "Подготовка стартовой площадки",
"Liftoff": "Старт",
"Ascent replay": "Повтор выведения",
"Orbit replay": "Повтор: орбита",
", paused": ", пауза",
"Alt unknown": "Высота неизвестна",
"Type unknown": "Тип неизвестен",
"Reg unknown": "Рег. номер неизвестен",
"Operator unknown": "Оператор неизвестен",
"All": "Все",
"News": "Новости",
"Talk": "Ток-радио",
"Weather / Emergency": "Погода / ЧС",
"Public Safety": "Общественная безопасность",
"Aviation / Marine": "Авиация / Море",
"Traffic / Transit": "Трафик / Транспорт",
"Music": "Музыка",
"Other": "Другое",
"Add the full Starlink broadband shell (thousands of extra points)": "Добавить полную широкополосную оболочку Starlink (тысячи дополнительных точек)",
"Loading the Starlink shell…": "Загрузка оболочки Starlink…",
"Starlink {detail} — click to retry": "Starlink: {detail} — нажмите, чтобы повторить",
"load failed": "ошибка загрузки",
"Showing the full Starlink shell — click for the core catalog only": "Показана полная оболочка Starlink — нажмите, чтобы оставить только основной каталог",
"DENSE ···": "ПЛОТНО ···",
"DENSE ✕": "ПЛОТНО ✕",
"DENSE": "ПЛОТНО",
"Syncing flow · Roads: {source}": "Синхронизация потока · Дороги: {source}",
"LIVE · Roads: {source} · Roads without flow hidden": "ОНЛАЙН · Дороги: {source} · Дороги без потока скрыты",
"LIVE · Roads: {source} · No flow roads in view": "ОНЛАЙН · Дороги: {source} · В кадре нет дорог с потоком",
"LIVE · Roads: {source} · Flow {percent}%": "ОНЛАЙН · Дороги: {source} · Поток {percent}%",
"SIMULATED · Roads: {source} · Flow {percent}%": "СИМУЛЯЦИЯ · Дороги: {source} · Поток {percent}%",
"Syncing flow · Roads: OpenStreetMap · Flow: TomTom · Unmatched: simulated": "Синхронизация потока · Дороги: OpenStreetMap · Поток: TomTom · Без совпадений: симуляция",
"LIVE · Roads: OpenStreetMap · Flow: TomTom · {percent}% cov · Unmatched: simulated": "ОНЛАЙН · Дороги: OpenStreetMap · Поток: TomTom · охват {percent}% · Без совпадений: симуляция",
"LIVE · Roads: OpenStreetMap · Flow: TomTom · {percent}% cov": "ОНЛАЙН · Дороги: OpenStreetMap · Поток: TomTom · охват {percent}%",
"SIMULATED · Roads: OpenStreetMap · Flow: TomTom (no matches)": "СИМУЛЯЦИЯ · Дороги: OpenStreetMap · Поток: TomTom (нет совпадений)",
"SIMULATED — traffic service unreachable": "СИМУЛЯЦИЯ — сервис трафика недоступен",
"SIMULATED — add TomTom key for live": "СИМУЛЯЦИЯ — добавьте ключ TomTom для режима онлайн",
"POS: LIVE": "ПОЗ: ОНЛАЙН",
"POS: {time}Z": "ПОЗ: {time}Z",
"AIS: {name}": "AIS: {name}",
"{type} SPD: {speed} HDG: {heading}": "{type} СКОР: {speed} КУРС: {heading}",
"VESSEL": "СУДНО",
"AIS: --": "AIS: --",
"awaiting first AIS position…": "ожидание первой позиции AIS…",
"awaiting usable AIS positions…": "ожидание пригодных позиций AIS…",
"awaiting first AIS message…": "ожидание первого сообщения AIS…",
"{label} unavailable: {hint}": "{label}: недоступно — {hint}",
"Needs {envVars} — add it in Provider Settings": "Нужен {envVars} — добавьте его в «Настройках провайдеров»",
"{label} is unavailable": "{label}: недоступно",
"This map stack": "Этот набор карт",
"Updated: {scene} / {shot}": "Обновлено: {scene} / {shot}",
"Camera unavailable — exit cockpit first": "Камера недоступна — сначала выйдите из кабины",
"No shots to run": "Нет кадров для воспроизведения",
"Error: {message}": "Ошибка: {message}",
"Project exported": "Проект экспортирован",
"Ready": "Готово",
"Could not exit {mode} — scene layers may be refused": "Не удалось выйти из режима {mode} — слои сцены могут быть отклонены",
"Loaded: {scene} / {shot}": "Загружено: {scene} / {shot}",
"Global Flights Radar": "Глобальный радар рейсов",
"Orbital Watch": "Орбитальный дозор",
"Thermal Threat Board": "Панель тепловых угроз",
"City Overload": "Перегрузка города",
"Omniscience Pullback": "Отъезд к всевидению",
"Cannot capture shot: camera not ready": "Не удалось сделать кадр: камера не готова",
"Shot {n}": "Кадр {n}",
"Captured: {scene} / {shot}": "Снято: {scene} / {shot}",
"Select a shot first": "Сначала выберите кадр",
"Running {index}/{total}: {scene} / {shot}": "Воспроизведение {index}/{total}: {scene} / {shot}",
"Scene run complete": "Воспроизведение сцены завершено",
"CCTV layer unavailable": "Слой CCTV недоступен",
"Link copied!": "Ссылка скопирована!",
"Copy failed": "Не удалось скопировать",
"VISUAL PRESETS": "ВИЗУАЛЬНЫЕ ПРЕСЕТЫ",
"LOCATION": "МЕСТО",
"DISPLAY": "ЭКРАН",
"CONTACT": "КОНТАКТ",
"CONTACTS — nearest planes · vessels · sites": "КОНТАКТЫ — ближайшие самолёты · суда · объекты",
"SPACE MISSIONS — launches & orbital assets": "КОСМИЧЕСКИЕ МИССИИ — пуски и орбитальные аппараты",
"LIVE SIGNALS": "СИГНАЛЫ ОНЛАЙН",
"MAP SOURCE": "ИСТОЧНИК КАРТЫ",
"Map source": "Источник карты",
"CCTV calibration saved": "Калибровка CCTV сохранена",
"ADJUST ON": "НАСТРОЙКА ВКЛ",
"ADJUST": "НАСТРОЙКА",
"CCTV calibration reset": "Калибровка CCTV сброшена",
"FRAME · UNAVAILABLE": "КАДР · НЕДОСТУПЕН",
"SOURCE · UNKNOWN": "ИСТОЧНИК · НЕИЗВЕСТЕН",
"FRAME · LOADING": "КАДР · ЗАГРУЗКА",
"VIEWSHED ON": "ВИДИМОСТЬ ВКЛ",
"COVERAGE ON": "ОХВАТ ВКЛ",
"COVERAGE OFF": "ОХВАТ ВЫКЛ",
"RAW PRIOR": "ИСХОДНАЯ ОЦЕНКА",
"AUTO HOP ON": "АВТОПЕРЕХОД ВКЛ",
"AUTO HOP OFF": "АВТОПЕРЕХОД ВЫКЛ",
"PROJECTION ON": "ПРОЕКЦИЯ ВКЛ",
"PROJECTION OFF": "ПРОЕКЦИЯ ВЫКЛ",
"CAL · EDITED (UNSAVED)": "КАЛИБР. · ИЗМЕНЕНО (НЕ СОХР.)",
"CAL · {badge}": "КАЛИБР. · {badge}",
"MONITOR": "МОНИТОР",
"OFF": "ВЫКЛ",
"{city} · HDG {heading} · FOV {fov} · RANGE {range}m · {projection}{calBadge} · {provider}{status}": "{city} · КУРС {heading} · ОБЗОР {fov} · ДАЛЬН. {range} м · {projection}{calBadge} · {provider}{status}",
"{count} cameras loaded · click a camera to activate": {
"one": "Загружена {count} камера · нажмите на камеру, чтобы активировать",
"few": "Загружено {count} камеры · нажмите на камеру, чтобы активировать",
"many": "Загружено {count} камер · нажмите на камеру, чтобы активировать",
"other": "Загружено {count} камеры · нажмите на камеру, чтобы активировать"
},
"{count} cameras loaded · enable CCTV to activate": {
"one": "Загружена {count} камера · включите CCTV, чтобы активировать",
"few": "Загружено {count} камеры · включите CCTV, чтобы активировать",
"many": "Загружено {count} камер · включите CCTV, чтобы активировать",
"other": "Загружено {count} камеры · включите CCTV, чтобы активировать"
},
"Enable CCTV to load camera intersections": "Включите CCTV, чтобы загрузить камеры на перекрёстках",
"Enable CCTV to start camera-linked intelligence summaries.": "Включите CCTV, чтобы запускать сводки по камерам.",
"No summary available.": "Сводка недоступна.",
"loading frames": "загрузка кадров",
"camera grid ready": "сетка камер готова",
"CCTV ON": "CCTV ВКЛ",
"CCTV OFF": "CCTV ВЫКЛ",
"CALIBRATED": "ОТКАЛИБРОВАНО",
"CURATED": "ВЫВЕРЕНО",
"Clearing selected data layers": "Очистка выбранных слоёв данных",
"Clear selected data layers": "Очистить выбранные слои данных",
"CONDITIONS UNKNOWN": "УСЛОВИЯ НЕИЗВЕСТНЫ",
"CLEAR": "ЯСНО",
"PARTLY CLOUDY": "ПЕРЕМЕННАЯ ОБЛАЧНОСТЬ",
"OVERCAST": "ПАСМУРНО",
"ACQUIRING REGIONAL NEWS": "ЗАГРУЗКА РЕГИОНАЛЬНЫХ НОВОСТЕЙ",
"REGIONAL NEWS UNAVAILABLE": "РЕГИОНАЛЬНЫЕ НОВОСТИ НЕДОСТУПНЫ",
"RESOLVING REGION": "ОПРЕДЕЛЕНИЕ РЕГИОНА",
"REGION UNAVAILABLE": "РЕГИОН НЕДОСТУПЕН",
"FOG": "ТУМАН",
"NO RECENT LOCATION MATCHES": "НЕТ СВЕЖИХ СОВПАДЕНИЙ ПО МЕСТУ",
"DRIZZLE": "МОРОСЬ",
"RAIN": "ДОЖДЬ",
"{domain} · {age}": "{domain} · {age}",
"SOURCE": "ИСТОЧНИК",
"SNOW": "СНЕГ",
"RAIN SHOWERS": "ЛИВНИ",
"SNOW SHOWERS": "ЛИВНЕВЫЙ СНЕГ",
"THUNDERSTORM": "ГРОЗА",
"CLOUD {pct}%": "ОБЛАЧНОСТЬ {pct}%",
"CLOUD UNKNOWN": "ОБЛАЧНОСТЬ НЕИЗВЕСТНА",
"MIXED CONDITIONS": "СМЕШАННЫЕ УСЛОВИЯ",
"{source} · LOCATION QUERY": "{source} · ЗАПРОС ПО МЕСТУ",
"REGIONAL NEWS": "РЕГИОНАЛЬНЫЕ НОВОСТИ",
"CYCLE ON": "АВТОЛИСТАНИЕ ВКЛ",
"CYCLE OFF": "АВТОЛИСТАНИЕ ВЫКЛ",
"Stop automatic page cycling. Previous, Next, and the SIG/NEWS/LOCAL tabs stay available.": "Остановить автоматическое листание страниц. Кнопки ПРЕД./СЛЕД. и вкладки SIG/NEWS/LOCAL остаются доступны.",
"Cycle briefing pages automatically every 9 seconds (Signals → News → Local). Pauses while you hover or focus the panel. Live signal data refreshes continuously either way.": "Автоматически листать страницы брифинга каждые 9 секунд (Сигналы → Новости → Местное). При наведении или фокусе на панели листание приостанавливается. Данные сигналов в реальном времени в любом случае обновляются непрерывно.",
"{cohort}, Unavailable": "{cohort}, недоступно",
"AHEAD": "ПО КУРСУ",
"{side} {angle}": "{side} {angle}",
"L": "Л",
"R": "П",
"{count} INPUTS UNKNOWN · NOT AN ALL-CLEAR": {
"one": "{count} ИСТОЧНИК ДАННЫХ НЕИЗВЕСТЕН · БЕЗОПАСНОСТЬ НЕ ПОДТВЕРЖДЕНА",
"few": "{count} ИСТОЧНИКА ДАННЫХ НЕИЗВЕСТНЫ · БЕЗОПАСНОСТЬ НЕ ПОДТВЕРЖДЕНА",
"many": "{count} ИСТОЧНИКОВ ДАННЫХ НЕИЗВЕСТНО · БЕЗОПАСНОСТЬ НЕ ПОДТВЕРЖДЕНА",
"other": "{count} ИСТОЧНИКА ДАННЫХ НЕИЗВЕСТНО · БЕЗОПАСНОСТЬ НЕ ПОДТВЕРЖДЕНА"
},
"AVAILABLE INPUTS CURRENT · NOT AN ALL-CLEAR": "ДОСТУПНЫЕ ДАННЫЕ АКТУАЛЬНЫ · БЕЗОПАСНОСТЬ НЕ ПОДТВЕРЖДЕНА",
"CONTEXT STANDBY": "КОНТЕКСТ В ОЖИДАНИИ",
"ENABLE GLOBAL CONTEXT FOR PROXIMITY PINGS": "ВКЛЮЧИТЕ ГЛОБАЛЬНЫЙ КОНТЕКСТ ДЛЯ ПИНГОВ ПОБЛИЗОСТИ",
"CONTACT LOST · LAST KNOWN READOUT · NOT AN ALL-CLEAR": "КОНТАКТ ПОТЕРЯН · ПОСЛЕДНИЕ ИЗВЕСТНЫЕ ДАННЫЕ · БЕЗОПАСНОСТЬ НЕ ПОДТВЕРЖДЕНА",
"CONTACT LOST · {subject}": "КОНТАКТ ПОТЕРЯН · {subject}",
"SUBJECT LEFT ITS FEED · READOUT HOLDING LAST KNOWN": "ОБЪЕКТ ВЫПАЛ ИЗ ПОТОКА · ПОКАЗАНЫ ПОСЛЕДНИЕ ДАННЫЕ",
"{cohort} · {contact}": "{cohort} · {contact}",
"NO AVAILABLE EXAMPLE": "НЕТ ДОСТУПНОГО ПРИМЕРА",
"ACQUIRING SURFACE": "ЗАХВАТ ПОВЕРХНОСТИ",
"SURFACE FALLBACK": "РЕЗЕРВНАЯ ПОВЕРХНОСТЬ",
"STALE FEED": "ПОТОК УСТАРЕЛ",
"LIVE TRACK": "ТРЕК ОНЛАЙН",
"{aircraftClass} · {feedState} · COURSE ALIGNED": "{aircraftClass} · {feedState} · КУРС СОВМЕЩЁН",
"COMMERCIAL": "ГРАЖДАНСКИЙ",
"UNKNOWN": "НЕИЗВЕСТНО",
"ARROW · ESTIMATED DIRECTION": "СТРЕЛКА · РАСЧЁТНОЕ НАПРАВЛЕНИЕ",
"ROUTE DATA UNAVAILABLE": "ДАННЫЕ МАРШРУТА НЕДОСТУПНЫ",
"DEST {bearing}": "НАЗН. {bearing}",
"Disable cockpit weather effects": "Выключить погодные эффекты кабины",
"Enable cockpit weather effects": "Включить погодные эффекты кабины",
"ON": "ВКЛ",
"Night vision": "Ночное видение",
"Thermal": "Тепловизор",
"Anime": "Аниме",
"Noir": "Нуар",
"Snow": "Снег",
"Current cockpit vision style: {style}. Activate for next style.": "Текущий стиль обзора кабины: {style}. Активируйте, чтобы переключить на следующий.",
"Current style: {style} — click for next": "Текущий стиль: {style} — нажмите для следующего",
"AIRCRAFT": "САМОЛЁТ",
"Expand Contact panel": "Развернуть панель контактов",
"Collapse Contact panel": "Свернуть панель контактов",
"Expand contact panel": "Развернуть панель контактов",
"Collapse contact panel": "Свернуть панель контактов",
"Collapse cockpit briefing panel": "Свернуть панель брифинга кабины",
"Expand cockpit briefing panel": "Развернуть панель брифинга кабины",
"Collapse briefing panel": "Свернуть панель брифинга",
"Expand briefing panel": "Развернуть панель брифинга",
"OBSERVED / MAPPED PINGS": "НАБЛЮДАЕМЫЕ / НАНЕСЁННЫЕ ПИНГИ",
"SOURCE-BACKED EVENTS · NO SYNTHETIC NEWS": "СОБЫТИЯ С ИСТОЧНИКАМИ · БЕЗ СИНТЕТИЧЕСКИХ НОВОСТЕЙ",
"LATEST LOCATION-MATCHED REPORTING": "СВЕЖИЕ НОВОСТИ ПО МЕСТУ",
"LOCAL INFO": "МЕСТНЫЕ ДАННЫЕ",
"PLACE / CONDITIONS / POSITION": "МЕСТО / УСЛОВИЯ / ПОЗИЦИЯ",
"TIME UNKNOWN": "ВРЕМЯ НЕИЗВЕСТНО",
"{count}M AGO": "{count} МИН НАЗАД",
"{count}H AGO": "{count} Ч НАЗАД",
"{count}D AGO": "{count} ДН. НАЗАД",
"DIR UNKNOWN": "НАПР. НЕИЗВЕСТНО",
"{aircraftClass} · CURRENT": "{aircraftClass} · ТЕКУЩИЙ",
"MILITARY FLIGHT": "ВОЕННЫЙ РЕЙС",
"COMMERCIAL FLIGHT": "ГРАЖДАНСКИЙ РЕЙС",
"{aircraftClass} · {distance}": "{aircraftClass} · {distance}",
"DISTANCE UNKNOWN": "ДИСТАНЦИЯ НЕИЗВЕСТНА",
"{count} INPUTS UNKNOWN": {
"one": "{count} ИСТОЧНИК ДАННЫХ НЕИЗВЕСТЕН",
"few": "{count} ИСТОЧНИКА ДАННЫХ НЕИЗВЕСТНЫ",
"many": "{count} ИСТОЧНИКОВ ДАННЫХ НЕИЗВЕСТНО",
"other": "{count} ИСТОЧНИКА ДАННЫХ НЕИЗВЕСТНО"
},
"SOURCE STATUS UNAVAILABLE": "СТАТУС ИСТОЧНИКА НЕДОСТУПЕН",
"Select flight {title}": "Выбрать рейс {title}",
"TRACK ACQUIRED": "ЦЕЛЬ ЗАХВАЧЕНА",
"{label} · COURSE {heading}°": "{label} · КУРС {heading}°",
"Restore real aircraft": "Вернуть реальный самолёт",
"Reclassify as TR-3B": "Переклассифицировать как TR-3B",
"No selected data layers": "Нет выбранных слоёв данных",
"{count} data layers could not be cleared": {
"one": "Не удалось очистить {count} слой данных",
"few": "Не удалось очистить {count} слоя данных",
"many": "Не удалось очистить {count} слоёв данных",
"other": "Не удалось очистить {count} слоя данных"
},
"Cleared {count} data layers": {
"one": "Очищен {count} слой данных",
"few": "Очищено {count} слоя данных",
"many": "Очищено {count} слоёв данных",
"other": "Очищено {count} слоя данных"
},
"Selected data layers could not be cleared": "Не удалось очистить выбранные слои данных",
"Context could not restore every layer; try again": "Контекст: не удалось восстановить все слои; попробуйте снова",
"Nearby installations refreshed": "Ближайшие объекты обновлены",
"Nearby installations could not be refreshed; try again": "Не удалось обновить ближайшие объекты; попробуйте снова",
"Contacts could not complete the requested transition; try again": "Не удалось переключить режим «Контакты»; попробуйте снова",
"Space Missions could not complete the requested transition; try again": "Не удалось переключить режим «Космические миссии»; попробуйте снова",
"{layerId} could not {action} cleanly": "Не удалось корректно {action} слой {layerId}",
"start": "запустить",
"stop": "остановить",
"Space Missions cancellation could not restore the previous layer state": "Не удалось восстановить прежнее состояние слоёв после отмены космических миссий",
"That layer is unavailable in the current Context mode": "Этот слой недоступен в текущем режиме контекста",
"{mode} could not start because another layer did not stop cleanly": "Не удалось запустить режим «{mode}»: другой слой не остановился корректно",
"Space Missions": "Космические миссии",
"Context": "Контекст",
"LOADING": "ЗАГРУЗКА",
"DEGRADED": "ПЕРЕБОИ",
"PARTIAL": "ЧАСТИЧНО",
"FALLBACK": "РЕЗЕРВ",
"Live Flights": "Рейсы в реальном времени",
"Military Flights": "Военные рейсы",
"Earthquakes (24h)": "Землетрясения (24 ч)",
"Satellites": "Спутники",
"Space Missions (30d)": "Космические миссии (30 дн.)",
"Street Traffic": "Уличный трафик",
"CCTV": "CCTV",
"Radio": "Радио",
"Bikeshare": "Велошеринг",
"Live AIS Vessels": "Суда AIS в реальном времени",
"Mapped Installations": "Объекты на карте",
"Global Context": "Глобальный контекст",
"Datacenters": "Дата-центры",
"Dams": "Плотины",
"Submarine Cables": "Подводные кабели",
"FIRMS Active Fires": "Активные пожары FIRMS",
"ENABLING": "ВКЛЮЧЕНИЕ",
"DISABLING": "ВЫКЛЮЧЕНИЕ",
"{state} · {source}": "{state} · {source}",
"UNCERTAIN · {source} · lifecycle state requires reconciliation": "НЕОПРЕД. · {source} · требуется сверка состояния",
"{state} · {source} · {detail} · retry {seconds}s": "{state} · {source} · {detail} · повтор через {seconds} с",
"{state} · {source} · {detail}": "{state} · {source} · {detail}",
"never": "никогда",
"{source} · {loadingLabel}": "{source} · {loadingLabel}",
"{accepted} of {raw} records accepted": "принято записей: {accepted} из {raw}",
"incomplete snapshot": "неполный снимок",
"{state} · {source} · {detail} · {ago}": "{state} · {source} · {detail} · {ago}",
"{state} · {source} · {ago} · retrying in {seconds}s": "{state} · {source} · {ago} · повтор через {seconds} с",
"{state} · {source} · {ago}": "{state} · {source} · {ago}",
"{source} · {ago}": "{source} · {ago}",
"UNCERTAIN": "НЕОПРЕД.",
"Data source unavailable": "Источник данных недоступен",
"{name}: {state}": "{name}: {state}",
"{count}s ago": "{count} с назад",
"📍 Location: --": "📍 Место: --",
"Landmark: --": "Ориентир: --",
"Searched location": "Найденное место",
"ORBIT": "ОРБИТА",
"Fly to a POI first": "Сначала перелетите к точке интереса",
"Reset to full globe view": "Сбросить к виду всего глобуса",
"Reset cockpit to full globe view": "Сбросить кабину к виду всего глобуса",
"Resetting to full globe view": "Сброс к виду всего глобуса",
"Resetting cockpit to full globe view": "Сброс кабины к виду всего глобуса",
"Location not found": "Место не найдено",
"Search failed": "Не удалось выполнить поиск",
"MAP": "КАРТА",
"panel": "панель",
"Expand {name}": "Развернуть {name}",
"Collapse {name}": "Свернуть {name}",
"Expand Radio": "Развернуть радио",
"Collapse Radio": "Свернуть радио",
"Expand Radio section": "Развернуть раздел радио",
"Collapse Radio section": "Свернуть раздел радио",
"Panel layout updated — positions reset to new defaults": "Макет панелей обновлён — позиции сброшены к новым значениям по умолчанию",
"NO STATIONS": "НЕТ СТАНЦИЙ",
"NO STATION AVAILABLE": "НЕТ ДОСТУПНЫХ СТАНЦИЙ",
"{name}, station {index} of {total}": "{name}, станция {index} из {total}",
"No station available": "Нет доступной станции",
"OFF AIR": "НЕ В ЭФИРЕ",
"STATION UNAVAILABLE": "СТАНЦИЯ НЕДОСТУПНА",
"Radio could not {action} cleanly": "Не удалось корректно {action} радио",
"Collapse Cockpit display options": "Свернуть параметры экрана кабины",
"Expand Cockpit display options": "Развернуть параметры экрана кабины",
"Collapse Cockpit Radio controls": "Свернуть управление радио кабины",
"Expand Cockpit Radio controls": "Развернуть управление радио кабины",
"Close compact Radio controls": "Закрыть компактное управление радио",
"Open compact Radio controls": "Открыть компактное управление радио",
"DIRECTORY BAND": "ДИАПАЗОН КАТАЛОГА",
"{category} BAND": "ДИАПАЗОН {category}",
"NO STATION SELECTED": "СТАНЦИЯ НЕ ВЫБРАНА",
"Directory metadata only": "Только метаданные каталога",
"Loading station directory…": "Загрузка каталога станций…",
"Choose a globe marker or use next.": "Выберите маркер на глобусе или нажмите «След.».",
"TAGS · {tags}": "ТЕГИ · {tags}",
"Pause": "Приостановить",
"Resume": "Продолжить",
"Play": "Воспроизвести",
"selected": "выбранную",
"nearest": "ближайшую",
"{action} {target} radio station": "{action} {target} радиостанцию",
"RADIO STATE UNCERTAIN": "СОСТОЯНИЕ РАДИО НЕОПРЕДЕЛЁННО",
"SYNCING DIRECTORY": "СИНХРОНИЗАЦИЯ КАТАЛОГА",
"RADIO READY": "РАДИО ГОТОВО",
"SYNCING": "СИНХРОНИЗАЦИЯ",
"READY": "ГОТОВО",
"station": "станция",
" · stale/degraded directory": " · каталог устарел/с перебоями",
" · degraded directory": " · каталог с перебоями",
" · stale directory": " · каталог устарел",
" · outside current filter": " · вне текущего фильтра",
"Ready — playback starts only from your action": "Готово — воспроизведение начнётся только по вашей команде",
"Radio off": "Радио выключено",
"Connecting directly to broadcaster…": "Прямое подключение к вещателю…",
"Buffering broadcaster stream…": "Буферизация потока вещателя…",
"Playing {station}": "Играет {station}",
"Paused {station}": "{station} на паузе",
"Broadcaster stream unavailable": "Поток вещателя недоступен",
" · muted during voice interaction": " · приглушено во время голосовой сессии",
" · restoring volume after voice": " · восстановление громкости после голосовой сессии",
" · static indicates no broadcaster audio": " · шум означает отсутствие аудио вещателя",
" · tuning static until broadcaster starts": " · шум настройки, пока не начнётся вещание",
"Station unavailable after directory refresh — choose another channel": "Станция недоступна после обновления каталога — выберите другой канал",
"Radio is enabling…": "Радио включается…",
"Radio is disabling…": "Радио выключается…",
"Radio lifecycle is uncertain — use Enable or Disable to reconcile": "Состояние радио не определено — нажмите «Включить» или «Выключить» для сверки",
"SYNC": "СИНХР.",
"RECONCILE": "СВЕРИТЬ",
"DISABLE": "ВЫКЛЮЧИТЬ",
"ENABLE": "ВКЛЮЧИТЬ",
"Reconcile Radio — lifecycle uncertain": "Сверить радио — состояние не определено",
"Disable Radio": "Выключить радио",
"Enable Radio": "Включить радио",
"Scene action failed": "Не удалось выполнить действие со сценой",
"Delete shot \"{shot}\"?": "Удалить кадр «{shot}»?",
"ACQUIRING": "ЗАХВАТ",
"SHARED {subject}": "ПО ССЫЛКЕ: {subject}",
"entity": "объект",
"Shared {subject} follow expired": "Срок отслеживания {subject} по ссылке истёк",
"Shared {subject} could not be restored — feed unavailable": "Не удалось восстановить {subject} по ссылке — поток данных недоступен",
"Shared {subject} is unavailable": "{subject} по ссылке недоступен",
"LOADING LIVE DATA": "ЗАГРУЗКА ОНЛАЙН-ДАННЫХ",
"LOAD COMPLETE": "ЗАГРУЗКА ЗАВЕРШЕНА",
"LOAD CANCELLED": "ЗАГРУЗКА ОТМЕНЕНА",
"LOAD FAILED": "ОШИБКА ЗАГРУЗКИ",
"LIVE DATA OFF": "ОНЛАЙН-ДАННЫЕ ВЫКЛ.",
"MAPPED SITES LOADED": "ОБЪЕКТЫ ЗАГРУЖЕНЫ",
"RETRYING MAPPED SITES": "ПОВТОРНАЯ ЗАГРУЗКА ОБЪЕКТОВ",
"FETCHING MAPPED SITES": "ЗАГРУЗКА ОБЪЕКТОВ",
"TURNING OFF LIVE DATA": "ОТКЛЮЧЕНИЕ ОНЛАЙН-ДАННЫХ",
"REFRESHING LIVE DATA": "ОБНОВЛЕНИЕ ОНЛАЙН-ДАННЫХ",
"syncing road network": "синхронизация дорожной сети",
"retrying in {seconds}s": "повтор через {seconds} с",
"retry pending": "повтор ожидается",
"Contact cockpit summary": "Сводка по контакту в кабине",
"Cockpit briefing carousel": "Карусель брифингов кабины",
"Cockpit display and Radio controls": "Управление экраном и радио кабины",
"Previous cockpit vision style": "Предыдущий стиль обзора кабины",
"Previous vision style": "Предыдущий стиль обзора",
"Current cockpit vision style: NORMAL. Activate for next style.": "Текущий стиль обзора кабины: NORMAL. Активируйте для следующего стиля.",
"Current style: NORMAL — click for next": "Текущий стиль: NORMAL — нажмите для следующего",
"Next cockpit vision style": "Следующий стиль обзора кабины",
"Next vision style": "Следующий стиль обзора",
"Previous briefing page": "Предыдущая страница брифинга",
"Next briefing page": "Следующая страница брифинга",
"Show Live Signals": "Показать сигналы в реальном времени",
"Show Regional News": "Показать региональные новости",
"Show Local Info": "Показать местную информацию",
"Previous filtered radio station": "Предыдущая отфильтрованная радиостанция",
"Play selected radio station": "Воспроизвести выбранную радиостанцию",
"Next filtered radio station": "Следующая отфильтрованная радиостанция",
"Exit cockpit and return to full globe view": "Выйти из кабины и вернуться к виду всего глобуса",
"Exit cockpit view": "Выйти из кабины",
"Estimated destination direction": "Расчётное направление на пункт назначения",
"OPTICAL PLANE · 01": "ОПТИЧЕСКАЯ ПЛОСКОСТЬ · 01",
"VISOR LOCK · ACTIVE": "БЛОКИРОВКА ВИЗОРА · АКТИВНА",
"Cockpit vision style": "Стиль обзора кабины",
"Current aircraft heading": "Текущий курс самолёта",
"Nearby cohort counts": "Счётчики контактов поблизости",
"Cockpit display options": "Параметры экрана кабины",
"Cockpit compact Radio controls": "Компактное управление радио кабины",
"Cockpit Radio volume": "Громкость радио кабины",
"Contact navigation": "Навигация по контактам",
"Cockpit briefing controls": "Управление брифингом кабины",
"View switcher": "Переключатель вида",
"Aircraft cockpit view": "Вид кабины самолёта",
"Estimated flight plan": "Расчётный план полёта",
"Live signals": "Сигналы в реальном времени",
"Latest regional news": "Последние региональные новости",
"Location-based information": "Информация по текущему месту",
"LEVEL": "ГОРИЗОНТ",
"DEST ---°": "НАЗН. ---°",
"CURRENT": "ТЕКУЩИЙ",
"NEAREST OBSERVED / MAPPED": "БЛИЖАЙШИЕ НАБЛЮДАЕМЫЕ / НА КАРТЕ",
"GROUND SPEED · KTS": "ПУТЕВАЯ СКОРОСТЬ · УЗ",
"ALTITUDE · FT": "ВЫСОТА · ФТ",
"FIRST PERSON": "ОТ ПЕРВОГО ЛИЦА",
"LIVE TRACK · COURSE ALIGNED": "ТРЕК ОНЛАЙН · КУРС СОВМЕЩЁН",
"GROUND SPEED": "ПУТЕВАЯ СКОРОСТЬ",
"ALTITUDE": "ВЫСОТА",
"CONTEXT ONLY": "ТОЛЬКО КОНТЕКСТ",
"AVAILABLE INPUTS ONLY · NOT AN ALL-CLEAR": "ТОЛЬКО ДОСТУПНЫЕ ДАННЫЕ · БЕЗОПАСНОСТЬ НЕ ПОДТВЕРЖДЕНА",
"ESTIMATED FLIGHT PLAN": "РАСЧЁТНЫЙ ПЛАН ПОЛЁТА",
"FROM": "ОТКУДА",
"TO": "КУДА",
"TEMP": "ТЕМП.",
"WIND": "ВЕТЕР",
"SKY": "НЕБО",
"PRECIP": "ОСАДКИ",
"RADIO": "РАДИО",
"VOLUME": "ГРОМКОСТЬ",
"RESET": "СБРОС",
"EXIT COCKPIT": "ВЫЙТИ ИЗ КАБИНЫ",
"CONTACTS · 250 KM": "КОНТАКТЫ · 250 КМ",
"Expand Visual Presets": "Развернуть визуальные пресеты",
"Pin visual presets": "Закрепить визуальные пресеты",
"Keep visual presets open": "Держать визуальные пресеты открытыми",
"Show the globe without a visual filter.": "Показывает глобус без визуального фильтра.",
"Emulate a green phosphor CRT with scanlines and screen curvature.": "Имитирует CRT-экран с зелёным люминофором, строками развёртки и кривизной экрана.",
"Simulate night-vision goggles with green intensification and a tube vignette.": "Имитирует приборы ночного видения с зелёным усилением изображения и виньеткой трубки.",
"Simulate FLIR-style thermal contrast. Turn up Ironbow for color.": "Имитирует тепловой контраст в стиле FLIR. Для цвета увеличьте Ironbow.",
"Apply bright cel-shaded color and illustrated outlines.": "Применяет яркие cel-shading-цвета и рисованные контуры.",
"Apply high-contrast monochrome film-noir grading.": "Применяет высококонтрастную монохромную цветокоррекцию в стиле нуар.",
"Add a cold, snowy whiteout treatment to the scene.": "Добавляет в сцену холодный снежный эффект «белой мглы».",
"Expand LOCATION": "Развернуть панель «Место»",
"Collapse panel": "Свернуть панель",
"Pin location tray": "Закрепить панель места",
"Keep location tray open": "Держать панель места открытой",
"Search any location": "Поиск любого места",
"Navigation, voice, and visual preset controls": "Управление навигацией, голосом и визуальными пресетами",
"Language": "Язык",
"Search location by name or coordinates": "Поиск места по названию или координатам",
"Search any location...": "Поиск любого места...",
"Normal": "Обычный",
"CRT": "CRT",
"NVG": "NVG",
"FLIR": "FLIR",
"Style": "Стиль",
"STATION SITE": "САЙТ СТАНЦИИ",
"Open detailed Radio controls": "Открыть подробное управление радио",
"Previous station": "Предыдущая станция",
"Next station": "Следующая станция",
"Expand panel": "Развернуть панель",
"CONTACTS": "КОНТАКТЫ",
"Cycles the nearest contacts of whatever type you select — planes, vessels, installations. Satellites track independently.": "Перебирает ближайшие контакты выбранного типа — самолёты, суда, объекты. Спутники отслеживаются отдельно.",
"SEARCH NEARBY SITES": "ПОИСК ОБЪЕКТОВ РЯДОМ",
"Reclassify tracked contact as TR-3B": "Переклассифицировать отслеживаемый контакт как TR-3B",
"Previous filtered station": "Предыдущая отфильтрованная станция",
"PLAY": "ПУСК",
"Play selected station": "Воспроизвести выбранную станцию",
"Next filtered station": "Следующая отфильтрованная станция",
"STOP": "СТОП",
"Stop radio playback": "Остановить воспроизведение радио",
"Compact Radio controls": "Компактное управление радио",
"Context mode": "Режим контекста",
"Contact Context actions": "Действия контекста контакта",
"Available Space Missions": "Доступные космические миссии",
"LOADING 30-DAY MISSION INDEX": "ЗАГРУЗКА ИНДЕКСА МИССИЙ ЗА 30 ДНЕЙ",
"Radio playback": "Воспроизведение радио",
"Compact Radio volume": "Громкость компактного радио",
"Radio volume": "Громкость радио",
"STATION TAG": "ТЕГ СТАНЦИИ",
"DRAG TO TUNE": "ТЯНИТЕ ДЛЯ НАСТРОЙКИ",
"TAB PREVIEWS · ENTER / SPACE SELECTS": "TAB — ПРОСМОТР · ENTER / SPACE — ВЫБОР",
"Audio connects directly to the broadcaster after you press play. Your IP is visible to that broadcaster.": "После нажатия «Пуск» аудио подключается напрямую к вещателю. Ваш IP виден этому вещателю.",
"Internet radio and local SDR": "Интернет-радио и локальный SDR",
"Filter stations by station tag": "Фильтровать станции по тегу",
"CONTEXT": "КОНТЕКСТ",
"SPACE MISSIONS": "КОСМИЧЕСКИЕ МИССИИ",
"COCKPIT": "КАБИНА",
"SELECT CONTACTS TO LOAD OBSERVED / MAPPED PROXIMITY": "ВЫБЕРИТЕ КОНТАКТЫ, ЧТОБЫ ЗАГРУЗИТЬ НАБЛЮДАЕМОЕ / КАРТОГРАФИРОВАННОЕ ОКРУЖЕНИЕ",
"SELECT A MISSION TO INSPECT": "ВЫБЕРИТЕ МИССИЮ ДЛЯ ПРОСМОТРА",
"Enable Radio, then choose a globe marker or use next.": "Включите радио, затем выберите маркер на глобусе или переключите на следующую станцию.",
"ALL · DRAG THE NEEDLE": "ВСЕ · ТЯНИТЕ СТРЕЛКУ",
"SNAPS TO AVAILABLE STATIONS": "ПРИВЯЗКА К ДОСТУПНЫМ СТАНЦИЯМ",
"SELECT CONTEXT": "ВЫБЕРИТЕ КОНТЕКСТ",
"CONTACTS CONTEXT OFF": "КОНТЕКСТ КОНТАКТОВ ВЫКЛЮЧЕН",
"AVAILABLE MISSIONS": "ДОСТУПНЫЕ МИССИИ",
"Intelligence HUD (H)": "HUD разведки (H)",
"Detection Overlay (D)": "Слой детекции (D)",
"Detection overlay": "Слой детекции",
"Elastic": "Гибкое",
"Weighted": "Взвешенное",
"3D aircraft — flat icons zoomed out, 3D models up close": "3D-самолёты — издалека плоские иконки, вблизи 3D-модели",
"Proximity": "Вблизи",
"Scope — the circular viewport mask": "Прицел — круглая маска области просмотра",
"Hide UI chrome": "Скрыть элементы интерфейса",
"Bloom / Glow": "Bloom / свечение",
"Sharpening": "Повышение резкости",
"EXIT CLEAN VIEW": "ВЫЙТИ ИЗ ЧИСТОГО ВИДА",
"Return UI controls": "Вернуть управление интерфейсом",
"Detection label allocation": "Размещение меток детекции",
"3D model coverage": "Охват 3D-моделей",
"Detection label density": "Плотность меток детекции",
"Detection fade distance": "Дистанция затухания детекции",
"World-overlay fade distance outside the keyhole as a percentage of its radius": "Дистанция затухания мирового слоя за пределами маски в процентах от её радиуса",
"Detection opacity outside the keyhole": "Непрозрачность детекции за пределами маски",
"World-overlay label and card opacity beyond the fade distance": "Непрозрачность меток и карточек мирового слоя за пределами дистанции затухания",
"Scope edge feather": "Растушёвка края прицела",
"Scope edge feather as a percentage of the keyhole radius": "Растушёвка края прицела в процентах от радиуса маски",
"Bloom intensity": "Интенсивность bloom",
"Sharpen intensity": "Интенсивность резкости",
"Density": "Плотность",
"Fade": "Затухание",
"Outside": "Снаружи",
"Tactical": "Тактический",
"Operator": "Операторский",
"Minimal": "Минимальный",
"HUD layout": "Макет HUD",
"Layout": "Макет",
"Allocation": "Размещение",
"PARAMETERS": "ПАРАМЕТРЫ",
"Models": "Модели",
"Scope": "Прицел",
"Feather": "Растушёвка",
"Celestial": "Небо",
"Clean UI": "Чистый интерфейс",
"Bloom": "Bloom",
"Sharpen": "Резкость",
"Initializing photorealistic world...": "Инициализация фотореалистичного мира...",
"NEAREST": "БЛИЖАЙШАЯ",
"Drag the camera in the world: rings rotate, arrows move, handles set range/FOV": "Перетащите камеру в мире: кольца вращают, стрелки перемещают, маркеры задают дальность и угол обзора",
"Heading (compass °) — click to type": "Курс (° по компасу) — нажмите для ввода",
"Pitch (° up/down) — click to type": "Тангаж (° вверх/вниз) — нажмите для ввода",
"Horizontal FOV (°) — click to type": "Горизонтальный угол обзора (°) — нажмите для ввода",
"Range / monitor-plane distance (m) — click to type": "Дальность / расстояние до плоскости монитора (м) — нажмите для ввода",
"Mount height above ground (m) — click to type": "Высота крепления над землёй (м) — нажмите для ввода",
"North offset from catalog position (m) — click to type": "Смещение на север от позиции каталога (м) — нажмите для ввода",
"East offset from catalog position (m) — click to type": "Смещение на восток от позиции каталога (м) — нажмите для ввода",
"SAVE CAL": "СОХРАНИТЬ КАЛИБР.",
"RESET CAL": "СБРОСИТЬ КАЛИБР.",
"NEW": "НОВАЯ",
"DEL": "УДАЛ.",
"CAPTURE SHOT": "СДЕЛАТЬ КАДР",
"UPDATE SHOT": "ОБНОВИТЬ КАДР",
"START": "СТАРТ",
"EXPORT PRESETS": "ЭКСПОРТ ПРЕСЕТОВ",
"IMPORT": "ИМПОРТ",
"RUN LOG": "ЖУРНАЛ ЗАПУСКОВ",
"CALIBRATION": "КАЛИБРОВКА",
"Camera pose — click a value to type": "Поза камеры — нажмите на значение для ввода",
"SCENE SUMMARY": "СВОДКА ПО СЦЕНЕ",
"CCTV camera": "Камера CCTV",
"Scene recipe": "Рецепт сцены",
"DATA LAYERS": "СЛОИ ДАННЫХ",
"SCENES": "СЦЕНЫ",
"Close key setup": "Закрыть настройку ключей",
"SAVE KEYS": "СОХРАНИТЬ КЛЮЧИ",
"Power up the globe": "Запустите глобус",
"The globe already flies keyless. Every key below switches on another real feed — paste one and it's saved into this app's local configuration, then the server restarts itself. Server-side keys stay on this machine; Google Maps and Cesium ion run in the browser and must be provider-restricted. Keys you configured elsewhere are shown but never touched.": "Глобус уже работает без ключей. Каждый ключ ниже включает ещё один реальный поток данных — вставьте ключ, и он сохранится в локальной конфигурации приложения, после чего сервер перезапустится сам. Серверные ключи остаются на этом компьютере; Google Maps и Cesium ion работают в браузере, поэтому их ключи нужно ограничить на стороне провайдера. Ключи, настроенные в другом месте, отображаются, но не изменяются.",
"The Google Maps key buys the photorealistic planet — everything else stacks on top.": "Ключ Google Maps открывает фотореалистичную планету — всё остальное надстраивается поверх неё.",
"POWER UP": "ЗАПУСК",
"GROUND STATION · PROVIDER SETTINGS": "НАЗЕМНАЯ СТАНЦИЯ · НАСТРОЙКИ ПРОВАЙДЕРОВ",
"ESC to close": "ESC — закрыть",
"Turn off all selected data layers": "Выключить все выбранные слои данных",
"Copy share link": "Скопировать ссылку",
"Reset camera and return to full globe view": "Сбросить камеру и вернуть полный вид глобуса",
"Visible map targets": "Видимые цели на карте",
"Globe actions": "Действия с глобусом",
"NO PLACE LEFT BEHIND": "НИ ОДНА ТОЧКА НЕ ОСТАНЕТСЯ ПОЗАДИ",
"ACTIVE STYLE": "АКТИВНЫЙ СТИЛЬ",
"Choose your first view": "Выберите первый вид",
"Tip: the GEV MIC button in the dock lets you talk to the map.": "Совет: кнопка GEV MIC в доке позволяет говорить с картой.",
"Aircraft, vessels and nearby intelligence": "Самолёты, суда и разведданные поблизости",
"Launches, spacecraft and orbital context": "Пуски, космические аппараты и орбитальный контекст",
"Begin with a clean globe": "Начните с чистого глобуса",
"MISSION CONTROL · FIRST LAUNCH": "ЦЕНТР УПРАВЛЕНИЯ · ПЕРВЫЙ ЗАПУСК",
"Don't show this again": "Больше не показывать",
"ESC to dismiss": "ESC — скрыть",
"LIVE CONTACTS": "КОНТАКТЫ ОНЛАЙН",
"EXPLORE MANUALLY": "ИЗУЧИТЬ ВРУЧНУЮ",
"Celestial ring — reveal the full globe": "Небесное кольцо — показать весь глобус",
"Celestial ring — available in Normal style": "Небесное кольцо — доступно в стиле «Обычный»",
"Detection overlay: {mode}": "Слой детекции: {mode}",
"Detection overlay: off": "Слой детекции: выкл.",
"SPARSE": "РЕДКО",
"BALANCED": "УМЕРЕННО",
"DETECT": "ДЕТЕКЦИЯ",
"AI AGENT": "ИИ-АГЕНТ",
"Voice model tier — applies next session": "Уровень голосовой модели — вступит в силу со следующей сессии",
"Estimated session cost": "Оценочная стоимость сессии",
"Voice control — activate to toggle voice; hold Space to speak": "Голосовое управление — активируйте, чтобы включить или выключить голос; удерживайте Space, чтобы говорить",
"VOICE STANDBY": "ГОЛОС В ОЖИДАНИИ",
"VOICE CONTROL": "ГОЛОСОВОЕ УПРАВЛЕНИЕ",
"Hold Space to speak · tap Space to activate focused controls": "Удерживайте Space, чтобы говорить · нажатие Space активирует элемент в фокусе",
"VOICE SYSTEM ERROR": "ОШИБКА ГОЛОСОВОЙ СИСТЕМЫ",
"DISMISS": "СКРЫТЬ",
"Check microphone permission and network access, then try again.": "Проверьте разрешение на микрофон и доступ к сети, затем попробуйте снова.",
"Release Space to send": "Отпустите Space, чтобы отправить",
"Hold Space to talk": "Удерживайте Space, чтобы говорить",
"Ask or command": "Спросите или дайте команду",
"WebRTC microphone support unavailable": "Поддержка микрофона WebRTC недоступна",
"Requesting microphone": "Запрос доступа к микрофону",
"Voice off": "Голос выключен",
"VOICE UNAVAILABLE": "ГОЛОС НЕДОСТУПЕН",
"VOICE ACTIVE": "ГОЛОС АКТИВЕН",
"Voice session could not be started.": "Не удалось запустить голосовую сессию.",
"CONNECTING": "ПОДКЛЮЧЕНИЕ",
"LISTENING": "СЛУШАЮ",
"EXECUTING": "ВЫПОЛНЕНИЕ",
"ERROR": "ОШИБКА",
"{tier} applies next session": "{tier} вступит в силу со следующей сессии",
"Session ended — cost cap {cost}": "Сессия завершена — лимит стоимости {cost}",
"Next session: {pendingId} — this session stays on {modelId}": "Следующая сессия: {pendingId} — текущая остаётся на {modelId}",
"Voice model: {pendingId} — click to switch to {target}; applies next session": "Голосовая модель: {pendingId} — нажмите, чтобы переключиться на {target}; вступит в силу со следующей сессии",
"Estimated session cost on {modelId} — {responses} response(s). Warns at {warn}, ends the session at {cap}.": "Оценочная стоимость сессии на {modelId} — ответов: {responses}. Предупреждение при {warn}, завершение сессии при {cap}.",
"Radio did not start": "Не удалось запустить радио",
"Running command": "Выполнение команды"
}
-128
View File
@@ -1,128 +0,0 @@
// Markup coverage gate (phase 2): every data-i18n* attribute in the static
// application markup must name a key that resolves in EVERY shipped catalog
// via the real catalog builder — a renamed or dropped catalog key can no
// longer strand a static extraction silently behind the key-itself fallback.
// index.html is now assembled from src/ui/templates/*.html by
// build/application-html.js before Vite processes it, so the gate expands the
// same templates the build serves and scans that assembled markup. Regex
// parsing is deliberate: no DOM dependency in unit tests.
import { test } from 'node:test';
import assert from 'node:assert/strict';
import { readFileSync } from 'node:fs';
import { fileURLToPath } from 'node:url';
import { getCatalog } from './index.js';
import { CATALOG_LOCALES, availableLocales } from './locale.js';
import { expandApplicationHtml } from '../../build/application-html.js';
const INDEX_HTML = new URL('../../index.html', import.meta.url);
const UI_JS = new URL('../../src/ui/applicationShell.js', import.meta.url);
// The four spellings applyDocumentTranslations() knows about. Anything else
// (a typo like data-i18n-lable) must fail here, not silently never apply.
const I18N_ATTRIBUTE_PATTERN = /data-i18n(?:-title|-aria-label|-placeholder)?="([^"]+)"/g;
const KNOWN_ATTRIBUTE_NAMES = new Set([
'data-i18n',
'data-i18n-title',
'data-i18n-aria-label',
'data-i18n-placeholder',
]);
const html = expandApplicationHtml(readFileSync(INDEX_HTML, 'utf8'));
const references = [...html.matchAll(I18N_ATTRIBUTE_PATTERN)].map((match) => match[1]);
test('index.html carries static i18n references', () => {
assert.ok(references.length > 0, 'no data-i18n* attributes found — extraction missing?');
});
test('index.html sources its body from the application templates', () => {
const raw = readFileSync(INDEX_HTML, 'utf8');
assert.ok(raw.includes('<!-- gev:template '),
'index.html must keep the gev:template markers the build expands');
assert.equal((raw.match(/data-i18n/g) || []).length, 0,
'data-i18n markup belongs in src/ui/templates/*.html, not the marker shell');
});
test('every data-i18n* attribute value resolves in every shipped catalog', () => {
const catalogs = Object.fromEntries(CATALOG_LOCALES.map((locale) => [locale, getCatalog(locale)]));
for (const locale of CATALOG_LOCALES) {
assert.ok(catalogs[locale], `catalog builder produced the ${locale} locale`);
}
const missing = references.filter((key) => (
CATALOG_LOCALES.some((locale) => !(key in catalogs[locale]))
));
assert.deepEqual(
[...new Set(missing)],
[],
'static markup references keys absent from a catalog (translation would fall back or render the key)',
);
});
test('no unknown data-i18n* attribute spelling sneaks past the application pass', () => {
const stray = [...html.matchAll(/(data-i18n[a-z-]*)="/g)]
.map((match) => match[1])
.filter((name) => !KNOWN_ATTRIBUTE_NAMES.has(name));
assert.deepEqual(
[...new Set(stray)],
[],
'applyDocumentTranslations() only applies the four known attributes; a fifth spelling is dead markup',
);
});
test('attribute values are well-formed catalog keys', () => {
for (const key of references) {
assert.match(key, /^(shell|cockpit|layers|setup)\.[a-z][a-zA-Z0-9]*(\.[a-zA-Z0-9]+)*$/, `malformed key: ${key}`);
}
});
test('the dock language switch keeps a static group container with runtime-rendered buttons', () => {
const selector = html.match(/<div class="dock-locale-switch"[\s\S]*?<\/div>/);
assert.ok(selector, 'the locale switch group is missing from the control-panel tray');
assert.match(selector[0], /data-i18n-aria-label="shell\.locale\.groupAriaLabel"/);
// Buttons are no longer static: ui.js _initLocaleSelector() renders one per
// locale in the configured pair (GEV_DEFAULT_LOCALE / GEV_SECONDARY_LOCALE).
assert.doesNotMatch(
selector[0],
/dock-locale-btn/,
'static selector buttons must move to the runtime renderer so the configured pair shapes the switch',
);
// Markup-only contract: no listener may attach from markup.
assert.doesNotMatch(selector[0], / onclick| onsubmit| javascript:/i);
});
test('every offered locale has a shell.locale.<code>.ariaLabel in every catalog; the replaced family stays deleted', () => {
// The runtime renderer reads shell.locale.<code>.ariaLabel for every locale
// availableLocales() can yield under any configuration — i.e. every shipped
// catalog locale — and it must exist in every catalog.
for (const catalogLocale of CATALOG_LOCALES) {
const catalog = getCatalog(catalogLocale);
for (const code of CATALOG_LOCALES) {
assert.ok(
catalog[`shell.locale.${code}.ariaLabel`],
`${catalogLocale} catalog is missing shell.locale.${code}.ariaLabel for the runtime selector`,
);
}
assert.equal(catalog['shell.locale.english.ariaLabel'], undefined,
'the replaced phase-2 english.ariaLabel key stays deleted');
assert.equal(catalog['shell.locale.spanish.ariaLabel'], undefined,
'the replaced phase-2 spanish.ariaLabel key stays deleted');
}
// Default configuration pins the pair the shipped build offers: en-only
// while English is the only shipped catalog (the selector renders a single
// EN button; each secondary-locale PR widens this pin).
assert.deepEqual([...availableLocales()], ['en']);
});
test('ui.js _initLocaleSelector renders the configured pair (runtime contract)', () => {
const source = readFileSync(UI_JS, 'utf8');
const start = source.indexOf('_initLocaleSelector() {');
assert.ok(start >= 0, '_initLocaleSelector method not found in src/ui.js');
const body = source.slice(start, source.indexOf('\n }\n', start));
assert.ok(body.length > 0, '_initLocaleSelector body not extracted');
assert.match(body, /availableLocales\(\)/, 'iterates the resolved pair, not a hardcoded EN|ES');
assert.match(body, /shell\.locale\.\$\{locale\}\.ariaLabel/, 'aria-labels come from the locale key family');
assert.match(body, /toUpperCase\(\)/, 'labels are uppercase locale codes');
assert.match(body, /aria-pressed/, 'pressed state is synced');
assert.match(body, /persistLocaleAndReload/, 'clicks persist and reload');
assert.match(body, /dock-locale-switch/, 'renders into the static group container');
});
-83
View File
@@ -1,83 +0,0 @@
// Repair-pass anchors (extraction correctness).
//
// en behavior must stay byte-identical: the values added for the director
// status corpus, the keySetup dev surface, and the map-source wiring are
// pinned here to the exact literals the code rendered before extraction.
// Cross-module anchors (keySetupCore registry) catch catalog/registry drift
// in either direction. The locale-scoped CCTV wrap rules and per-locale value
// pins live in their locale PRs (es first); this file pins the English
// contract plus the pixel-identical English layout.
import { test } from 'node:test';
import assert from 'node:assert/strict';
import { readFileSync } from 'node:fs';
import { getCatalog } from './index.js';
import { KEY_SETUP_KEYS, keySetupRequirement } from '../keySetupCore.mjs';
const en = getCatalog('en');
test('director status corpus keeps the pre-extraction English literals byte-identical', () => {
const expected = {
'setup.scenes.status.captureCameraNotReady': 'Cannot capture shot: camera not ready',
'setup.scenes.status.shotTitleDefault': 'Shot {n}',
'setup.scenes.status.captured': 'Captured: {scene} / {shot}',
'setup.scenes.status.selectShotFirst': 'Select a shot first',
'setup.scenes.status.updated': 'Updated: {scene} / {shot}',
'setup.scenes.status.deleteShotConfirm': 'Delete shot "{shot}"?',
'setup.scenes.status.loaded': 'Loaded: {scene} / {shot}',
'setup.scenes.status.cameraUnavailable': 'Camera unavailable — exit cockpit first',
'setup.scenes.status.noShotsToRun': 'No shots to run',
'setup.scenes.status.runningShot': 'Running {index}/{total}: {scene} / {shot}',
'setup.scenes.status.runComplete': 'Scene run complete',
'setup.scenes.status.runError': 'Error: {message}',
'setup.scenes.status.contextExitFailed': 'Could not exit {mode} — scene layers may be refused',
};
for (const [key, value] of Object.entries(expected)) {
assert.equal(en[key], value, `${key} drifted from the removed English literal`);
}
});
test('setup.keySetup.unlocks.* en values equal the keySetupCore registry copy', () => {
for (const entry of KEY_SETUP_KEYS) {
const key = `setup.keySetup.unlocks.${entry.id}`;
assert.equal(en[key], entry.unlocks, `${key} drifted from KEY_SETUP_KEYS unlocks`);
}
assert.equal(en['setup.keySetup.requirement'], 'Needs {envVars} — add it in Provider Settings');
assert.equal(
keySetupRequirement('cesium-ion'),
'Needs CESIUM_ION_TOKEN — add it in Provider Settings',
'en requirement sentence must stay byte-identical (pinned by keySetupCore.test.mjs)',
);
});
test('map-source keys match the static markup pinned by mapStackChips.test.mjs', () => {
assert.equal(en['cockpit.presets.mapSourceLabel'], 'MAP SOURCE');
assert.equal(en['cockpit.presets.mapSourceChipsAriaLabel'], 'Map source');
});
test('the seven redundant layers.radio transport seeds stay deleted', () => {
const deleted = [
'layers.radio.pause',
'layers.radio.resume',
'layers.radio.playNearestAria',
'layers.radio.pauseSelectedAria',
'layers.radio.pauseNearestAria',
'layers.radio.resumeSelectedAria',
'layers.radio.resumeNearestAria',
];
for (const key of deleted) {
assert.equal(en[key], undefined, `${key} was removed by the repair pass`);
}
});
test('the English CCTV control rows stay unwrapped: no locale-scoped wrap rule ships ahead of its locale', () => {
// Locale wrap rules (html[lang='…'] .cctv-controls { flex-wrap: wrap }) are
// added one per locale PR, each with a measured-width justification — never
// speculatively. Until then the base rule must stay unwrapped so English
// pixels are unchanged, and no html[lang] override may exist.
const css = readFileSync(new URL('../../src/ui/styles/cctv.css', import.meta.url), 'utf8');
const baseStart = css.indexOf('.cctv-controls {');
const baseBody = css.slice(baseStart, css.indexOf('}', baseStart));
assert.ok(!baseBody.includes('flex-wrap'), 'base .cctv-controls must stay unwrapped (EN pixel-identical)');
assert.ok(!/html\[lang=/i.test(css), 'no locale-scoped CCTV rule may ship before its locale does');
});