Use localized language name when available

This commit is contained in:
Ramya Achutha Rao 2018-05-31 15:49:08 -07:00
parent 9ce14ae424
commit 549c1a1ba0

View file

@ -159,7 +159,7 @@ export class LocalizationWorkbenchContribution extends Disposable implements IWo
TPromise.join([this.galleryService.getManifest(extensionToFetchTranslationsFrom), this.galleryService.getCoreTranslation(extensionToFetchTranslationsFrom, locale)])
.then(([manifest, translation]) => {
const loc = manifest && manifest.contributes && manifest.contributes.localizations && manifest.contributes.localizations.filter(x => x.languageId.toLowerCase() === locale)[0];
const languageDisplayName = loc && loc.languageName ? loc.languageName : locale;
const languageDisplayName = loc ? (loc.languageNameLocalized || loc.languageName || locale) : locale;
const translations = {
...minimumTranslatedStrings,
...(translation && translation.contents ? translation.contents['vs/platform/node/minimalTranslations'] : {})