mirror of
				https://github.com/Ylianst/MeshCentral.git
				synced 2025-03-09 15:40:18 +00:00 
			
		
		
		
	Fixed Dutch translations in translate.js
This commit is contained in:
		
							parent
							
								
									9bebc913d9
								
							
						
					
					
						commit
						b202d3ef08
					
				
					 4 changed files with 21 additions and 44 deletions
				
			
		
							
								
								
									
										26
									
								
								meshuser.js
									
										
									
									
									
								
							
							
						
						
									
										26
									
								
								meshuser.js
									
										
									
									
									
								
							| 
						 | 
					@ -322,32 +322,6 @@ module.exports.CreateMeshUser = function (parent, db, ws, req, args, domain, use
 | 
				
			||||||
                try { ws.send(JSON.stringify(stats)); } catch (ex) { }
 | 
					                try { ws.send(JSON.stringify(stats)); } catch (ex) { }
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            //
 | 
					 | 
				
			||||||
            var serverStatsStrings = {
 | 
					 | 
				
			||||||
                ServerState: "Server State",
 | 
					 | 
				
			||||||
                AgentErrorCounters: "Agent Error Counters",
 | 
					 | 
				
			||||||
                UnknownGroup: "Unknown Group",
 | 
					 | 
				
			||||||
                InvalidPKCSsignature: "Invalid PKCS signature",
 | 
					 | 
				
			||||||
                InvalidRSAsiguature: "Invalid RSA siguature",
 | 
					 | 
				
			||||||
                InvalidJSON: "Invalid JSON",
 | 
					 | 
				
			||||||
                UnknownAction: "Unknown Action",
 | 
					 | 
				
			||||||
                BadWebCertificate: "Bad Web Certificate",
 | 
					 | 
				
			||||||
                BadSignature: "Bad Signature",
 | 
					 | 
				
			||||||
                MaxSessionsReached: "Max Sessions Reached",
 | 
					 | 
				
			||||||
                UnknownDeviceGroup: "Unknown Device Group",
 | 
					 | 
				
			||||||
                InvalidDeviceGroupType: "Invalid Device Group Type",
 | 
					 | 
				
			||||||
                DuplicateAgent: "Duplicate Agent",
 | 
					 | 
				
			||||||
                ConnectedIntelAMT: "Connected Intel® AMT",
 | 
					 | 
				
			||||||
                RelayErrors: "Relay Errors",
 | 
					 | 
				
			||||||
                UserAccounts: "User Accounts",
 | 
					 | 
				
			||||||
                DeviceGroups: "Device Groups",
 | 
					 | 
				
			||||||
                AgentSessions: "Agent Sessions",
 | 
					 | 
				
			||||||
                ConnectedUsers: "Connected Users",
 | 
					 | 
				
			||||||
                UsersSessions: "Users Sessions",
 | 
					 | 
				
			||||||
                RelaySessions: "Relay Sessions",
 | 
					 | 
				
			||||||
                RelayCount: "Relay Count"
 | 
					 | 
				
			||||||
            };
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
            // When data is received from the web socket
 | 
					            // When data is received from the web socket
 | 
				
			||||||
            ws.on('message', processWebSocketData);
 | 
					            ws.on('message', processWebSocketData);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -72,7 +72,7 @@ function start() {
 | 
				
			||||||
        console.log('  TRANSLATE [language] [languagefile] [files]');
 | 
					        console.log('  TRANSLATE [language] [languagefile] [files]');
 | 
				
			||||||
        console.log('    Use a language (.json) file to translate web pages to a give language.');
 | 
					        console.log('    Use a language (.json) file to translate web pages to a give language.');
 | 
				
			||||||
        console.log('');
 | 
					        console.log('');
 | 
				
			||||||
        console.log('  TRANSLATEALL (languagefile)');
 | 
					        console.log('  TRANSLATEALL (languagefile) (language code)');
 | 
				
			||||||
        console.log('    Translate all MeshCentral strings using the languages.json file.');
 | 
					        console.log('    Translate all MeshCentral strings using the languages.json file.');
 | 
				
			||||||
        console.log('');
 | 
					        console.log('');
 | 
				
			||||||
        console.log('  MINIFYALL');
 | 
					        console.log('  MINIFYALL');
 | 
				
			||||||
| 
						 | 
					@ -152,19 +152,21 @@ function start() {
 | 
				
			||||||
    // Extract or translate all MeshCentral strings
 | 
					    // Extract or translate all MeshCentral strings
 | 
				
			||||||
    if (command == 'extractall') { extract("translate.json", meshCentralSourceFiles); }
 | 
					    if (command == 'extractall') { extract("translate.json", meshCentralSourceFiles); }
 | 
				
			||||||
    if (command == 'translateall') {
 | 
					    if (command == 'translateall') {
 | 
				
			||||||
        if (fs.existsSync("../views/translations") == false) { fs.mkdirSync("../views/translations"); }
 | 
					        if (fs.existsSync('../views/translations') == false) { fs.mkdirSync('../views/translations'); }
 | 
				
			||||||
        if (fs.existsSync("../public/translations") == false) { fs.mkdirSync("../public/translations"); }
 | 
					        if (fs.existsSync('../public/translations') == false) { fs.mkdirSync('../public/translations'); }
 | 
				
			||||||
        if ((process.argv.length > 3)) {
 | 
					        var lang = null;
 | 
				
			||||||
 | 
					        if (process.argv.length > 4) { lang = process.argv[4].toLowerCase(); }
 | 
				
			||||||
 | 
					        if (process.argv.length > 3) {
 | 
				
			||||||
            if (fs.existsSync(process.argv[3]) == false) {
 | 
					            if (fs.existsSync(process.argv[3]) == false) {
 | 
				
			||||||
                console.log('Unable to find: ' + process.argv[3]);
 | 
					                console.log('Unable to find: ' + process.argv[3]);
 | 
				
			||||||
            } else {
 | 
					            } else {
 | 
				
			||||||
                translate(null, process.argv[3], meshCentralSourceFiles, "translations");
 | 
					                translate(lang, process.argv[3], meshCentralSourceFiles, 'translations');
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
        } else {
 | 
					        } else {
 | 
				
			||||||
            if (fs.existsSync("translate.json") == false) {
 | 
					            if (fs.existsSync('translate.json') == false) {
 | 
				
			||||||
                console.log('Unable to find translate.json.');
 | 
					                console.log('Unable to find translate.json.');
 | 
				
			||||||
            } else {
 | 
					            } else {
 | 
				
			||||||
                translate(null, "translate.json", meshCentralSourceFiles, "translations");
 | 
					                translate(lang, 'translate.json', meshCentralSourceFiles, 'translations');
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        return;
 | 
					        return;
 | 
				
			||||||
| 
						 | 
					@ -346,7 +348,7 @@ function translate(lang, langFile, sources, createSubDir) {
 | 
				
			||||||
    } else {
 | 
					    } else {
 | 
				
			||||||
        // See that languages are in the translation file
 | 
					        // See that languages are in the translation file
 | 
				
			||||||
        langs = {};
 | 
					        langs = {};
 | 
				
			||||||
        for (var i in langFileData.strings) { var entry = langFileData.strings[i]; for (var j in entry) { if ((j != 'en') && (j != 'xloc') && (j != '*')) { langs[j] = true; } } }
 | 
					        for (var i in langFileData.strings) { var entry = langFileData.strings[i]; for (var j in entry) { if ((j != 'en') && (j != 'xloc') && (j != '*')) { langs[j.toLowerCase()] = true; } } }
 | 
				
			||||||
        for (var i in langs) { translateEx(i, langFileData, sources, createSubDir); }
 | 
					        for (var i in langs) { translateEx(i, langFileData, sources, createSubDir); }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -8,7 +8,8 @@
 | 
				
			||||||
      "nl": "0",
 | 
					      "nl": "0",
 | 
				
			||||||
      "xloc": [
 | 
					      "xloc": [
 | 
				
			||||||
        "default.handlebars->container->masthead->7->notificationCount",
 | 
					        "default.handlebars->container->masthead->7->notificationCount",
 | 
				
			||||||
        "default-mobile.handlebars->9->229"
 | 
					        "default-mobile.handlebars->9->229",
 | 
				
			||||||
 | 
					        { "$ref": "#" }
 | 
				
			||||||
      ]
 | 
					      ]
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
| 
						 | 
					@ -15651,21 +15652,21 @@
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
      "en": "Sync server device name to hostname",
 | 
					      "en": "Sync server device name to hostname",
 | 
				
			||||||
      "nl" "Synchroniseer serverapparaatnaam met hostnaam",
 | 
					      "nl": "Synchroniseer serverapparaatnaam met hostnaam",
 | 
				
			||||||
      "xloc": [
 | 
					      "xloc": [
 | 
				
			||||||
        "default.handlebars->23->1046"
 | 
					        "default.handlebars->23->1046"
 | 
				
			||||||
      ]
 | 
					      ]
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
      "en": "Notification settings must also be turned on in account settings.",
 | 
					      "en": "Notification settings must also be turned on in account settings.",
 | 
				
			||||||
      "nl" "Meldingsinstellingen moeten ook worden ingeschakeld in accountinstellingen.",
 | 
					      "nl": "Meldingsinstellingen moeten ook worden ingeschakeld in accountinstellingen.",
 | 
				
			||||||
      "xloc": [
 | 
					      "xloc": [
 | 
				
			||||||
        "default.handlebars->23->1096"
 | 
					        "default.handlebars->23->1096"
 | 
				
			||||||
      ]
 | 
					      ]
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
      "en": "Groups",
 | 
					      "en": "Groups",
 | 
				
			||||||
      "nl" "Groepen
 | 
					      "nl": "Groepen",
 | 
				
			||||||
      "xloc": [
 | 
					      "xloc": [
 | 
				
			||||||
        "default.handlebars->23->1160"
 | 
					        "default.handlebars->23->1160"
 | 
				
			||||||
      ]
 | 
					      ]
 | 
				
			||||||
| 
						 | 
					@ -15686,7 +15687,7 @@
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
      "en": "CPU Load",
 | 
					      "en": "CPU Load",
 | 
				
			||||||
      "nL": "CPU gebruik",
 | 
					      "nl": "CPU gebruik",
 | 
				
			||||||
      "xloc": [
 | 
					      "xloc": [
 | 
				
			||||||
        "default.handlebars->23->1306"
 | 
					        "default.handlebars->23->1306"
 | 
				
			||||||
      ]
 | 
					      ]
 | 
				
			||||||
| 
						 | 
					@ -15720,7 +15721,7 @@
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
      "en": "Invalid RSA siguature",
 | 
					      "en": "Invalid RSA siguature",
 | 
				
			||||||
      "n;": "Ongeldige RSA handtekening",
 | 
					      "nl": "Ongeldige RSA handtekening",
 | 
				
			||||||
      "xloc": [
 | 
					      "xloc": [
 | 
				
			||||||
        "default.handlebars->23->1288"
 | 
					        "default.handlebars->23->1288"
 | 
				
			||||||
      ]
 | 
					      ]
 | 
				
			||||||
| 
						 | 
					@ -15862,7 +15863,7 @@
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
      "en": "External",
 | 
					      "en": "External",
 | 
				
			||||||
      "en": "Extern",
 | 
					      "nl": "Extern",
 | 
				
			||||||
      "xloc": [
 | 
					      "xloc": [
 | 
				
			||||||
        "default.handlebars->23->1320"
 | 
					        "default.handlebars->23->1320"
 | 
				
			||||||
      ]
 | 
					      ]
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue