mirror of
https://github.com/microsoft/vscode.git
synced 2026-07-13 21:47:12 -05:00
Merge branch 'master' of github.com:Microsoft/vscode
This commit is contained in:
6
src/bootstrap.js
vendored
6
src/bootstrap.js
vendored
@@ -203,7 +203,7 @@ exports.setupNLS = function () {
|
||||
const bundles = Object.create(null);
|
||||
|
||||
nlsConfig.loadBundle = function (bundle, language, cb) {
|
||||
let result = bundles[bundle];
|
||||
const result = bundles[bundle];
|
||||
if (result) {
|
||||
cb(undefined, result);
|
||||
|
||||
@@ -212,7 +212,7 @@ exports.setupNLS = function () {
|
||||
|
||||
const bundleFile = path.join(nlsConfig._resolvedLanguagePackCoreLocation, bundle.replace(/\//g, '!') + '.nls.json');
|
||||
exports.readFile(bundleFile).then(function (content) {
|
||||
let json = JSON.parse(content);
|
||||
const json = JSON.parse(content);
|
||||
bundles[bundle] = json;
|
||||
|
||||
cb(undefined, json);
|
||||
@@ -301,4 +301,4 @@ exports.avoidMonkeyPatchFromAppInsights = function () {
|
||||
process.env['APPLICATION_INSIGHTS_NO_DIAGNOSTIC_CHANNEL'] = true; // Skip monkey patching of 3rd party modules by appinsights
|
||||
global['diagnosticsSource'] = {}; // Prevents diagnostic channel (which patches "require") from initializing entirely
|
||||
};
|
||||
//#endregion
|
||||
//#endregion
|
||||
|
||||
@@ -268,10 +268,10 @@ function factory(nodeRequire, path, fs, perf) {
|
||||
const packData = JSON.parse(values[1]).contents;
|
||||
const bundles = Object.keys(metadata.bundles);
|
||||
const writes = [];
|
||||
for (let bundle of bundles) {
|
||||
for (const bundle of bundles) {
|
||||
const modules = metadata.bundles[bundle];
|
||||
const target = Object.create(null);
|
||||
for (let module of modules) {
|
||||
for (const module of modules) {
|
||||
const keys = metadata.keys[module];
|
||||
const defaultMessages = metadata.messages[module];
|
||||
const translations = packData[module];
|
||||
@@ -329,4 +329,4 @@ if (typeof define === 'function') {
|
||||
module.exports = factory(require, path, fs, perf);
|
||||
} else {
|
||||
throw new Error('Unknown context');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user