Add translation support for strings in vnc_auto

This commit is contained in:
Samuel Mannehed 2016-10-28 15:30:04 +02:00
parent 91e41150f0
commit 733d5009b6
1 changed files with 13 additions and 6 deletions

View File

@ -82,7 +82,7 @@
'core': ["base64.js", "websock.js", "des.js", "input/keysymdef.js",
"input/xtscancodes.js", "input/util.js", "input/devices.js",
"display.js", "inflator.js", "rfb.js", "input/keysym.js"],
'app': ["webutil.js"]});
'app': [WebUtil.getLanguageFileLocation(), "webutil.js"]});
var rfb;
var resizeTimeout;
@ -151,19 +151,26 @@
}
function updateState(rfb, state, oldstate) {
var cad = document.getElementById('sendCtrlAltDelButton');
var encrypt = (rfb && rfb.get_encrypt()) ? 'encrypted' : 'unencrypted';
switch (state) {
case 'connecting':
status("Connecting", "normal");
status(Util.Localisation.get("Connecting"), "normal");
break;
case 'connected':
status("Connected (" + encrypt + ") to: " + desktopName, "normal");
if (rfb && rfb.get_encrypt()) {
status(Util.Localisation.
get("Connected (encrypted) to ") +
desktopName, "normal");
} else {
status(Util.Localisation.
get("Connected (unencrypted) to ") +
desktopName, "normal");
}
break;
case 'disconnecting':
status("Disconnecting", "normal");
status(Util.Localisation.get("Disconnecting"), "normal");
break;
case 'disconnected':
status("Disconnected", "normal");
status(Util.Localisation.get("Disconnected"), "normal");
break;
default:
status(state, "warn");