i18n: translate the SDR messages from the latest main

Seek stopped, the decoder overload stops and the stalled USB transfer
now follow the UI language.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
German KhokhlovandClaude Opus 5.5 committed 2026-10-16 21:29:28 +04:00
1 parent e48841072d
commit b0e28f97d9
4 files changed
+40 -10

No files matched your search

+22
View File
@@ -56,3 +56,25 @@ test('FM seek messages keep their English wording and decimal point', async () =
assert.ok(texts.includes('Scanning 98.5 MHz…'));
assert.match(texts.at(-1), /^Found 98\.8 MHz · \d+\.\d dB$/);
});
for (const locale of ['es', 'ru']) {
test(`a failed seek tune and a decoder overload are localized in ${locale}`, async () => {
setLocale(locale);
try {
const { c } = makeController();
c.tuneFm = async () => false;
assert.equal(await c.seekFm(1), null);
assert.ok(c.state.seekMessage);
assert.notEqual(c.state.seekMessage, 'Seek stopped');
c.stop = async () => {};
for (const reason of ['startup', 'stalled', 'backlog']) {
c._device = {};
c._overload(reason);
assert.doesNotMatch(c.state.message, /SDR decoder|receiver stopped/);
}
} finally {
setLocale('en');
}
});
}