More multi-language improvements.
Ylian Saint-Hilaire committed
Oct 20, 2019 at 22:04 UTC
d16415e189540fb8d6abfe02f13a7964bd3aa1a2
2 files changed
+13
-14
views/default-mobile.handlebars
+12
-13
@@ -677,7 +677,7 @@
677
xdr = null;
678
try { xdr = new XDomainRequest(); } catch (e) { }
679
if (!xdr) xdr = new XMLHttpRequest();
680
- xdr.open("HEAD", window.location.href);
680
+ xdr.open('HEAD', window.location.href);
681
xdr.timeout = 15000;
682
xdr.onload = function () { reload(); };
683
xdr.onerror = xdr.ontimeout = function () { setTimeout(serverPoll, 10000); };
@@ -694,7 +694,7 @@
694
QV('p3createMeshLink2', false);
695
696
if (typeof userinfo.passchange == 'number') {
697
- if (userinfo.passchange == -1) { QH('p2nextPasswordUpdateTime', ' - Reset on next login.'); }
697
+ if (userinfo.passchange == -1) { QH('p2nextPasswordUpdateTime', " - Reset on next login."); }
698
else if ((passRequirements != null) && (typeof passRequirements.reset == 'number')) {
699
var seconds = (userinfo.passchange) + (passRequirements.reset * 86400) - Math.floor(Date.now() / 1000);
700
if (seconds < 0) { QH('p2nextPasswordUpdateTime', " - Reset on next login."); }
@@ -1215,7 +1215,7 @@
1215
1216
function account_showChangePassword() {
1217
if (xxdialogMode) return false;
1218
- var x = "<table style=margin-left:10px>";
1218
+ var x = '<table style=margin-left:10px>';
1219
x += '<tr><td align=right>' + "Old password:" + '</td><td><input id=apassword0 type=password name=apassword0 autocomplete=off onchange=account_validateNewPassword() onkeyup=account_validateNewPassword() onkeydown=account_validateNewPassword() /> <b></b></td></tr>';
1220
x += '<tr><td align=right>' + "New password:" + '</td><td><input id=apassword1 type=password name=apassword1 autocomplete=off onchange=account_validateNewPassword() onkeyup=account_validateNewPassword() onkeydown=account_validateNewPassword() /> <b><span id=dxPassWarn></span></b></td></tr>';
1221
x += '<tr><td align=right>' + "New password:" + '</td><td><input id=apassword2 type=password name=apassword2 autocomplete=off onchange=account_validateNewPassword() onkeyup=account_validateNewPassword() onkeydown=account_validateNewPassword() /></td></tr>';
@@ -1413,7 +1413,7 @@
1413
var h = '';
1414
if (f.t < 3 || f.t == 4) {
1415
var right = (f.t == 1 || f.t == 4) ? p5getQuotabar(f) : '';
1416
- h = '<div class=filelist file=999><input file=999 style=float:left name=fc class=fcb type=checkbox onchange=p5setActions() value=\'' + name + '\'> <span style=float:right;padding-right:4px>' + right + "</span><span><div class=fileIcon" + f.t + '></div><a style=cursor:pointer onclick=p5folderset(\"' + encodeURIComponent(f.nx) + '\")>' + shortname + '</a></span></div>';
1416
+ h = '<div class=filelist file=999><input file=999 style=float:left name=fc class=fcb type=checkbox onchange=p5setActions() value=\'' + name + '\'> <span style=float:right;padding-right:4px>' + right + '</span><span><div class=fileIcon' + f.t + '></div><a style=cursor:pointer onclick=p5folderset(\"' + encodeURIComponent(f.nx) + '\")>' + shortname + '</a></span></div>';
1417
} else {
1418
var link = shortname;
1419
var publiclink = '';
@@ -1501,13 +1501,12 @@
1501
function p5uploadFileEx() { Q('p5loginSubmit').click(); }
1502
function updateUploadDialogOk(x) { QE('idx_dlgOkButton', Q(x).value != ''); }
1503
1504
-
1504
var p5clipboard = null, p5clipboardFolder = null, p5clipboardCut = 0;
1506
- function p5copyFile(cut) { var checkboxes = document.getElementsByName('fc'); p5clipboard = []; p5clipboardCut = cut, p5clipboardFolder = Clone(filetreelocation); for (var i = 0; i < checkboxes.length; i++) { if ((checkboxes[i].checked) && (checkboxes[i].attributes.file.value == "3")) { p5clipboard.push(checkboxes[i].value); } } p5updateClipview(); }
1507
- function p5pasteFile() { var x = ''; if ((p5clipboard != null) && (p5clipboard.length > 0)) { x = 'Confim ' + (p5clipboardCut == 0 ? 'copy' : 'move') + ' of ' + p5clipboard.length + ' entrie' + ((p5clipboard.length > 1) ? 's' : '') + ' to this location?' } setDialogMode(2, "Paste", 3, p5pasteFileEx, x); }
1505
+ function p5copyFile(cut) { var checkboxes = document.getElementsByName('fc'); p5clipboard = []; p5clipboardCut = cut, p5clipboardFolder = Clone(filetreelocation); for (var i = 0; i < checkboxes.length; i++) { if ((checkboxes[i].checked) && (checkboxes[i].attributes.file.value == '3')) { p5clipboard.push(checkboxes[i].value); } } p5updateClipview(); }
1506
+ function p5pasteFile() { var x = ''; if ((p5clipboard != null) && (p5clipboard.length > 0)) { x = format("Confim {0} of {1} entrie{2} to this location?", (p5clipboardCut == 0 ? 'copy' : 'move'), p5clipboard.length, ((p5clipboard.length > 1) ? 's' : '')) } setDialogMode(2, "Paste", 3, p5pasteFileEx, x); }
1507
function p5pasteFileEx() { meshserver.send({ action: 'fileoperation', fileop: (p5clipboardCut == 0 ? 'copy' : 'move'), scpath: p5clipboardFolder, path: filetreelocation, names: p5clipboard }); p5folderup(999); if (p5clipboardCut == 1) { p5clipboard = null, p5clipboardFolder = null, p5clipboardCut = 0; p5updateClipview(); } }
1509
- function p5updateClipview() { var x = ''; if ((p5clipboard != null) && (p5clipboard.length > 0)) { x = 'Holding ' + p5clipboard.length + ' entrie' + ((p5clipboard.length > 1) ? 's' : '') + ' for ' + (p5clipboardCut == 0 ? 'copy' : 'move') + ', <a onclick=p5clearClip() style=cursor:pointer>Clear</a>.' } QH('p5bottomstatus', x); p5setActions(); }
1510
- function p5clearClip() { p5clipboard = null; p5clipboardFolder = null; p5clipboardCut = 0; p5updateClipview(); }
1508
+ function p5updateClipview() { var x = ''; if ((p5clipboard != null) && (p5clipboard.length > 0)) { x = format("Holding {0} entrie{1} for {2}", p5clipboard.length, ((p5clipboard.length > 1) ? 's' : ''), (p5clipboardCut == 0 ? "copy" : "move")) + ', <a href=# onclick="return p5clearClip()" style=cursor:pointer>' + "Clear" + '</a>.' } QH('p5bottomstatus', x); p5setActions(); }
1509
+ function p5clearClip() { p5clipboard = null; p5clipboardFolder = null; p5clipboardCut = 0; p5updateClipview(); return false; }
1510
1511
function p5fileDragDrop(e) {
1512
haltEvent(e);
@@ -1747,7 +1746,7 @@
1746
for (var i in deviceHeadersTitles) { Q(i).title = deviceHeadersTitles[i]; }
1747
}
1748
1750
- var powerStatetable = ['', 'Powered', 'Sleep', 'Sleep', 'Sleep', 'Hibernating', 'Power off', 'Present'];
1749
+ var powerStatetable = ['', "Powered", "Sleep", "Sleep", "Sleep", "Hibernating", "Power off", "Present"];
1750
var powerStateStrings = ['', "Powered", "Sleeping", "Sleeping", "Deep Sleep", "Hibernating", "Soft-Off", "Present"];
1751
var powerStateStrings2 = ['', "Device is powered", "Device is in sleep state (S1)", "Device is in sleep state (S2)", "Device is in deep sleep state (S3)", "Device is hibernating (S4)", "Device is in soft-off state (S5)", "Device is present, but power state cannot be determined"];
1752
var powerColorTable = ['#00000000', 'black', 'blue', 'blue', 'lightblue', 'blueviolet', 'darkgreen', 'lightseagreen', 'lightseagreen'];
@@ -1855,7 +1854,7 @@
1854
if (node.host) {
1855
x += addDeviceAttribute("Hostname", '<span onclick=showEditNodeValueDialog(1) style=cursor:pointer>' + EscapeHtml(node.host) + '</span>');
1856
} else {
1858
- x += addDeviceAttribute("Hostname", '<span onclick=showEditNodeValueDialog(1) style=cursor:pointer><i>None</i></span>');
1857
+ x += addDeviceAttribute("Hostname", '<span onclick=showEditNodeValueDialog(1) style=cursor:pointer><i>' + "None" + '</i></span>');
1858
}
1859
} else {
1860
x += addDeviceAttribute("Hostname", EscapeHtml(node.host));
@@ -1871,12 +1870,12 @@
1870
}
1871
1872
// Attribute: Mesh Agent
1874
- var agentsStr = ["Unknown", "Windows 32bit console", "Windows 64bit console", 'Windows 32bit service', 'Windows 64bit service', 'Linux 32bit', 'Linux 64bit', 'MIPS', 'XENx86', 'Android ARM', 'Linux ARM', 'MacOS 32bit', 'Android x86', 'PogoPlug ARM', 'Android APK', 'Linux Poky x86-32bit', 'MacOS 64bit', 'ChromeOS', 'Linux Poky x86-64bit', 'Linux NoKVM x86-32bit', 'Linux NoKVM x86-64bit', 'Windows MinCore console', 'Windows MinCore service', 'NodeJS', 'ARM-Linaro', 'ARMv6l / ARMv7l', 'ARMv8 64bit', 'ARMv6l / ARMv7l / NoKVM', 'Unknown', 'Unknown', 'FreeBSD x86-64'];
1873
+ var agentsStr = ["Unknown", "Windows 32bit console", "Windows 64bit console", "Windows 32bit service", "Windows 64bit service", "Linux 32bit", "Linux 64bit", "MIPS", "XENx86", "Android ARM", "Linux ARM", "MacOS 32bit", "Android x86", "PogoPlug ARM", "Android APK", "Linux Poky x86-32bit", "MacOS 64bit", "ChromeOS", "Linux Poky x86-64bit", "Linux NoKVM x86-32bit", "Linux NoKVM x86-64bit", "Windows MinCore console", "Windows MinCore service", "NodeJS", "ARM-Linaro", "ARMv6l / ARMv7l", "ARMv8 64bit", "ARMv6l / ARMv7l / NoKVM", "Unknown", "Unknown", "FreeBSD x86-64"];
1874
if ((node.agent != null) && (node.agent.id != null) && (node.agent.ver != null)) {
1875
var str = '';
1876
if (node.agent.id <= agentsStr.length) { str = agentsStr[node.agent.id]; } else { str = agentsStr[0]; }
1877
if (node.agent.ver != 0) { str += ' v' + node.agent.ver; }
1879
- x += addDeviceAttribute('Agent', str);
1878
+ x += addDeviceAttribute("Agent", str);
1879
}
1880
1881
// Attribute: Intel AMT
views/default.handlebars
+1
-1
@@ -7800,7 +7800,7 @@
7800
p5PerformUpload(1, files);
7801
} else {
7802
// Otherwise, prompt for confirmation
7803
- setDialogMode(2, "Upload File", 3, p5PerformUpload, format('Upload will overwrite {0} file{1}. Continue?', overWriteCount, addLetterS(overWriteCount)), files);
7803
+ setDialogMode(2, "Upload File", 3, p5PerformUpload, format("Upload will overwrite {0} file{1}. Continue?", overWriteCount, addLetterS(overWriteCount)), files);
7804
}
7805
}
7806