Skip to content

Commit

Permalink
Add translation support for strings in vnc_auto
Browse files Browse the repository at this point in the history
  • Loading branch information
samhed committed Oct 28, 2016
1 parent 91e4115 commit 733d500
Showing 1 changed file with 13 additions and 6 deletions.
19 changes: 13 additions & 6 deletions vnc_auto.html
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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");
Expand Down

0 comments on commit 733d500

Please sign in to comment.