mirror of
https://github.com/kasmtech/KasmVNC.git
synced 2025-06-27 13:11:30 +02:00
Fix trivial lint issues in translation tools
Indentation, missing semicolon, etc.
This commit is contained in:
parent
f21fb95bb9
commit
5b73c1ca23
@ -32,7 +32,7 @@ if (opt.argv.length != 2) {
|
|||||||
|
|
||||||
const data = po2json.parseFileSync(opt.argv[0]);
|
const data = po2json.parseFileSync(opt.argv[0]);
|
||||||
|
|
||||||
const bodyPart = Object.keys(data).filter((msgid) => msgid !== "").map((msgid) => {
|
const bodyPart = Object.keys(data).filter(msgid => msgid !== "").map((msgid) => {
|
||||||
if (msgid === "") return;
|
if (msgid === "") return;
|
||||||
const msgstr = data[msgid][1];
|
const msgstr = data[msgid][1];
|
||||||
return " " + JSON.stringify(msgid) + ": " + JSON.stringify(msgstr);
|
return " " + JSON.stringify(msgid) + ": " + JSON.stringify(msgstr);
|
||||||
|
@ -22,7 +22,7 @@ function addString(str, location) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (strings[str] === undefined) {
|
if (strings[str] === undefined) {
|
||||||
strings[str] = {}
|
strings[str] = {};
|
||||||
}
|
}
|
||||||
strings[str][location] = null;
|
strings[str][location] = null;
|
||||||
}
|
}
|
||||||
@ -74,7 +74,7 @@ function process(elem, locator, enabled) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
for (let i = 0; i < elem.childNodes.length; i++) {
|
for (let i = 0; i < elem.childNodes.length; i++) {
|
||||||
node = elem.childNodes[i];
|
let node = elem.childNodes[i];
|
||||||
if (node.nodeType === node.ELEMENT_NODE) {
|
if (node.nodeType === node.ELEMENT_NODE) {
|
||||||
process(node, locator, enabled);
|
process(node, locator, enabled);
|
||||||
} else if (node.nodeType === node.TEXT_NODE && enabled) {
|
} else if (node.nodeType === node.TEXT_NODE && enabled) {
|
||||||
@ -89,18 +89,18 @@ for (let i = 0; i < opt.argv.length; i++) {
|
|||||||
const dom = new jsdom.JSDOM(file, { includeNodeLocations: true });
|
const dom = new jsdom.JSDOM(file, { includeNodeLocations: true });
|
||||||
const body = dom.window.document.body;
|
const body = dom.window.document.body;
|
||||||
|
|
||||||
function locator(elem) {
|
let locator = (elem) => {
|
||||||
const offset = dom.nodeLocation(elem).startOffset;
|
const offset = dom.nodeLocation(elem).startOffset;
|
||||||
const line = file.slice(0, offset).split("\n").length;
|
const line = file.slice(0, offset).split("\n").length;
|
||||||
return fn + ":" + line;
|
return fn + ":" + line;
|
||||||
}
|
};
|
||||||
|
|
||||||
process(body, locator, true);
|
process(body, locator, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
let output = "";
|
let output = "";
|
||||||
|
|
||||||
for (str in strings) {
|
for (let str in strings) {
|
||||||
output += "#:";
|
output += "#:";
|
||||||
for (location in strings[str]) {
|
for (location in strings[str]) {
|
||||||
output += " " + location;
|
output += " " + location;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user