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:
parent
bfa32f6b07
commit
ceb7d48118
3
extra/convert-language-files/.gitignore
vendored
Normal file
3
extra/convert-language-files/.gitignore
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
package-lock.json
|
||||
test.js
|
||||
languages/
|
29
extra/convert-language-files/index.js
Normal file
29
extra/convert-language-files/index.js
Normal 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", ""));
|
||||
}
|
||||
});
|
12
extra/convert-language-files/package.json
Normal file
12
extra/convert-language-files/package.json
Normal 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"
|
||||
}
|
@ -669,4 +669,4 @@
|
||||
"General Monitor Type": "Общ тип монитор",
|
||||
"Passive Monitor Type": "Пасивет тип монитор",
|
||||
"Specific Monitor Type": "Специфичен тип монитор"
|
||||
}
|
||||
}
|
@ -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."
|
||||
}
|
||||
}
|
@ -352,4 +352,4 @@
|
||||
"serwersmsPhoneNumber": "Telefonnummer",
|
||||
"serwersmsSenderName": "SMS Afsender Navn (registreret via kundeportal)",
|
||||
"stackfield": "Stackfield"
|
||||
}
|
||||
}
|
@ -631,4 +631,4 @@
|
||||
"Display Timezone": "Zeitzone anzeigen",
|
||||
"Server Timezone": "Server Zeitzone",
|
||||
"statusPageMaintenanceEndDate": "Ende"
|
||||
}
|
||||
}
|
@ -638,4 +638,4 @@
|
||||
"DateTime Range": "Datums- und Zeitbereich",
|
||||
"Strategy": "Strategie",
|
||||
"statusPageMaintenanceEndDate": "Ende"
|
||||
}
|
||||
}
|
@ -584,4 +584,4 @@
|
||||
"goAlert": "GoAlert",
|
||||
"backupOutdatedWarning": "Καταργήθηκε: Επειδή προστέθηκαν πολλές δυνατότητες και αυτή η δυνατότητα δημιουργίας αντιγράφων ασφαλείας δεν διατηρείται πολη, δεν μπορεί να δημιουργήσει ή να επαναφέρει ένα πλήρες αντίγραφο ασφαλείας.",
|
||||
"backupRecommend": "Παρακαλούμε δημιουργήστε αντίγραφα ασφαλείας του volume ή του φακέλου δεδομένων (./data/) απευθείας."
|
||||
}
|
||||
}
|
@ -675,4 +675,4 @@
|
||||
"General Monitor Type": "General Monitor Type",
|
||||
"Passive Monitor Type": "Passive Monitor Type",
|
||||
"Specific Monitor Type": "Specific Monitor Type"
|
||||
}
|
||||
}
|
@ -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í: "
|
||||
}
|
||||
}
|
@ -206,4 +206,4 @@
|
||||
"alertaApiKey": "API võti",
|
||||
"alertaAlertState": "Häireseisund",
|
||||
"alertaRecoverState": "Taasta algolek"
|
||||
}
|
||||
}
|
@ -538,4 +538,4 @@
|
||||
"Domain": "Domeinua",
|
||||
"Workstation": "Lan gunea",
|
||||
"disableCloudflaredNoAuthMsg": "Ez Auth moduan zaude, pasahitza ez da beharrezkoa."
|
||||
}
|
||||
}
|
@ -205,4 +205,4 @@
|
||||
"pushbullet": "Pushbullet",
|
||||
"line": "Line Messenger",
|
||||
"mattermost": "Mattermost"
|
||||
}
|
||||
}
|
@ -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"
|
||||
}
|
||||
}
|
@ -669,4 +669,4 @@
|
||||
"General Monitor Type": "מוניטור כללי",
|
||||
"Passive Monitor Type": "מוניטור פסיבי",
|
||||
"Specific Monitor Type": "סוג מוניטור ספציפי"
|
||||
}
|
||||
}
|
@ -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!"
|
||||
}
|
||||
}
|
@ -373,4 +373,4 @@
|
||||
"alertaAlertState": "Figyelmeztetési állapot",
|
||||
"alertaRecoverState": "Visszaállási állapot",
|
||||
"deleteStatusPageMsg": "Biztos, hogy törölni akarja a státusz oldalt?"
|
||||
}
|
||||
}
|
@ -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."
|
||||
}
|
||||
}
|
@ -364,4 +364,4 @@
|
||||
"smtpDkimheaderFieldNames": "Campi Intestazione da firmare (opzionale)",
|
||||
"smtpDkimskipFields": "Campi Intestazione da non firmare (opzionale)",
|
||||
"GoogleChat": "Google Chat (solo per Google Workspace)"
|
||||
}
|
||||
}
|
@ -198,4 +198,4 @@
|
||||
"pushbullet": "Pushbullet",
|
||||
"line": "Line Messenger",
|
||||
"mattermost": "Mattermost"
|
||||
}
|
||||
}
|
@ -528,4 +528,4 @@
|
||||
"Go back to the previous page.": "이전 페이지로 돌아가기",
|
||||
"Coming Soon": "Coming Soon...",
|
||||
"wayToGetClickSendSMSToken": "{0}에서 API 사용자 이름과 키를 얻을 수 있어요."
|
||||
}
|
||||
}
|
@ -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"
|
||||
}
|
||||
}
|
@ -528,4 +528,4 @@
|
||||
"Domain": "Domein",
|
||||
"Workstation": "Werkstation",
|
||||
"disableCloudflaredNoAuthMsg": "De \"Geen authenticatie\" modus staat aan, wachtwoord is niet vereist."
|
||||
}
|
||||
}
|
@ -641,4 +641,4 @@
|
||||
"Display Timezone": "Wyświetlana strefa czasowa",
|
||||
"Server Timezone": "Strefa czasowa serwera",
|
||||
"statusPageMaintenanceEndDate": "Koniec"
|
||||
}
|
||||
}
|
@ -200,4 +200,4 @@
|
||||
"pushbullet": "Pushbullet",
|
||||
"line": "Line Messenger",
|
||||
"mattermost": "Mattermost"
|
||||
}
|
||||
}
|
@ -200,4 +200,4 @@
|
||||
"pushbullet": "Pushbullet",
|
||||
"line": "Line Messenger",
|
||||
"mattermost": "Mattermost"
|
||||
}
|
||||
}
|
@ -578,4 +578,4 @@
|
||||
"SMSManager": "SMSManager",
|
||||
"You can divide numbers with": "Вы можете делить числа с",
|
||||
"or": "или"
|
||||
}
|
||||
}
|
@ -354,4 +354,4 @@
|
||||
"serwersmsPhoneNumber": "Telefonska številka",
|
||||
"serwersmsSenderName": "Ime SMS pošiljatelja (registrirani prek portala za stranke)",
|
||||
"stackfield": "Stackfield"
|
||||
}
|
||||
}
|
@ -201,4 +201,4 @@
|
||||
"pushbullet": "Pushbullet",
|
||||
"line": "Line Messenger",
|
||||
"mattermost": "Mattermost"
|
||||
}
|
||||
}
|
@ -201,4 +201,4 @@
|
||||
"pushbullet": "Pushbullet",
|
||||
"line": "Line Messenger",
|
||||
"mattermost": "Mattermost"
|
||||
}
|
||||
}
|
@ -107,4 +107,4 @@
|
||||
"Repeat Password": "Upprepa Lösenord",
|
||||
"respTime": "Svarstid (ms)",
|
||||
"notAvailableShort": "Ej Tillg."
|
||||
}
|
||||
}
|
@ -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 !"
|
||||
}
|
||||
}
|
@ -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"
|
||||
}
|
||||
}
|
@ -527,4 +527,4 @@
|
||||
"Domain": "Домен",
|
||||
"Workstation": "Робоча станція",
|
||||
"disableCloudflaredNoAuthMsg": "Ви перебуваєте в режимі без авторизації, пароль не потрібен."
|
||||
}
|
||||
}
|
@ -466,4 +466,4 @@
|
||||
"Domain Names": "Domain Names",
|
||||
"signedInDisp": "Signed in as {0}",
|
||||
"signedInDispDisabled": "Auth Disabled."
|
||||
}
|
||||
}
|
@ -680,4 +680,4 @@
|
||||
"General Monitor Type": "常规监控类型",
|
||||
"Passive Monitor Type": "被动监控类型",
|
||||
"Specific Monitor Type": "针对监控类型"
|
||||
}
|
||||
}
|
@ -385,4 +385,4 @@
|
||||
"Enable DNS Cache": "啟用 DNS 快取",
|
||||
"Enable": "啟用",
|
||||
"Disable": "停用"
|
||||
}
|
||||
}
|
@ -669,4 +669,4 @@
|
||||
"General Monitor Type": "一般監測器類型",
|
||||
"Passive Monitor Type": "被動監測器類型",
|
||||
"Specific Monitor Type": "指定監測器類型"
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user