Changed zh-chx to zh-hanx for agent languages in msh.

Ylian Saint-Hilaire committed Dec 16, 2020 at 11:33 UTC 22beb6356218ee655b1135a4f53ea21b7af8d3a3
1 file changed +6 -1
meshcentral.js
+6 -1
@@ -1380,7 +1380,12 @@ function CreateMeshCentralServer(config, args) {
1380 obj.updateMeshTools();
1381
1382 // Load MeshAgent translation strings
1383 - try { obj.agentTranslations = JSON.stringify(JSON.parse(obj.fs.readFileSync(obj.path.join(__dirname, 'agents', 'agent-translations.json')).toString())); } catch (ex) { }
1383 + try {
1384 + var translations = JSON.parse(obj.fs.readFileSync(obj.path.join(__dirname, 'agents', 'agent-translations.json')).toString());
1385 + if (translations['zh-chs']) { translations['zh-hans'] = translations['zh-chs']; delete translations['zh-chs']; }
1386 + if (translations['zh-cht']) { translations['zh-hant'] = translations['zh-cht']; delete translations['zh-cht']; }
1387 + obj.agentTranslations = JSON.stringify(translations);
1388 + } catch (ex) { }
1389
1390 // Load the list of mesh agents and install scripts
1391 if (obj.args.noagentupdate == 1) { for (i in obj.meshAgentsArchitectureNumbers) { obj.meshAgentsArchitectureNumbers[i].update = false; } }