🌐 New language

This commit is contained in:
2024-08-13 23:01:40 +08:00
parent 950ee1f489
commit ce291d9a1a
3 changed files with 76 additions and 0 deletions

View File

@@ -0,0 +1,20 @@
import fs from "fs"
const tones = ["↑", "→", "↓", "↗", "↘"]
const raw = fs.readFileSync("../lang/zh-CN.json", "utf-8")
const original: { [id: string]: string } = JSON.parse(raw)
const result: { [id: string]: string } = {}
for (const key in original) {
let str = ""
for (const char of original[key]) {
const tone = tones[Math.floor(Math.random() * tones.length)]
str += "咩" + tone
}
result[key] = str
}
fs.writeFileSync("../lang/ml-SG.json", JSON.stringify(result))