forked from MapComplete/MapComplete
Fix removeTranslations-script
This commit is contained in:
parent
b4ecd963fc
commit
fad62a2877
1 changed files with 1 additions and 1 deletions
|
@ -13,7 +13,7 @@ async function main(args: string[]) {
|
||||||
console.log("Removing translation string ", path, "from the general translations")
|
console.log("Removing translation string ", path, "from the general translations")
|
||||||
const files = ScriptUtils.readDirRecSync("./langs", 1).filter((f) => f.endsWith(".json"))
|
const files = ScriptUtils.readDirRecSync("./langs", 1).filter((f) => f.endsWith(".json"))
|
||||||
for (const file of files) {
|
for (const file of files) {
|
||||||
const json = JSON.parse(fs.readFileSync(file, "UTF-8"))
|
const json = JSON.parse(fs.readFileSync(file, { encoding: "utf-8" }))
|
||||||
Utils.WalkPath(path, json, (_) => undefined)
|
Utils.WalkPath(path, json, (_) => undefined)
|
||||||
fs.writeFileSync(file, JSON.stringify(json, null, " ") + "\n")
|
fs.writeFileSync(file, JSON.stringify(json, null, " ") + "\n")
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue