From 833e7d00fe499c80a2edccbb153031e4c6a45a49 Mon Sep 17 00:00:00 2001 From: Temiralp Date: Sun, 2 Jun 2024 15:58:55 +0300 Subject: [PATCH] =?UTF-8?q?=C5=9Fu=20i=C5=9Fleri=20yapt=C4=B1m?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dev/migrateLangFormat.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dev/migrateLangFormat.js b/dev/migrateLangFormat.js index a529476071..21c42a629b 100644 --- a/dev/migrateLangFormat.js +++ b/dev/migrateLangFormat.js @@ -13,12 +13,15 @@ if (!fs.existsSync(oldLangsPath)) { langs.forEach((langFile) => { // Make a backup of the old file. - if (!fs.existsSync(path.resolve(oldLangsPath, langFile))) { + if (!fs.existsSync(path.resolve(oldLangs, langFile))) { fs.copyFileSync(path.resolve(langsPath, langFile), path.resolve(oldLangsPath, langFile)); } + + const lang = JSON.parse(fs.readFileSync(path.resolve(langsPath, langFile))); + JSON.parse(fs.readFileSync(path.resolve(langsPath, langFile))); const pattern = /(%[^\s^%]+)/g; const updatedLang = {}; Object.entries(lang).map(([langKey, string]) => {