mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-04 10:24:02 +00:00
Three-model review (astra, sol, fable), round 3: 17 of 18 findings
applied (some in own wording, one in part); "Missões espac." rejected.
- pt: layer cards «{label}: camada ativada/desativada», pointer and
Directions toasts name «A ferramenta "{owner}"», counters after a
colon where the count can be 1, traffic «sem dados de fluxo» and
«Fluxo: {percent}% cob», «limite de requisições atingido», FECHAR,
ANT., PREDEF. VISUAIS, quoted "Nível da rua", infinitive tooltips,
and more (see docs/translations/pt.md).
- CCTV summary line localizes its CAL, SRC and CONTEXT values through
existing catalog keys (all locales); codes stay underneath.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
39 lines
1.2 KiB
JavaScript
39 lines
1.2 KiB
JavaScript
// The CCTV summary line names the CAL badge, the source kind and the view
|
|
// band in the page language; unknown codes stay as uppercase codes.
|
|
import assert from 'node:assert/strict';
|
|
import test from 'node:test';
|
|
import { setLocale } from '../../i18n/index.js';
|
|
import {
|
|
summaryCalLabel,
|
|
summarySourceLabel,
|
|
summaryViewBandLabel,
|
|
} from './presentation.js';
|
|
|
|
function inLocale(locale, run) {
|
|
setLocale(locale);
|
|
try {
|
|
return run();
|
|
} finally {
|
|
setLocale('en');
|
|
}
|
|
}
|
|
|
|
test('English keeps the summary codes', () => {
|
|
assert.equal(summaryCalLabel('raw-prior'), 'RAW PRIOR');
|
|
assert.equal(summarySourceLabel('image'), 'IMAGE');
|
|
assert.equal(summarySourceLabel('hls'), 'HLS');
|
|
assert.equal(summaryViewBandLabel('street'), 'STREET');
|
|
assert.equal(summaryViewBandLabel('none'), 'NONE');
|
|
});
|
|
|
|
test('Portuguese summary values are translated', () => {
|
|
inLocale('pt', () => {
|
|
assert.equal(summaryCalLabel('raw-prior'), 'ESTIMATIVA BRUTA');
|
|
assert.equal(summaryCalLabel('calibrated'), 'CALIBRADA');
|
|
assert.equal(summarySourceLabel('IMAGE'), 'IMAGEM');
|
|
assert.equal(summarySourceLabel('mjpeg'), 'MJPEG');
|
|
assert.equal(summaryViewBandLabel('street'), 'RUA');
|
|
assert.equal(summaryViewBandLabel('city'), 'CIDADE');
|
|
});
|
|
});
|