French translation update and debugging improvements.

This commit is contained in:
Ylian Saint-Hilaire 2020-11-17 13:44:17 -08:00
parent b658ebf2a2
commit ebfaead468
5 changed files with 41 additions and 7 deletions

File diff suppressed because one or more lines are too long

View File

@ -35,6 +35,7 @@ var CreateAgentRemoteDesktop = function (canvasid, scrolldiv) {
obj.firstUpKeys = [];
obj.stopInput = false;
obj.localKeyMap = true;
obj.remoteKeyMap = null; // 'fr-CA'
obj.pressedKeys = [];
obj.sessionid = 0;
@ -281,7 +282,7 @@ var CreateAgentRemoteDesktop = function (canvasid, scrolldiv) {
// Keyboard and Mouse I/O.
obj.MouseButton = { "NONE": 0x00, "LEFT": 0x02, "RIGHT": 0x08, "MIDDLE": 0x20 };
obj.KeyAction = { "NONE": 0, "DOWN": 1, "UP": 2, "SCROLL": 3, "EXUP": 4, "EXDOWN": 5, "DBLCLICK": 6 };
obj.InputType = { "KEY": 1, "MOUSE": 2, "CTRLALTDEL": 10, "TOUCH": 15 };
obj.InputType = { "KEY": 1, "MOUSE": 2, "CTRLALTDEL": 10, "TOUCH": 15, "KEYWITHLAYOUT": 85 };
obj.Alternate = 0;
var convertKeyCodeTable = {
@ -397,7 +398,14 @@ var CreateAgentRemoteDesktop = function (canvasid, scrolldiv) {
var i = obj.pressedKeys.indexOf(kc);
if (i != -1) { obj.pressedKeys.splice(i, 1); } // Remove the key press from the pressed array
}
obj.send(String.fromCharCode(0x00, obj.InputType.KEY, 0x00, 0x06, (action - 1), kc));
if ((obj.remoteKeyMap == null) || (obj.remoteKeyMap == '')) {
// No remote keyboard mapping
obj.send(String.fromCharCode(0x00, obj.InputType.KEY, 0x00, 0x06, (action - 1), kc));
} else {
// With remote keyboard mapping
obj.send(String.fromCharCode(0x00, obj.InputType.KEYWITHLAYOUT, 0x00, 0x16, (action - 1), kc) + obj.remoteKeyMap + ('\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0'.substring(0, 16 - obj.remoteKeyMap.length)));
}
}
}

View File

@ -753,6 +753,7 @@ function translateFromTxt(lang, file, createSubDir) {
function translateFromHtml(lang, file, createSubDir) {
var data = fs.readFileSync(file);
if (file.endsWith('.js')) { data = '<html><head></head><body><script>' + data + '</script></body></html>'; }
var { JSDOM } = jsdom;
const dom = new JSDOM(data, { includeNodeLocations: true });
log("Translating HTML (" + lang + "): " + path.basename(file));
@ -778,6 +779,11 @@ function translateFromHtml(lang, file, createSubDir) {
} else if (outname.endsWith('.htm')) {
outnamemin = (outname.substring(0, outname.length - 4) + '-min_' + lang + '.htm');
outname = (outname.substring(0, outname.length - 4) + '_' + lang + '.htm');
} else if (outname.endsWith('.js')) {
if (out.startsWith('<html><head></head><body><script>')) { out = out.substring(33); }
if (out.endsWith('</script></body></html>')) { out = out.substring(0, out.length - 23); }
outnamemin = (outname.substring(0, outname.length - 3) + '-min_' + lang + '.js');
outname = (outname.substring(0, outname.length - 3) + '_' + lang + '.js');
} else {
outnamemin = (outname + '_' + lang + '.min');
outname = (outname + '_' + lang);

View File

@ -5989,6 +5989,7 @@
{
"en": "Batch File Upload",
"nl": "Batch bestand uploaden",
"fr": "Chargement de fichiers",
"xloc": [
"default.handlebars->29->480"
]
@ -6016,6 +6017,7 @@
{
"en": "Batch upload of {0} file(s) to folder {1}",
"nl": "Batch-upload van {0} bestand (en) naar map {1}",
"fr": "Chargement de {0} fichier(s) dans le dossier {1}",
"xloc": [
"default.handlebars->29->1690"
]
@ -9606,6 +9608,7 @@
{
"en": "Create folder if it does not exists?",
"nl": "Map aanmaken als deze niet bestaat?",
"fr": "Créer le répertoire si il n'existe pas ?",
"xloc": [
"default.handlebars->29->478"
]
@ -15222,7 +15225,8 @@
]
},
{
"en": "File Files"
"en": "File Files",
"fr": "Rechercher des fichiers"
},
{
"cs": "Provoz souboru",
@ -15404,12 +15408,14 @@
{
"en": "Find",
"nl": "Zoeken",
"fr": "Rechercher",
"xloc": [
"default.handlebars->container->column_l->p13->p13toolbar->1->2->1->3"
]
},
{
"en": "Find Files",
"fr": "Recherche des fichiers",
"xloc": [
"default.handlebars->29->896"
]
@ -18163,6 +18169,7 @@
{
"en": "Intel&reg; AMT ACM",
"nl": "Intel&reg; AMT ACM",
"fr": "Intel® AMT ACM",
"xloc": [
"default.handlebars->29->307"
]
@ -20929,6 +20936,7 @@
{
"en": "Linux Path",
"nl": "Linux Pad",
"fr": "Chemin Linux",
"xloc": [
"default.handlebars->29->477"
]
@ -21116,6 +21124,7 @@
},
{
"en": "Live Graph",
"fr": "Utilisation du processeur et de la mémoire",
"xloc": [
"default.handlebars->container->column_l->p17->p17info->p17graph->1->1->0->3->1->0"
]
@ -25012,6 +25021,7 @@
},
{
"en": "No files found",
"fr": "Aucun fichier trouvé",
"xloc": [
"default.handlebars->29->887"
]
@ -26367,6 +26377,7 @@
{
"en": "Overwrite if file exists?",
"nl": "Overschrijven als bestand bestaat?",
"fr": "Ecraser les fichiers existants ?",
"xloc": [
"default.handlebars->29->479"
]
@ -32959,6 +32970,7 @@
},
{
"en": "Show device CPU and memory usage.",
"fr": "Afficher l'utilisation du CPU et de la mémoire",
"xloc": [
"default.handlebars->container->column_l->p17->p17title->devListToolbarViewIcons3"
]
@ -37733,6 +37745,7 @@
{
"en": "Upload files",
"nl": "Upload bestanden",
"fr": "Charger les fichiers",
"xloc": [
"default.handlebars->29->445"
]
@ -37780,6 +37793,7 @@
{
"en": "Upload selected files to all selected devices",
"nl": "Upload de geselecteerde bestanden naar alle geselecteerde apparaten",
"fr": "Charger ces fichiers sur les appareils sélectionnés",
"xloc": [
"default.handlebars->29->475"
]
@ -40086,6 +40100,7 @@
{
"en": "Windows Path",
"nl": "Windows Pad",
"fr": "Chemin Windows",
"xloc": [
"default.handlebars->29->476"
]

View File

@ -3236,13 +3236,18 @@ module.exports.CreateWebServer = function (parent, db, args, certificates) {
// Send the agent commands to perform the batch upload operation
for (var f in cmd.files) {
try {
if ((agentPath != null) && (cmd.files[f].name != null)) {
//if ((agentPath != null) && (cmd.files[f].name != null)) {
const acmd = { action: 'wget', overwrite: cmd.overwrite, createFolder: cmd.createFolder, urlpath: '/agentdownload.ashx?c=' + obj.parent.encodeCookie({ a: 'tmpdl', d: cmd.domain.id, nid: node._id, f: cmd.files[f].target }, obj.parent.loginCookieEncryptionKey), path: obj.path.join(agentPath, cmd.files[f].name), folder: agentPath, servertlshash: tlsCertHash };
var agent = obj.wsagents[node._id];
if (agent != null) { try { agent.send(JSON.stringify(acmd)); } catch (ex) { } }
// TODO: Add support for peer servers.
}
} catch (ex) { }
//}
} catch (ex) {
parent.debug('web', 'Exception: ' + ex);
parent.debug('web', 'AgentPath: ' + agentPath);
parent.debug('web', 'Command: ' + JSON.stringify(cmd));
parent.debug('web', 'AgentId: ' + node.agent.id);
}
}
});
}