Uniformly format translation files

This commit is contained in:
pietervdvn 2022-02-18 03:45:03 +01:00
parent d0f0f3ecc4
commit d5904b1714
28 changed files with 1209 additions and 1211 deletions

View file

@ -486,5 +486,4 @@
},
"tooLong": "Deze tekst is te lang. De tekst heeft {count} lettertekens, er mogen maximaal 255 letters zijn"
}
}

View file

@ -469,7 +469,7 @@ function mergeLayerTranslations() {
const layerFiles = ScriptUtils.getLayerFiles();
for (const layerFile of layerFiles) {
mergeLayerTranslation(layerFile.parsed, layerFile.path, loadTranslationFilesFrom("layers"))
writeFileSync(layerFile.path, JSON.stringify(layerFile.parsed, null, " "))
writeFileSync(layerFile.path, JSON.stringify(layerFile.parsed, null, " ")) // layers use 2 spaces
}
}
@ -484,7 +484,7 @@ function mergeThemeTranslations() {
const allTranslations = new TranslationPart();
allTranslations.recursiveAdd(config, themeFile.path)
writeFileSync(themeFile.path, JSON.stringify(config, null, " "))
writeFileSync(themeFile.path, JSON.stringify(config, null, " ")) // Themefiles use 2 spaces
}
}
@ -516,12 +516,11 @@ if (!themeOverwritesWeblate) {
compileTranslationsFromWeblate();
}
genTranslations()
formatFile("./langs/themes/nl.json")
/*const allTranslationFiles = ScriptUtils.readDirRecSync("langs").filter(path => path.endsWith(".json"))
const allTranslationFiles = ScriptUtils.readDirRecSync("langs").filter(path => path.endsWith(".json"))
for (const path of allTranslationFiles) {
console.log("Formatting ", path)
formatFile(path)
}*/
}
// SOme validation