1
0
Fork 0
mirror of https://github.com/Ylianst/MeshCentral.git synced 2025-03-09 15:40:18 +00:00

Improved --translate feature.

This commit is contained in:
Ylian Saint-Hilaire 2020-02-06 11:33:21 -08:00
parent ffb61443ec
commit 21162cab72
2 changed files with 47 additions and 2 deletions

View file

@ -183,10 +183,18 @@ function CreateMeshCentralServer(config, args) {
for (var i in files) {
var file = obj.path.join(obj.webViewsOverridePath, files[i]);
if (file.endsWith('.handlebars') && !file.endsWith('-min.handlebars')) {
translateEngine.startEx(['', '', 'minify', file]);
}
}
files = obj.fs.readdirSync(obj.webViewsOverridePath);
for (var i in files) {
var file = obj.path.join(obj.webViewsOverridePath, files[i]);
if (file.endsWith('.handlebars') || file.endsWith('-min.handlebars')) {
translateEngine.startEx(['', '', 'translate', '*', translationFile, file, '--subdir:translations']);
}
}
}
/*
if (obj.webPublicOverridePath != null) {
didSomething = true;
var files = obj.fs.readdirSync(obj.webPublicOverridePath);
@ -197,6 +205,7 @@ function CreateMeshCentralServer(config, args) {
}
}
}
*/
if (didSomething == false) { console.log("Nothing to do."); }
process.exit();