From 91d936cda13d88e2e76149f8acd2735f38d3d4ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20BOROT?= Date: Sat, 7 Nov 2020 20:45:59 +0100 Subject: [PATCH] Fix extensions translations --- build.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/build.js b/build.js index c1c07d34..cad828e7 100644 --- a/build.js +++ b/build.js @@ -75,15 +75,23 @@ for (const extension of extensionsContent) { const extensionPath = `${extensionsFolderPath}/${extension}`; if (fs.statSync(extensionPath).isDirectory()) { const extensionPackagePath = `${extensionPath}/package.json`; + const extensionPackageNLSPath = `${extensionPath}/package.nls.json`; if (!fs.existsSync(extensionPackagePath)) { continue; } const packageJSON = JSON.parse(fs.readFileSync(extensionPackagePath)); + let packageNLS = null; + + if (fs.existsSync(extensionPackageNLSPath)) { + packageNLS = JSON.parse(fs.readFileSync(extensionPackageNLSPath)); + } + extensions.push({ packageJSON, extensionPath: extension, + packageNLS }); } }