Logo
Explore Help
Register Sign In
rms/uptime-kuma
1
0
Fork 0
You've already forked uptime-kuma
mirror of https://github.com/louislam/uptime-kuma.git synced 2026-05-17 08:26:56 +03:00
Code Issues Packages Projects Releases Wiki Activity
Files
master
uptime-kuma/extra/remove-empty-lang-keys.js

26 lines
557 B
JavaScript
Raw Permalink Normal View History

Fix weblate conflict and new translations (#5232) 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>
2024-10-23 08:36:22 +08:00
// 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");
}
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.25.5 Page: 369ms Template: 3ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API