1
0
mirror of https://github.com/louislam/uptime-kuma.git synced 2024-12-24 22:14:47 +02:00

add convert script

This commit is contained in:
401Unauthorized 2023-01-07 11:37:40 +08:00
parent bfa32f6b07
commit ceb7d48118
No known key found for this signature in database
39 changed files with 80 additions and 36 deletions

View File

@ -0,0 +1,3 @@
package-lock.json
test.js
languages/

View File

@ -0,0 +1,29 @@
// Need to use ES6 to read language files
import fs from "fs";
import rmSync from "../fs-rmSync.js";
async function convent(langCode) {
fs.copyFileSync(`../../src/languages/${langCode}.js`, `./languages/${langCode}.js`);
const lang = (await import(`./languages/${langCode}.js`)).default;
// console.log(JSON.stringify(lang));
fs.writeFile(`../../src/lang/${langCode}.json`, JSON.stringify(lang, null, 4), function (err) {
if (err) {
throw err;
}
console.log(`Convent success for ${langCode}`);
});
}
if (fs.existsSync("./languages")) {
rmSync("./languages", { recursive: true });
}
fs.mkdirSync("./languages");
let files = fs.readdirSync("../../src/languages/");
console.log(files);
files.forEach(async (filename) => {
if (filename !== "README.md") {
await convent(filename.replace(".js", ""));
}
});

View File

@ -0,0 +1,12 @@
{
"name": "convert-language-files",
"type": "module",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"license": "ISC"
}

View File

@ -669,4 +669,4 @@
"General Monitor Type": "Общ тип монитор",
"Passive Monitor Type": "Пасивет тип монитор",
"Specific Monitor Type": "Специфичен тип монитор"
}
}

View File

@ -623,4 +623,4 @@
"Enable": "Povolit",
"Disable": "Zakázat",
"dnsCacheDescription": "V některých prostředích IPv6 nemusí fungovat. Pokud narazíte na nějaké problémy, vypněte jej."
}
}

View File

@ -352,4 +352,4 @@
"serwersmsPhoneNumber": "Telefonnummer",
"serwersmsSenderName": "SMS Afsender Navn (registreret via kundeportal)",
"stackfield": "Stackfield"
}
}

View File

@ -631,4 +631,4 @@
"Display Timezone": "Zeitzone anzeigen",
"Server Timezone": "Server Zeitzone",
"statusPageMaintenanceEndDate": "Ende"
}
}

View File

@ -638,4 +638,4 @@
"DateTime Range": "Datums- und Zeitbereich",
"Strategy": "Strategie",
"statusPageMaintenanceEndDate": "Ende"
}
}

View File

@ -584,4 +584,4 @@
"goAlert": "GoAlert",
"backupOutdatedWarning": "Καταργήθηκε: Επειδή προστέθηκαν πολλές δυνατότητες και αυτή η δυνατότητα δημιουργίας αντιγράφων ασφαλείας δεν διατηρείται πολη, δεν μπορεί να δημιουργήσει ή να επαναφέρει ένα πλήρες αντίγραφο ασφαλείας.",
"backupRecommend": "Παρακαλούμε δημιουργήστε αντίγραφα ασφαλείας του volume ή του φακέλου δεδομένων (./data/) απευθείας."
}
}

View File

@ -675,4 +675,4 @@
"General Monitor Type": "General Monitor Type",
"Passive Monitor Type": "Passive Monitor Type",
"Specific Monitor Type": "Specific Monitor Type"
}
}

View File

@ -206,4 +206,4 @@
"records": "registros",
"One record": "Un registro",
"steamApiKeyDescription": "Para monitorear un servidor de juegos de Steam, necesitas una clave Steam Web-API. Puedes registrar tu clave API aquí: "
}
}

View File

@ -206,4 +206,4 @@
"alertaApiKey": "API võti",
"alertaAlertState": "Häireseisund",
"alertaRecoverState": "Taasta algolek"
}
}

View File

@ -538,4 +538,4 @@
"Domain": "Domeinua",
"Workstation": "Lan gunea",
"disableCloudflaredNoAuthMsg": "Ez Auth moduan zaude, pasahitza ez da beharrezkoa."
}
}

View File

@ -205,4 +205,4 @@
"pushbullet": "Pushbullet",
"line": "Line Messenger",
"mattermost": "Mattermost"
}
}

View File

@ -669,4 +669,4 @@
"General Monitor Type": "Type de sonde générale",
"Passive Monitor Type": "Type de sonde passive",
"Specific Monitor Type": "Type de sonde spécifique"
}
}

View File

@ -669,4 +669,4 @@
"General Monitor Type": "מוניטור כללי",
"Passive Monitor Type": "מוניטור פסיבי",
"Specific Monitor Type": "סוג מוניטור ספציפי"
}
}

View File

@ -578,4 +578,4 @@
"Then choose an action, for example switch the scene to where an RGB light is red.": "Potrebno je i odabrati akciju za izvođenje na Home Assistantu.",
"Frontend Version": "Inačica sučelja",
"Frontend Version do not match backend version!": "Inačica sučelja ne odgovara poslužitelju!"
}
}

View File

