11 lines
366 B
JavaScript
11 lines
366 B
JavaScript
// Converts translate.json file to translate.csv file
|
|
|
|
const fs = require("fs")
|
|
let inputFile = JSON.parse(fs.readFileSync('translations/translate.json', 'utf8'))
|
|
|
|
fs.writeFileSync("translate.csv", "")
|
|
for (const [key, value] of Object.entries(inputFile)){
|
|
fs.appendFileSync("translate.csv", `"${key}":"${key}"` + "\n")
|
|
}
|
|
|
|
console.log("Saved to translate.csv"); |