i18n: fix the LGTM review findings and tidy the branch texts

- i18n scanner: lastError sink, no false sinks on defaults and ternaries
- shared src/i18n/marker.js for modules that only mark strings
- wind field messages move to wind/fields.js; CITY_POIS imports from cityPois.js
- drop review IDs, change history and stale references from comments and docs

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
German KhokhlovandClaude Opus 5.5 committed 2026-10-16 21:00:28 +04:00
1 parent 0ed05568f7
commit 20f4cf3763
178 files changed
+918 -948

No files matched your search

+5 -10
View File
@@ -70,17 +70,13 @@
margin-bottom: 0;
}
/* Spanish labels run ~25% longer than English and overflow the nowrap
.scene-btn rows inside the fixed-width CCTV panel (e.g. ENFOCAR ·
COBERTURA DESACTIVADA · AUTO HOP DESACTIVADO). Let the rows wrap under
es only; the English layout stays pixel-identical. */
/* Spanish labels overflow the nowrap .scene-btn row of the fixed-width
panel; wrap the row under es only, English stays as is. */
html[lang='es'] .cctv-controls {
flex-wrap: wrap;
}
/* A translated label longer than its button wraps inside the button instead
of running past the panel edge. English is excluded so its labels (AUTO HOP
OFF) stay on one line. */
/* A label longer than its button wraps inside it, not past the panel edge. */
html:not([lang='en']) .cctv-controls .scene-btn {
white-space: normal;
overflow-wrap: break-word;
@@ -389,9 +385,8 @@ html:not([lang='en']) .cctv-controls .scene-btn {
text-shadow: 0 0 10px rgba(0, 212, 255, 0.18);
}
/* Longer translated labels and units: tighter calibration chips keep the
seven values to two rows so SAVE / RESET stay in view, and the camera
select uses the compact mono face. English keeps its original look. */
/* Tighter calibration chips keep the seven values to two rows, so
SAVE / RESET stay in view. */
html:not([lang='en']) .cctv-cal-readout {
gap: 4px;
}
+2 -4
View File
@@ -788,10 +788,8 @@ html:not([lang='en']) .panel-collapse-btn {
}
/* One label column across the Display rows: --pp-label-chars is the longest
label of the active language (set by applicationShell), and the labels are
monospace, so every slider track starts at the same x whatever the
language. 0.125em is the 1px letter-spacing at 8px. English keeps its
own label widths. */
label of the active language (set in applicationShell.js); the labels are
monospace. 0.125em is the 1px letter-spacing at 8px. */
html:not([lang='en']) .pp-slider-row > .pp-slider-mini-label {
flex: 0 0 auto;
min-width: calc(var(--pp-label-chars, 0) * (1ch + 0.125em));
+16 -17
View File
@@ -1,7 +1,6 @@
// K-44 (+ refront-opus-1): layout rules written for long translations must not change the
// English rendering ("English renders as before"). Every rule below is read
// from the stylesheet without a `html:not([lang='en'])` guard, so it applies
// to English too; the expected values are the ones on main (9beadbda).
// Layout rules written for long translations must not change the English
// rendering: every rule checked here has no `html:not([lang='en'])` guard,
// so it applies to English too.
import { test } from 'node:test';
import assert from 'node:assert/strict';
import { readFileSync } from 'node:fs';
@@ -33,7 +32,7 @@ function declaration(block, prop) {
return m ? m[1].replace(/\s+/g, ' ').trim() : undefined;
}
test('K-44: layer status chip keeps its English width (82px)', () => {
test('layer status chip keeps its English width (82px)', () => {
const rules = unguardedRules(
css('radio.css'),
`.data-toggle-btn.feed-loading, .data-toggle-btn.feed-degraded,
@@ -44,14 +43,14 @@ test('K-44: layer status chip keeps its English width (82px)', () => {
assert.equal(declaration(rules[0], 'min-width'), '82px');
});
test('K-44: Directions steps keep one line with an ellipsis in English', () => {
test('Directions steps keep one line with an ellipsis in English', () => {
const [rule] = unguardedRules(css('radio.css'), '.data-row-list-text');
assert.ok(rule);
assert.equal(declaration(rule, 'white-space'), 'nowrap');
assert.equal(declaration(rule, 'text-overflow'), 'ellipsis');
});
test('K-44: count-line layout is not reachable from an unguarded selector', () => {
test('count-line layout is not reachable from an unguarded selector', () => {
const source = css('radio.css');
assert.equal(
unguardedRules(source, '.data-toggle-row--count-line .data-count').length,
@@ -59,7 +58,7 @@ test('K-44: count-line layout is not reachable from an unguarded selector', () =
);
});
test('K-44: weather status line keeps its fixed English height', () => {
test('weather status line keeps its fixed English height', () => {
const [rule] = unguardedRules(
css('weather.css'),
".weather-card [data-line-id='status']",
@@ -68,7 +67,7 @@ test('K-44: weather status line keeps its fixed English height', () => {
assert.equal(declaration(rule, 'height'), '1.45em');
});
test('K-44: cockpit number separators keep the English cell width', () => {
test('cockpit number separators keep the English cell width', () => {
assert.equal(
unguardedRules(css('cockpit.css'), '.cockpit-roll-token.is-separator')
.length,
@@ -76,7 +75,7 @@ test('K-44: cockpit number separators keep the English cell width', () => {
);
});
test('K-44: Bhote Koshi callout keeps its English footer layout', () => {
test('Bhote Koshi callout keeps its English footer layout', () => {
const source = css('bhote-koshi.css');
const [strong] = unguardedRules(
source,
@@ -87,7 +86,7 @@ test('K-44: Bhote Koshi callout keeps its English footer layout', () => {
assert.equal(declaration(link, 'grid-row'), '1 / span 2');
});
test('K-44: SCENES actions stay on one line in English (refront-opus-1)', () => {
test('SCENES actions stay on one line in English', () => {
assert.equal(
unguardedRules(css('scenes.css'), '#scene-panel .scene-controls .scene-btn')
.length,
@@ -97,7 +96,7 @@ test('K-44: SCENES actions stay on one line in English (refront-opus-1)', () =>
assert.equal(declaration(select, 'white-space'), undefined);
});
test('K-44: Display and parameter rows keep their English layout', () => {
test('Display and parameter rows keep their English layout', () => {
const source = css('controls.css');
assert.equal(
unguardedRules(source, '.pp-slider-row > .pp-slider-mini-label').length,
@@ -110,7 +109,7 @@ test('K-44: Display and parameter rows keep their English layout', () => {
assert.equal(declaration(color, 'flex'), '0 0 74px');
});
test('K-44: weather setting rows keep the 56px English label column', () => {
test('weather setting rows keep the 56px English label column', () => {
const source = css('weather.css');
assert.equal(unguardedRules(source, '.rail-card-settings').length, 0);
const [row] = unguardedRules(source, '.rail-card-setting');
@@ -120,14 +119,14 @@ test('K-44: weather setting rows keep the 56px English label column', () => {
);
});
test('K-44: cockpit brief controls keep their English sizes', () => {
test('cockpit brief controls keep their English sizes', () => {
const source = css('cockpit.css');
const [auto] = unguardedRules(source, '#cockpit-brief-auto');
assert.equal(declaration(auto, 'width'), '50px');
assert.equal(unguardedRules(source, '.cockpit-brief-actions > *').length, 0);
});
test('K-44: the count-line class is set only outside English', async () => {
test('the count-line class is set only outside English', async () => {
const { setLocale } = await import('../../i18n/index.js');
const { LayerPanel } = await import('../layerPanel.js');
const classes = () => {
@@ -153,7 +152,7 @@ test('K-44: the count-line class is set only outside English', async () => {
}
});
test('K-44: Recent Imagery readout keeps its English layout', () => {
test('Recent Imagery readout keeps its English layout', () => {
const source = css('recent-imagery.css');
const one = (selector) => {
const rules = unguardedRules(source, selector);
@@ -211,7 +210,7 @@ test('K-44: Recent Imagery readout keeps its English layout', () => {
assert.equal(declaration(swap, 'min-width'), undefined);
});
test('N-13: CCTV control buttons stay on one line in English', () => {
test('CCTV control buttons stay on one line in English', () => {
assert.equal(
unguardedRules(css('cctv.css'), '.cctv-controls .scene-btn').length,
0,
+3 -4
View File
@@ -362,10 +362,9 @@ html:not([lang='en'])
color: var(--text-secondary);
font-style: italic;
}
/* In a translation the slot rows share the bar's columns (subgrid), so the
tag column fits the longest tag in either row and both rows stay aligned.
A translated slot line (date · source · resolution · state) is longer:
let it take a second line rather than cut off the state at the end. */
/* The slot rows share the bar's columns (subgrid), so the tag column fits
the longest tag and both rows align; a long slot line (date · source ·
resolution · state) takes a second line instead of losing the state. */
html:not([lang='en']) .recent-imagery-readout .ri-selection {
grid-template-columns: minmax(44px, max-content) minmax(0, 1fr) 22px;
column-gap: 6px;
+6 -12
View File
@@ -163,10 +163,16 @@
outline: none;
}
/* A translated scene name needs the width: the select takes its own row,
NEW / DEL share the next one. */
html:not([lang='en']) #scene-select {
flex: 1 1 100%;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
font-family: var(--font-mono);
font-size: 10px;
letter-spacing: 0.04em;
}
/* A translated action longer than its button wraps inside the button instead
@@ -468,15 +474,3 @@ html:not([lang='en']) #scene-panel .scene-controls .scene-btn {
.director-sharing-dialog::backdrop {
background: rgba(0, 8, 14, 0.65);
}
html:not([lang='en']) #scene-select {
font-family: var(--font-mono);
font-size: 10px;
letter-spacing: 0.04em;
}
/* A translated scene name needs the width: the select takes its own row and
NEW / DELETE share the next one. */
html:not([lang='en']) #scene-select {
flex: 1 1 100%;
}
+1 -2
View File
@@ -216,8 +216,7 @@ button.sl-status:focus-visible {
display: none;
}
/* Longer translations: rather than squeeze the hint into a narrow column
beside the button, put the button on its own line when both do not fit. */
/* When the hint and the button do not both fit, the button takes its own line. */
html:not([lang='en']) .sl-meta-row {
flex-wrap: wrap;
}
+8 -12
View File
@@ -83,14 +83,11 @@
display: none;
}
/* The dock heading row is only as wide as the voice column, so the cost
cluster keeps its size and the state label gives way: a long translated
state (ПОДКЛЮЧЕНИЕ, CONECTANDO) ends in an ellipsis instead of pushing the
cost past the card edge. The kicker already collapses to zero width here;
taking it out of the row returns its gap to the state label. The row also
reaches left over the gutter beside the mic ring: at heading height the
ring has already curved away. English fits as it is, so this applies to
the other languages only. */
/* The heading row is only as wide as the voice column: the cost cluster
keeps its size and a long state (ПОДКЛЮЧЕНИЕ, CONECTANDO) ends in an
ellipsis. Dropping the kicker returns its gap to the state label; the
negative margin reaches over the gutter beside the mic ring, which has
curved away at heading height. */
html:not([lang='en']) #command-dock .gev-voice-heading {
gap: 0.2rem;
margin-left: -0.6rem;
@@ -123,10 +120,9 @@ html:not([lang='en']) #command-dock .gev-voice-cost-value {
letter-spacing: 0;
}
/* Live hints ("Ask or command", "Requesting microphone") and the tier switch
("СТАНДАРТ — со следующей сессии") run longer in other languages; give them
a second line from the spare space under the readout, without the tracking
that would push the tier line onto a third, rather than cutting them. */
/* Live hints and the tier switch ("СТАНДАРТ — со следующей сессии") run
longer: a second line from the spare space under the readout, with no
tracking so the tier line does not need a third. */
html:not([lang='en'])
#command-dock
#gev-voice-control:is(