mirror of
				https://github.com/Ylianst/MeshCentral.git
				synced 2025-03-09 15:40:18 +00:00 
			
		
		
		
	Improved translation web application.
This commit is contained in:
		
							parent
							
								
									7b5bcf7329
								
							
						
					
					
						commit
						8c636bdf19
					
				
					 14 changed files with 6558 additions and 28 deletions
				
			
		| 
						 | 
				
			
			@ -72,7 +72,7 @@ function start() {
 | 
			
		|||
        console.log('  TRANSLATE [language] [languagefile] [files]');
 | 
			
		||||
        console.log('    Use a language (.json) file to translate web pages to a give language.');
 | 
			
		||||
        console.log('');
 | 
			
		||||
        console.log('  TRANSLATEALL');
 | 
			
		||||
        console.log('  TRANSLATEALL (languagefile)');
 | 
			
		||||
        console.log('    Translate all MeshCentral strings using the languages.json file.');
 | 
			
		||||
        console.log('');
 | 
			
		||||
        console.log('  MINIFYALL');
 | 
			
		||||
| 
						 | 
				
			
			@ -110,7 +110,20 @@ function start() {
 | 
			
		|||
    if (command == 'translateall') {
 | 
			
		||||
        if (fs.existsSync("../views/translations") == false) { fs.mkdirSync("../views/translations"); }
 | 
			
		||||
        if (fs.existsSync("../public/translations") == false) { fs.mkdirSync("../public/translations"); }
 | 
			
		||||
        translate(null, "translate.json", meshCentralSourceFiles, "translations");
 | 
			
		||||
        if ((process.argv.length > 3)) {
 | 
			
		||||
            if (fs.existsSync(process.argv[3]) == false) {
 | 
			
		||||
                console.log('Unable to find: ' + process.argv[3]);
 | 
			
		||||
            } else {
 | 
			
		||||
                translate(null, process.argv[3], meshCentralSourceFiles, "translations");
 | 
			
		||||
            }
 | 
			
		||||
        } else {
 | 
			
		||||
            if (fs.existsSync("translate.json") == false) {
 | 
			
		||||
                console.log('Unable to find translate.json.');
 | 
			
		||||
            } else {
 | 
			
		||||
                translate(null, "translate.json", meshCentralSourceFiles, "translations");
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
        return;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    // Translate web pages to a given language given a language file
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue