mirror of
				https://github.com/Ylianst/MeshCentral.git
				synced 2025-03-09 15:40:18 +00:00 
			
		
		
		
	Merge pull request #4079 from reddn/reddn-patch-3
added fix to hande process.env.LANG = "C"
This commit is contained in:
		
						commit
						1474c73ddb
					
				
					 1 changed files with 7 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -46,6 +46,10 @@ var translation = JSON.parse(msh.translation);
 | 
			
		|||
 | 
			
		||||
var lang = require('util-language').current;
 | 
			
		||||
if (lang == null) { lang = 'en'; }
 | 
			
		||||
if (lang == "C"){
 | 
			
		||||
    lang = 'en';
 | 
			
		||||
    console.log("Langauge envronment variable was not set (process.env.LANG).  Defaulting to English ('en').\nSee the agent-translations.json file for a list of current languages that are implemented\nUsage: meshcentral -lang=en\n");    
 | 
			
		||||
}
 | 
			
		||||
if (process.argv.getParameter('lang', lang) == null)
 | 
			
		||||
{
 | 
			
		||||
    console.log('\nCurrent Language: ' + lang + '\n');
 | 
			
		||||
| 
						 | 
				
			
			@ -60,6 +64,8 @@ else
 | 
			
		|||
        if (translation[lang.split('-')[0]] == null)
 | 
			
		||||
        {
 | 
			
		||||
            console.log('Language: ' + lang + ' is not translated.');
 | 
			
		||||
            console.log("try: './meshcentral -lang=en' for English");
 | 
			
		||||
            console.log("See the agent-translations.json file for a list of current languages that are implemented.")
 | 
			
		||||
            process.exit();
 | 
			
		||||
        }
 | 
			
		||||
        else
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue