Skip to content

Commit

Permalink
Re-enable enhanced localization tests
Browse files Browse the repository at this point in the history
  • Loading branch information
dbaeumer committed Jul 7, 2021
1 parent 4f11327 commit c9aea49
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions test/smoke/src/areas/workbench/localization.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,14 @@ export function setup(opts: minimist.ParsedArgs) {
}
return;
} else {
// todo@dirkb enable after 1.58 has shipped.
// const localeInfo = await app.workbench.localization.getLocaleInfo();
// if (localeInfo.locale === undefined || localeInfo.locale.toLowerCase() !== 'de') {
// throw new Error(`The requested locale for VS Code was not German. The received value is: ${localeInfo.locale === undefined ? 'not set' : localeInfo.locale}`);
// }

// if (localeInfo.language.toLowerCase() !== 'de') {
// throw new Error(`The UI language is not German. It is ${localeInfo.language}`);
// }
const localeInfo = await app.workbench.localization.getLocaleInfo();
if (localeInfo.locale === undefined || localeInfo.locale.toLowerCase() !== 'de') {
throw new Error(`The requested locale for VS Code was not German. The received value is: ${localeInfo.locale === undefined ? 'not set' : localeInfo.locale}`);
}

if (localeInfo.language.toLowerCase() !== 'de') {
throw new Error(`The UI language is not German. It is ${localeInfo.language}`);
}

if (result.open.toLowerCase() !== 'öffnen' || result.close.toLowerCase() !== 'schließen' || result.find.toLowerCase() !== 'finden') {
throw new Error(`Received wrong German localized strings: ${JSON.stringify(result, undefined, 0)}`);
Expand Down

0 comments on commit c9aea49

Please sign in to comment.