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