From fad62a28772dddf0c675bbcf386220475eb8c96b Mon Sep 17 00:00:00 2001 From: Pieter Vander Vennet Date: Thu, 9 Feb 2023 02:44:22 +0100 Subject: [PATCH] Fix removeTranslations-script --- scripts/removeTranslationString.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/removeTranslationString.ts b/scripts/removeTranslationString.ts index 08f26f482..f54d875fb 100644 --- a/scripts/removeTranslationString.ts +++ b/scripts/removeTranslationString.ts @@ -13,7 +13,7 @@ async function main(args: string[]) { console.log("Removing translation string ", path, "from the general translations") const files = ScriptUtils.readDirRecSync("./langs", 1).filter((f) => f.endsWith(".json")) 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) fs.writeFileSync(file, JSON.stringify(json, null, " ") + "\n") }