Update language loader, minor cleanup
parent
576354901d
commit
748b3cf88a
|
@ -8,16 +8,16 @@ module.exports = function(s,config,lang){
|
|||
Theme: Theme,
|
||||
},{
|
||||
"Monitor Status Codes": {
|
||||
"0": "Disabled",
|
||||
"1": "Starting",
|
||||
"2": "Watching",
|
||||
"3": "Recording",
|
||||
"4": "Restarting",
|
||||
"5": "Stopped",
|
||||
"6": "Idle",
|
||||
"7": "Died",
|
||||
"8": "Stopping",
|
||||
"9": "Started",
|
||||
"0": lang["Disabled"],
|
||||
"1": lang["Starting"],
|
||||
"2": lang["Watching"],
|
||||
"3": lang["Recording"],
|
||||
"4": lang["Restarting"],
|
||||
"5": lang["Stopped"],
|
||||
"6": lang["Idle"],
|
||||
"7": lang["Died"],
|
||||
"8": lang["Stopping"],
|
||||
"9": lang["Started"],
|
||||
},
|
||||
"Monitor Settings": {
|
||||
"section": "Monitor Settings",
|
||||
|
|
|
@ -893,6 +893,7 @@
|
|||
"Starting": "Starting",
|
||||
"Watching": "Watching",
|
||||
"Stopped": "Stopped",
|
||||
"Stopping": "Stopping",
|
||||
"Died": "Died",
|
||||
"Restart": "Restart",
|
||||
"Monitor Stopped": "Monitor Stopped",
|
||||
|
@ -1643,4 +1644,4 @@
|
|||
"fieldTextChannelStreamScaleY": "Height of the stream image that is output after processing.",
|
||||
"fieldTextChannelStreamRotate": "Change the viewing angle of the video stream.",
|
||||
"fieldTextChannelSvf": "Place FFMPEG video filters in this box to affect the streaming portion. No spaces."
|
||||
}
|
||||
}
|
||||
|
|
|
@ -20,7 +20,6 @@ module.exports = function(s,config,lang,app,io){
|
|||
s.getDefinitonFile = function(rule){
|
||||
if(rule && rule !== ''){
|
||||
var file = s.loadedDefinitons[rule]
|
||||
s.debugLog(file ? file.SideMenu.blocks.Container1 : undefined)
|
||||
if(!file){
|
||||
try{
|
||||
// console.log(getFramework(lang))
|
||||
|
|
|
@ -4,11 +4,12 @@ module.exports = function(s,config){
|
|||
config.language='en_CA'
|
||||
}
|
||||
try{
|
||||
var lang = require(s.location.languages+'/'+config.language+'.json');
|
||||
var lang = {};
|
||||
eval(`lang = ${fs.readFileSync(s.location.languages+'/'+config.language+'.json','utf8')}`)
|
||||
}catch(er){
|
||||
console.error(er)
|
||||
console.log('There was an error loading your language file.')
|
||||
var lang = require(s.location.languages+'/en_CA.json');
|
||||
eval(`lang = ${fs.readFileSync(s.location.languages+'/en_CA.json','utf8')}`)
|
||||
}
|
||||
//load languages dynamically
|
||||
s.copySystemDefaultLanguage = function(){
|
||||
|
|
|
@ -327,7 +327,7 @@ module.exports = function(s,config,lang,io){
|
|||
if(s.group[d.ke].users[d.auth].details.get_server_log!=='0'){
|
||||
cn.join('GRPLOG_'+d.ke)
|
||||
}
|
||||
s.group[d.ke].users[d.auth].lang=s.getLanguageFile(s.group[d.ke].users[d.auth].details.lang)
|
||||
s.group[d.ke].users[d.auth].lang = s.getLanguageFile(s.group[d.ke].users[d.auth].details.lang)
|
||||
s.userLog({ke:d.ke,mid:'$USER'},{type:s.group[d.ke].users[d.auth].lang['Websocket Connected'],msg:{mail:r.mail,id:d.uid,ip:cn.ip}})
|
||||
if(!s.group[d.ke].activeMonitors){
|
||||
s.group[d.ke].activeMonitors={}
|
||||
|
|
|
@ -327,6 +327,7 @@ module.exports = function(s,config,lang,app,io){
|
|||
})
|
||||
break;
|
||||
case'admin':
|
||||
// dash
|
||||
default:
|
||||
var chosenRender = 'home'
|
||||
if(userInfo.details.sub && userInfo.details.landing_page && userInfo.details.landing_page !== '' && config.renderPaths[userInfo.details.landing_page]){
|
||||
|
|
Loading…
Reference in New Issue