mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-05 19:04:02 +00:00
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:
1 parent
e48841072d
commit
b0e28f97d9
4 files changed
+40
-10
No files matched your search
@@ -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');
|
||||
}
|
||||
});
|
||||
}
|
||||
Reference in new issue
Block a user