vscode-nls
Advanced tools
Comparing version 3.2.4 to 3.2.5
@@ -41,3 +41,3 @@ /* -------------------------------------------------------------------------------------------- | ||
function initializeSettings() { | ||
options = { locale: undefined, cacheLanguageResolution: true, messageFormat: MessageFormat.bundle }; | ||
options = { locale: undefined, languagePackSupport: false, cacheLanguageResolution: true, messageFormat: MessageFormat.bundle }; | ||
if (isString(process.env.VSCODE_NLS_CONFIG)) { | ||
@@ -49,2 +49,5 @@ try { | ||
} | ||
if (isBoolean(vscodeOptions._languagePackSupport)) { | ||
options.languagePackSupport = vscodeOptions._languagePackSupport; | ||
} | ||
if (isString(vscodeOptions._cacheRoot)) { | ||
@@ -81,3 +84,3 @@ options.cacheRoot = vscodeOptions._cacheRoot; | ||
function supportsLanguagePack() { | ||
return options.cacheRoot !== undefined && options.languagePackId !== undefined && options.translationsConfigFile !== undefined | ||
return options.languagePackSupport === true && options.cacheRoot !== undefined && options.languagePackId !== undefined && options.translationsConfigFile !== undefined | ||
&& options.translationsConfig !== undefined; | ||
@@ -308,2 +311,11 @@ } | ||
} | ||
function loadDefaultNlsBundle(bundlePath) { | ||
try { | ||
return createDefaultNlsBundle(bundlePath); | ||
} | ||
catch (err) { | ||
console.log("Generating default bundle from meta data failed.", err); | ||
return undefined; | ||
} | ||
} | ||
function loadNlsBundle(header, bundlePath) { | ||
@@ -321,2 +333,8 @@ var result; | ||
if (!result) { | ||
// No language pack found, but core is running in language pack mode | ||
// Don't try to use old in the box bundles since the might be stale | ||
// Fall right back to the default bundle. | ||
if (options.languagePackSupport) { | ||
return loadDefaultNlsBundle(bundlePath); | ||
} | ||
var candidate = findInTheBoxBundle(bundlePath); | ||
@@ -331,9 +349,3 @@ if (candidate) { | ||
} | ||
try { | ||
result = createDefaultNlsBundle(bundlePath); | ||
} | ||
catch (err) { | ||
console.log("Generating default bundle from meta data failed.", err); | ||
result = undefined; | ||
} | ||
result = loadDefaultNlsBundle(bundlePath); | ||
} | ||
@@ -340,0 +352,0 @@ return result; |
{ | ||
"name": "vscode-nls", | ||
"version": "3.2.4", | ||
"version": "3.2.5", | ||
"description": "NPM module to externalize and localize VSCode extensions", | ||
@@ -5,0 +5,0 @@ "author": "Microsoft Corporation", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
23080
482