mirror of
https://gitlab.com/lecarore/breakout71.git
synced 2025-06-14 10:14:47 -04:00
15 lines
585 B
JavaScript
15 lines
585 B
JavaScript
// node checks.js
|
|
const fs= require('fs')
|
|
const files = fs.readdirSync('./src/i18n/')
|
|
for(let filename of files){
|
|
if(!filename.endsWith('.json')) continue
|
|
const content = JSON.parse(fs.readFileSync(`./src/i18n/${filename}`))
|
|
for(let key in content){
|
|
if(content[key].match(/<|>|http|puck|palet|퍽|disco|шайба|冰球|rondelle/gi)){
|
|
content[key]=''
|
|
console.log(`Removed ${key} of ${filename}`)
|
|
}
|
|
content[key]=content[key].trim()
|
|
}
|
|
fs.writeFileSync(`./src/i18n/${filename}`, JSON.stringify(content, null,4)+'\n')
|
|
}
|