added fix to process.env.LANG = "C"
reddn committed
Jun 3, 2022 at 17:13 UTC
f8cb33d5bfb1bd80368aab10ff6eb4aa387daf8e
1 file changed
+7
-2
agents/meshinstall-linux.js
+7
-2
@@ -45,7 +45,11 @@ var msh = {};
45
var translation = JSON.parse(msh.translation);
46
47
var lang = require('util-language').current;
48
-if (lang == null) { lang = 'en_us'; }
48
+if (lang == null) { lang = 'en'; }
49
+if (lang == "C"){
50
+ lang = 'en';
51
+ 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");
52
+}
53
if (process.argv.getParameter('lang', lang) == null)
54
{
55
console.log('\nCurrent Language: ' + lang + '\n');
@@ -60,7 +64,8 @@ else
64
if (translation[lang.split('-')[0]] == null)
65
{
66
console.log('Language: ' + lang + ' is not translated.');
63
- console.log("try: './meshcentral -lang=en_us'"
67
+ console.log("try: './meshcentral -lang=en' for English");
68
+ console.log("See the agent-translations.json file for a list of current languages that are implemented.")
69
process.exit();
70
}
71
else