mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-04 18:34:02 +00:00
Fixes the 51 P0–P2 findings from the full review of the i18n branch and the issues found while checking every new string on screen in ru and es. - Translate errors and statuses that still reached ru/es in English: feed and tile errors, provider statuses, the ALPR chip, the traffic mode chip, voice plan step labels, fire feed values, receiver bands, scene save reasons and the Cesium attribution link. - Show preset city names in the UI language (src/ui/placeNames.js); data and everything sent to the model stay English. - Share layer names between the layer panel, HUD and voice card (src/ui/layerNames.js). - Keep long ru/es strings whole: voice card error lines, analyst titles, the voice tier status, the Nepal evidence button, the ALPR retry chip. English layout is unchanged. - Ask before a language switch drops unsaved work. - Catalog fixes: glossary terms (пуск, пресет), gender agreement and consistent "peticiones" in es, fewer calques in both languages. - Fix English text that was itself wrong (e.g. "Exit cockpit to fly to a weather", raw tool ids in voice plan steps). Catalogs: es/ru 2535 messages each, complete. Co-Authored-By: Claude Opus 5.5 <[email protected]>
32 lines
1.3 KiB
JavaScript
32 lines
1.3 KiB
JavaScript
// The Street Level meta-line test must not depend on the system locale: the
|
||
// code formats the count in the app language (formatNumber), so a contributor
|
||
// whose terminal sets LANG=de_DE or es_ES must see the same green run as CI's
|
||
// C.UTF-8. Runs the presentation test file under three process locales.
|
||
import { test } from 'node:test';
|
||
import assert from 'node:assert/strict';
|
||
import { spawnSync } from 'node:child_process';
|
||
import { fileURLToPath } from 'node:url';
|
||
import path from 'node:path';
|
||
|
||
const here = path.dirname(fileURLToPath(import.meta.url));
|
||
const target = path.join(here, 'streetLevelPresentation.test.mjs');
|
||
|
||
for (const locale of ['de_DE.UTF-8', 'es_ES.UTF-8', 'C.UTF-8']) {
|
||
test(`streetLevelPresentation tests pass under LC_ALL=${locale}`, () => {
|
||
// Drop the node:test child markers so the nested run is a real top-level run.
|
||
const env = { ...process.env, LC_ALL: locale, LANG: locale };
|
||
delete env.NODE_TEST_CONTEXT;
|
||
delete env.NODE_TEST_WORKER_ID;
|
||
const result = spawnSync(process.execPath, ['--test', target], {
|
||
encoding: 'utf8',
|
||
env,
|
||
});
|
||
const failed = result.stdout.match(/^ℹ fail (\d+)/m)?.[1] ?? '?';
|
||
assert.equal(
|
||
result.status,
|
||
0,
|
||
`exit status ${result.status}, ${failed} failing test(s) under ${locale}\n${result.stdout.slice(-700)}`,
|
||
);
|
||
});
|
||
}
|