Add test for localized spoken language name

This commit is contained in:
Eric Rosenbaum 2019-10-31 14:58:45 -04:00
parent 94e2478a10
commit 64eace3b90

View file

@ -34,3 +34,11 @@ test('get the extension locale for a supported locale that differs', t => {
t.strictEqual(ext.getCurrentLanguage(), 'ja'); t.strictEqual(ext.getCurrentLanguage(), 'ja');
t.end(); t.end();
}); });
test('use localized spoken language name in place of localized written language name', t => {
ext.getEditorLanguage = () => 'es';
const languageMenu = ext.getLanguageMenu();
const localizedNameForChineseInSpanish = languageMenu.find(el => el.value === 'zh-cn').text;
t.strictEqual(localizedNameForChineseInSpanish, 'Chino (Mandarín)'); // i.e. should not be 'Chino (simplificado)'
t.end();
});