1
0
mirror of https://github.com/laurent22/joplin.git synced 2024-11-24 08:12:24 +02:00

Desktop: Fixes #10058: OCR does not start when German language is selected

This commit is contained in:
Laurent Cozic 2024-03-05 16:36:27 +00:00
parent d9a16b5c0f
commit a1cea6776f
2 changed files with 12 additions and 1 deletions

View File

@ -1,4 +1,4 @@
import { closestSupportedLocale, parsePluralForm, setLocale, _n } from './locale';
import { closestSupportedLocale, parsePluralForm, setLocale, _n, toIso639 } from './locale';
describe('locale', () => {
@ -91,4 +91,14 @@ describe('locale', () => {
}
});
test.each([
['en_GB', 'eng'],
['en', 'eng'],
['de', 'deu'],
['fr_FR', 'fra'],
])('should convert to ISO-639', (input, expected) => {
const actual = toIso639(input);
expect(actual).toBe(expected);
});
});

View File

@ -213,6 +213,7 @@ const iso639Map_ = [
['cos', 'co'],
['cre', 'cr'],
['dan', 'da'],
['deu', 'de'],
['div', 'dv'],
['dzo', 'dz'],
['eng', 'en'],