Always translate literals instead of variables
Makes it much easier to find what needs to be translated.
This commit is contained in:
parent
da88c28714
commit
fdb02f8570
15
app/ui.js
15
app/ui.js
|
@ -365,7 +365,7 @@ var UI;
|
||||||
var msg;
|
var msg;
|
||||||
switch (state) {
|
switch (state) {
|
||||||
case 'connecting':
|
case 'connecting':
|
||||||
UI.showStatus("Connecting");
|
UI.showStatus(Util.Localisation.get("Connecting"));
|
||||||
break;
|
break;
|
||||||
case 'connected':
|
case 'connected':
|
||||||
UI.connected = true;
|
UI.connected = true;
|
||||||
|
@ -377,11 +377,11 @@ var UI;
|
||||||
UI.showStatus(msg);
|
UI.showStatus(msg);
|
||||||
break;
|
break;
|
||||||
case 'disconnecting':
|
case 'disconnecting':
|
||||||
UI.showStatus("Disconnecting");
|
UI.showStatus(Util.Localisation.get("Disconnecting"));
|
||||||
break;
|
break;
|
||||||
case 'disconnected':
|
case 'disconnected':
|
||||||
UI.connected = false;
|
UI.connected = false;
|
||||||
UI.showStatus("Disconnected");
|
UI.showStatus(Util.Localisation.get("Disconnected"));
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
msg = "Invalid UI state";
|
msg = "Invalid UI state";
|
||||||
|
@ -477,7 +477,7 @@ var UI;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
statusElem.innerHTML = Util.Localisation.get(text);
|
statusElem.innerHTML = text;
|
||||||
statusElem.classList.add("noVNC_open");
|
statusElem.classList.add("noVNC_open");
|
||||||
|
|
||||||
// If no time was specified, show the status for 1.5 seconds
|
// If no time was specified, show the status for 1.5 seconds
|
||||||
|
@ -968,7 +968,7 @@ var UI;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((!host) || (!port)) {
|
if ((!host) || (!port)) {
|
||||||
var msg = "Must set host and port";
|
var msg = Util.Localisation.get("Must set host and port");
|
||||||
Util.Error(msg);
|
Util.Error(msg);
|
||||||
UI.showStatus(msg, 'error');
|
UI.showStatus(msg, 'error');
|
||||||
return;
|
return;
|
||||||
|
@ -1234,8 +1234,9 @@ var UI;
|
||||||
// The browser is IE and we are in fullscreen mode.
|
// The browser is IE and we are in fullscreen mode.
|
||||||
// - We need to force clipping while in fullscreen since
|
// - We need to force clipping while in fullscreen since
|
||||||
// scrollbars doesn't work.
|
// scrollbars doesn't work.
|
||||||
var msg = "Forcing clipping mode since scrollbars aren't" +
|
var msg = Util.Localisation.get("Forcing clipping mode since " +
|
||||||
"supported by IE in fullscreen";
|
"scrollbars aren't supported " +
|
||||||
|
"by IE in fullscreen");
|
||||||
Util.Debug(msg);
|
Util.Debug(msg);
|
||||||
UI.showStatus(msg);
|
UI.showStatus(msg);
|
||||||
UI.rememberedClipSetting = UI.getSetting('clip');
|
UI.rememberedClipSetting = UI.getSetting('clip');
|
||||||
|
|
|
@ -265,7 +265,8 @@
|
||||||
this._rfb_path = (path !== undefined) ? path : "";
|
this._rfb_path = (path !== undefined) ? path : "";
|
||||||
|
|
||||||
if (!this._rfb_host || !this._rfb_port) {
|
if (!this._rfb_host || !this._rfb_port) {
|
||||||
return this._fail("Must set host and port");
|
return this._fail(
|
||||||
|
Util.Localisation.get("Must set host and port"));
|
||||||
}
|
}
|
||||||
|
|
||||||
this._rfb_init_state = '';
|
this._rfb_init_state = '';
|
||||||
|
|
Loading…
Reference in New Issue