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:
parent
ffb61443ec
commit
21162cab72
2 changed files with 47 additions and 2 deletions
|
@ -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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue