mirror of
https://github.com/louislam/uptime-kuma.git
synced 2024-12-17 18:37:16 +00:00
7a82ae039c
Co-authored-by: Jochem Pluim <jochem@pluim.nu> Co-authored-by: Zandor Smith <info@zsinfo.nl> Co-authored-by: Anonymous <noreply@weblate.org> Co-authored-by: Ryo Hanafusa <ryo7gumi@gmail.com> Co-authored-by: Eduard Dev <legocuedy09@gmail.com> Co-authored-by: Gunnar Norin <gunnar.norin@gmail.com> Co-authored-by: AmadeusGraves <angelfx19@gmail.com> Co-authored-by: Dan Misener <dan@misener.org> Co-authored-by: Алексей Добрый <support@diera.ru> Co-authored-by: Ilkka Myller <ilkka.myller@nodefield.com> Co-authored-by: Nelson Chan <chakflying@hotmail.com> Co-authored-by: Lance <2124757129@qq.com> Co-authored-by: Peter Dave Hello <hsu@peterdavehello.org> Co-authored-by: PhongPham <pttphong1202@gmail.com>
25 lines
557 B
JavaScript
25 lines
557 B
JavaScript
// For #5231
|
|
|
|
const fs = require("fs");
|
|
|
|
let path = "../src/lang";
|
|
|
|
// list directories in the lang directory
|
|
let jsonFileList = fs.readdirSync(path);
|
|
|
|
for (let jsonFile of jsonFileList) {
|
|
if (!jsonFile.endsWith(".json")) {
|
|
continue;
|
|
}
|
|
|
|
let jsonPath = path + "/" + jsonFile;
|
|
let langData = JSON.parse(fs.readFileSync(jsonPath, "utf8"));
|
|
|
|
for (let key in langData) {
|
|
if (langData[key] === "") {
|
|
delete langData[key];
|
|
}
|
|
}
|
|
|
|
fs.writeFileSync(jsonPath, JSON.stringify(langData, null, 4) + "\n");
|
|
}
|