Fixed --translate

Ylian Saint-Hilaire committed Feb 4, 2020 at 16:48 UTC 5bea3692d8b23294a33780125f6fb24332dc2d3d
1 file changed +2 -1
meshcentral.js
+2 -1
@@ -166,7 +166,7 @@ function CreateMeshCentralServer(config, args) {
166
167 // Perform translation operations
168 var didSomething = false;
169 - process.chdir('./translate');
169 + process.chdir(obj.path.join(__dirname, 'translate'));
170 var translateEngine = require('./translate/translate.js')
171 if (customTranslation == true) {
172 // Translate all of the default files using custom translation file
@@ -2341,6 +2341,7 @@ function mainStart() {
2341 if ((config.settings.plugins != null) && (config.settings.plugins.proxy != null)) { modules.push('https-proxy-agent'); } // Required for HTTP/HTTPS proxy support
2342 else if (config.settings.xmongodb != null) { modules.push('mongojs'); } // Add MongoJS, old driver.
2343 if (config.smtp != null) { modules.push('nodemailer'); } // Add SMTP support
2344 + if (args.translate) { modules.push('jsdom'); modules.push('esprima'); modules.push('minify-js'); modules.push('html-minifier'); } // Translation support
2345
2346 // If running NodeJS < 8, install "util.promisify"
2347 if (nodeVersion < 8) { modules.push('util.promisify'); }