mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-03-09 15:40:18 +00:00
Added agent customization install text, supported by upcoming agent.
This commit is contained in:
parent
4b6c5f38bd
commit
50d56b8697
2 changed files with 12 additions and 0 deletions
|
@ -1560,6 +1560,17 @@ function CreateMeshCentralServer(config, args) {
|
|||
if (translations['zh-chs']) { translations['zh-hans'] = translations['zh-chs']; delete translations['zh-chs']; }
|
||||
if (translations['zh-cht']) { translations['zh-hant'] = translations['zh-cht']; delete translations['zh-cht']; }
|
||||
obj.agentTranslations = JSON.stringify(translations);
|
||||
|
||||
// If there is domain customizations to the agent strings, do this here.
|
||||
for (var i in obj.config.domains) {
|
||||
var domainTranslations = translations;
|
||||
if ((typeof obj.config.domains[i].agentcustomization == 'object') && (typeof obj.config.domains[i].agentcustomization.installtext == 'string')) {
|
||||
domainTranslations = Object.assign({}, domainTranslations); // Shallow clone
|
||||
for (var j in domainTranslations) { delete domainTranslations[j].description; }
|
||||
domainTranslations.en.description = obj.config.domains[i].agentcustomization.installtext;
|
||||
}
|
||||
obj.config.domains[i].agentTranslations = domainTranslations;
|
||||
}
|
||||
} catch (ex) { }
|
||||
|
||||
// Load the list of mesh agents and install scripts
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue