mirror of
https://github.com/eliasstepanik/vdo.ninja.git
synced 2026-01-17 00:28:33 +00:00
less verbose functions, safer for loop
This commit is contained in:
parent
b973e16396
commit
22f34d6b1e
5
.github/ci-generateTranslations.js
vendored
5
.github/ci-generateTranslations.js
vendored
@ -22,14 +22,13 @@ global.document = new JSDOM(``, {
|
||||
|
||||
function downloadTranslation(filename, trans = {}) {
|
||||
// downloads the current translation to a file
|
||||
console.log("Saving translation: " + filename);
|
||||
console.log("Downloading translation: " + filename);
|
||||
const textDoc = JSON.stringify(trans, null, 2);
|
||||
|
||||
fs.writeFile(`translations/${filename}.json`, textDoc, function (err) {
|
||||
if (err) {
|
||||
return console.log(err);
|
||||
}
|
||||
console.log("The file was saved!");
|
||||
});
|
||||
|
||||
return trans;
|
||||
@ -129,7 +128,7 @@ combinedTrans.innerHTML = defaultTrans;
|
||||
combinedTrans.placeholders = defaultTransPlaceholders;
|
||||
|
||||
var counter = 0;
|
||||
for (const i in updateList) {
|
||||
for (var i = 0; i < updateList.length; i++) {
|
||||
const lang = updateList[i];
|
||||
|
||||
var translation = updateTranslation(lang); // we don't need to worry about DATA.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user