mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-16 08:12:24 +00:00
i18n: fix the final pre-merge review findings
Fixes the P1 and the confirmed P2 findings of the final review of the
i18n branch.
- CI: the air-quality model no longer imports i18n (portable module),
so check:boundaries passes again.
- Air quality layer: named in the layer panel, HUD and voice; its
Weather card, bands and errors translate. A test keeps the layer-name
table in step with the layer registry.
- Layer statuses that still reached ru/es in English: GNSS, CelesTrak,
Transit loading and feed errors, launches, perimeters, ALPR, ECCC,
wind "field unavailable", Local ADS-B streaming lines.
- Voice and HUD: preset ids show city names ("Fly to San Francisco"),
the HUD city translates, cockpit refusals cover frame, aircraft and
satellite; empty Transit notes translate on the analyst card.
- tn() keeps a caller's formatted count ("12,345 map objects").
- Cyber HUD: the language button no longer covers the bottom-right
card or the cockpit position readout.
- CCTV buttons wrap only in non-English locales; English layout matches
main again.
- Switching language asks first when Provider Settings holds unsaved
keys.
Catalogs: es/ru 2611 messages each, complete.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
fada8b161b
commit
3adce33cc6
43 files changed
+1350
-97
No files matched your search
@@ -0,0 +1,33 @@
|
||||
import assert from 'node:assert/strict';
|
||||
import test from 'node:test';
|
||||
import { APPLICATION_LAYER_METADATA } from '../app/constructCatalog.js';
|
||||
import { LAYER_NAME_KEYS, PANEL_LABEL_KEYS } from './layerNames.js';
|
||||
|
||||
// Layers whose module name is a proper name and stays as it is in every
|
||||
// language: the Bhote Koshi pair belong to a scripted scene.
|
||||
const UNTRANSLATED_NAMES = new Set(['bhote-koshi-2026', 'bhote-koshi-locator']);
|
||||
|
||||
const catalogIds = APPLICATION_LAYER_METADATA.map((layer) => layer.id);
|
||||
|
||||
test('every catalog layer has a translatable name', () => {
|
||||
const missing = catalogIds.filter(
|
||||
(id) =>
|
||||
!UNTRANSLATED_NAMES.has(id) &&
|
||||
!Object.hasOwn(LAYER_NAME_KEYS, id) &&
|
||||
!Object.hasOwn(PANEL_LABEL_KEYS, id),
|
||||
);
|
||||
assert.deepEqual(
|
||||
missing,
|
||||
[],
|
||||
'add the layer to LAYER_NAME_KEYS in src/ui/layerNames.js',
|
||||
);
|
||||
});
|
||||
|
||||
test('the name tables list only catalog layers', () => {
|
||||
const unknown = [
|
||||
...Object.keys(LAYER_NAME_KEYS),
|
||||
...Object.keys(PANEL_LABEL_KEYS),
|
||||
...UNTRANSLATED_NAMES,
|
||||
].filter((id) => !catalogIds.includes(id));
|
||||
assert.deepEqual(unknown, []);
|
||||
});
|
||||
Reference in new issue
Block a user