@ -373,4 +373,4 @@
"alertaAlertState": "Figyelmeztetési állapot",
"alertaRecoverState": "Visszaállási állapot",
"deleteStatusPageMsg": "Biztos, hogy törölni akarja a státusz oldalt?"
}
}

View File

@ -582,4 +582,4 @@
"goAlert": "GoAlert",
"backupOutdatedWarning": "Tidak digunakan lagi: Karena banyak fitur ditambahkan dan fitur cadangan ini agak tidak terawat, itu tidak dapat menghasilkan atau memulihkan cadangan lengkap.",
"backupRecommend": "Harap cadangkan volume atau folder data (./data/) secara langsung."
}
}

View File

@ -364,4 +364,4 @@
"smtpDkimheaderFieldNames": "Campi Intestazione da firmare (opzionale)",
"smtpDkimskipFields": "Campi Intestazione da non firmare (opzionale)",
"GoogleChat": "Google Chat (solo per Google Workspace)"
}
}

View File

@ -198,4 +198,4 @@
"pushbullet": "Pushbullet",
"line": "Line Messenger",
"mattermost": "Mattermost"
}
}

View File

@ -528,4 +528,4 @@
"Go back to the previous page.": "이전 페이지로 돌아가기",
"Coming Soon": "Coming Soon...",
"wayToGetClickSendSMSToken": "{0}에서 API 사용자 이름과 키를 얻을 수 있어요."
}
}

View File

@ -282,4 +282,4 @@
"promosmsTypeSpeed": "SMS SPEED - Høyest prioritet i systemet.Veldig rask på pålitelig, men dyrt (omtrent det dobbeltet av SMS FULL pris).",
"promosmsPhoneNumber": "Telefonnummber (for polske mottakere. Du trenger ikke områdekode.)",
"promosmsSMSSender": "SMS Avsendernavn : Forhåndsregistert navn eller en av standardnavnene: InfoSMS, SMS Info, MaxSMS, INFO, SMS"
}
}

View File

@ -528,4 +528,4 @@
"Domain": "Domein",
"Workstation": "Werkstation",
"disableCloudflaredNoAuthMsg": "De \"Geen authenticatie\" modus staat aan, wachtwoord is niet vereist."
}
}

View File

@ -641,4 +641,4 @@
"Display Timezone": "Wyświetlana strefa czasowa",
"Server Timezone": "Strefa czasowa serwera",
"statusPageMaintenanceEndDate": "Koniec"
}
}

View File

@ -200,4 +200,4 @@
"pushbullet": "Pushbullet",
"line": "Line Messenger",
"mattermost": "Mattermost"
}
}

View File

@ -200,4 +200,4 @@
"pushbullet": "Pushbullet",
"line": "Line Messenger",
"mattermost": "Mattermost"
}
}

View File

@ -578,4 +578,4 @@
"SMSManager": "SMSManager",
"You can divide numbers with": "Вы можете делить числа с",
"or": "или"
}
}

View File

@ -354,4 +354,4 @@
"serwersmsPhoneNumber": "Telefonska številka",
"serwersmsSenderName": "Ime SMS pošiljatelja (registrirani prek portala za stranke)",
"stackfield": "Stackfield"
}
}

View File

@ -201,4 +201,4 @@
"pushbullet": "Pushbullet",
"line": "Line Messenger",
"mattermost": "Mattermost"
}
}

View File

@ -201,4 +201,4 @@
"pushbullet": "Pushbullet",
"line": "Line Messenger",
"mattermost": "Mattermost"
}
}

View File

@ -107,4 +107,4 @@
"Repeat Password": "Upprepa Lösenord",
"respTime": "Svarstid (ms)",
"notAvailableShort": "Ej Tillg."
}
}

View File

@ -577,4 +577,4 @@
"Then choose an action, for example switch the scene to where an RGB light is red.": "จากนั้นเลือกการกระทำ, ตัวอย่าง เช่น เปลี่ยนเป็นไฟสีแดง",
"Frontend Version": "เวอร์ชั่น Frontend",
"Frontend Version do not match backend version!": "เวอร์ชั่น Frontend ไม่ตรงกับ Backend !"
}
}

View File

@ -675,4 +675,4 @@
"General Monitor Type": "Genel Monitör Tipi",
"Passive Monitor Type": "Pasif Monitör Tipi",
"Specific Monitor Type": "Özel Monitör Tipi"
}
}

View File

@ -527,4 +527,4 @@
"Domain": "Домен",
"Workstation": "Робоча станція",
"disableCloudflaredNoAuthMsg": "Ви перебуваєте в режимі без авторизації, пароль не потрібен."
}
}

View File

@ -466,4 +466,4 @@
"Domain Names": "Domain Names",
"signedInDisp": "Signed in as {0}",
"signedInDispDisabled": "Auth Disabled."
}
}

View File

@ -680,4 +680,4 @@
"General Monitor Type": "常规监控类型",
"Passive Monitor Type": "被动监控类型",
"Specific Monitor Type": "针对监控类型"
}
}

View File

@ -385,4 +385,4 @@
"Enable DNS Cache": "啟用 DNS 快取",
"Enable": "啟用",
"Disable": "停用"
}
}

View File

@ -669,4 +669,4 @@
"General Monitor Type": "一般監測器類型",
"Passive Monitor Type": "被動監測器類型",
"Specific Monitor Type": "指定監測器類型"
}
}