commit
f24002838c
@ -0,0 +1,3 @@
|
||||
package-lock.json
|
||||
test.js
|
||||
languages/
|
@ -0,0 +1,77 @@
|
||||
// Need to use es6 to read language files
|
||||
|
||||
import fs from "fs";
|
||||
import path from "path";
|
||||
import util from "util";
|
||||
|
||||
// https://stackoverflow.com/questions/13786160/copy-folder-recursively-in-node-js
|
||||
/**
|
||||
* Look ma, it's cp -R.
|
||||
* @param {string} src The path to the thing to copy.
|
||||
* @param {string} dest The path to the new copy.
|
||||
*/
|
||||
const copyRecursiveSync = function (src, dest) {
|
||||
let exists = fs.existsSync(src);
|
||||
let stats = exists && fs.statSync(src);
|
||||
let isDirectory = exists && stats.isDirectory();
|
||||
if (isDirectory) {
|
||||
fs.mkdirSync(dest);
|
||||
fs.readdirSync(src).forEach(function (childItemName) {
|
||||
copyRecursiveSync(path.join(src, childItemName),
|
||||
path.join(dest, childItemName));
|
||||
});
|
||||
} else {
|
||||
fs.copyFileSync(src, dest);
|
||||
}
|
||||
};
|
||||
console.log(process.argv)
|
||||
const baseLangCode = process.argv[2] || "zh-HK";
|
||||
console.log("Base Lang: " + baseLangCode);
|
||||
fs.rmdirSync("./languages", { recursive: true });
|
||||
copyRecursiveSync("../../src/languages", "./languages");
|
||||
|
||||
const en = (await import("./languages/en.js")).default;
|
||||
const baseLang = (await import(`./languages/${baseLangCode}.js`)).default;
|
||||
const files = fs.readdirSync("./languages");
|
||||
console.log(files);
|
||||
for (const file of files) {
|
||||
if (file.endsWith(".js")) {
|
||||
console.log("Processing " + file);
|
||||
const lang = await import("./languages/" + file);
|
||||
|
||||
let obj;
|
||||
|
||||
if (lang.default) {
|
||||
console.log("is js module");
|
||||
obj = lang.default;
|
||||
} else {
|
||||
console.log("empty file");
|
||||
obj = {
|
||||
languageName: "<Your Language name in your language (not in English)>"
|
||||
};
|
||||
}
|
||||
|
||||
// En first
|
||||
for (const key in en) {
|
||||
if (! obj[key]) {
|
||||
obj[key] = en[key];
|
||||
}
|
||||
}
|
||||
|
||||
// Base second
|
||||
for (const key in baseLang) {
|
||||
if (! obj[key]) {
|
||||
obj[key] = key;
|
||||
}
|
||||
}
|
||||
|
||||
const code = "export default " + util.inspect(obj, {
|
||||
depth: null,
|
||||
});
|
||||
|
||||
fs.writeFileSync(`../../src/languages/${file}`, code);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
fs.rmdirSync("./languages", { recursive: true });
|
@ -0,0 +1,12 @@
|
||||
{
|
||||
"name": "update-language-files",
|
||||
"type": "module",
|
||||
"version": "1.0.0",
|
||||
"description": "",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
},
|
||||
"author": "",
|
||||
"license": "ISC"
|
||||
}
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,10 @@
|
||||
# How to translate
|
||||
|
||||
1. Fork this repo.
|
||||
2. Create a language file. (e.g. zh-TW.js) The filename must be ISO language code: http://www.lingoes.net/en/translator/langcode.htm
|
||||
3. `npm run update-language-files --base-lang=de-DE`
|
||||
6. Your language file should be filled in. You can translate now.
|
||||
7. Make a pull request when you have done.
|
||||
|
||||
If you do not have programming skills, let me know in Issue section. I will assist you. 😏
|
||||
|
@ -0,0 +1,109 @@
|
||||
export default {
|
||||
languageName: "Danish",
|
||||
Settings: "Indstillinger",
|
||||
Dashboard: "Dashboard",
|
||||
"New Update": "Opdatering tilgængelig",
|
||||
Language: "Sprog",
|
||||
Appearance: "Udseende",
|
||||
Theme: "Tema",
|
||||
General: "Generelt",
|
||||
Version: "Version",
|
||||
"Check Update On GitHub": "Tjek efter opdateringer på Github",
|
||||
List: "Liste",
|
||||
Add: "Tilføj",
|
||||
"Add New Monitor": "Tilføj ny Overvåger",
|
||||
"Quick Stats": "Oversigt",
|
||||
Up: "Aktiv",
|
||||
Down: "Inaktiv",
|
||||
Pending: "Afventer",
|
||||
Unknown: "Ukendt",
|
||||
Pause: "Pause",
|
||||
pauseDashboardHome: "Pauset",
|
||||
Name: "Navn",
|
||||
Status: "Status",
|
||||
DateTime: "Dato / Tid",
|
||||
Message: "Beskeder",
|
||||
"No important events": "Inden vigtige begivenheder",
|
||||
Resume: "Fortsæt",
|
||||
Edit: "Rediger",
|
||||
Delete: "Slet",
|
||||
Current: "Aktuelt",
|
||||
Uptime: "Oppetid",
|
||||
"Cert Exp.": "Certifikatets udløb",
|
||||
days: "Dage",
|
||||
day: "Dag",
|
||||
"-day": "-Dage",
|
||||
hour: "Timer",
|
||||
"-hour": "-Timer",
|
||||
checkEverySecond: "Tjek hvert {0} sekund",
|
||||
"Avg.": "Gennemsnit",
|
||||
Response: " Respons",
|
||||
Ping: "Ping",
|
||||
"Monitor Type": "Overvåger Type",
|
||||
Keyword: "Nøgleord",
|
||||
"Friendly Name": "Visningsnavn",
|
||||
URL: "URL",
|
||||
Hostname: "Hostname",
|
||||
Port: "Port",
|
||||
"Heartbeat Interval": "Taktinterval",
|
||||
Retries: "Gentagelser",
|
||||
retriesDescription: "Maksimalt antal gentagelser, før tjenesten markeres som inaktiv og sender en meddelelse.",
|
||||
Advanced: "Avanceret",
|
||||
ignoreTLSError: "Ignorere TLS/SSL web fejl",
|
||||
"Upside Down Mode": "Omvendt tilstand",
|
||||
upsideDownModeDescription: "Håndter tilstanden omvendt. Hvis tjenesten er tilgængelig, vises den som inaktiv.",
|
||||
"Max. Redirects": "Maks. Omdirigeringer",
|
||||
maxRedirectDescription: "Maksimalt antal omdirigeringer, der skal følges. Indstil til 0 for at deaktivere omdirigeringer.",
|
||||
"Accepted Status Codes": "Tilladte HTTP-Statuskoder",
|
||||
acceptedStatusCodesDescription: "Vælg de statuskoder, der stadig skal vurderes som vellykkede.",
|
||||
Save: "Gem",
|
||||
Notifications: "Underretninger",
|
||||
"Not available, please setup.": "Ikke tilgængelige, opsæt venligst.",
|
||||
"Setup Notification": "Opsæt underretninger",
|
||||
Light: "Lys",
|
||||
Dark: "Mørk",
|
||||
Auto: "Auto",
|
||||
"Theme - Heartbeat Bar": "Tema - Tidslinje",
|
||||
Normal: "Normal",
|
||||
Bottom: "Bunden",
|
||||
None: "Ingen",
|
||||
Timezone: "Tidszone",
|
||||
"Search Engine Visibility": "Søgemaskine synlighed",
|
||||
"Allow indexing": "Tillad indeksering",
|
||||
"Discourage search engines from indexing site": "Frabed søgemaskiner at indeksere webstedet",
|
||||
"Change Password": "Ændre adgangskode",
|
||||
"Current Password": "Nuværende adgangskode",
|
||||
"New Password": "Ny adgangskode",
|
||||
"Repeat New Password": "Gentag den nye adgangskode",
|
||||
passwordNotMatchMsg: "Adgangskoderne er ikke ens.",
|
||||
"Update Password": "Opdater adgangskode",
|
||||
"Disable Auth": "Deaktiver autentificering",
|
||||
"Enable Auth": "Aktiver autentificering",
|
||||
Logout: "Log ud",
|
||||
notificationDescription: "Tildel underretninger til Overvåger(e), så denne funktion træder i kraft.",
|
||||
Leave: "Verlassen",
|
||||
"I understand, please disable": "Jeg er indforstået, deaktiver venligst",
|
||||
Confirm: "Bekræft",
|
||||
Yes: "Ja",
|
||||
No: "Nej",
|
||||
Username: "Brugernavn",
|
||||
Password: "Adgangskode",
|
||||
"Remember me": "Husk mig",
|
||||
Login: "Log ind",
|
||||
"No Monitors, please": "Ingen Overvågere",
|
||||
"add one": "tilføj en",
|
||||
"Notification Type": "Underretningstype",
|
||||
"Email": "E-Mail",
|
||||
"Test": "Test",
|
||||
"Certificate Info": "Certifikatoplysninger",
|
||||
keywordDescription: "Søg efter et søgeord i almindelig HTML- eller JSON -output. Bemærk, at der skelnes mellem store og små bogstaver.",
|
||||
deleteMonitorMsg: "Er du sikker på, at du vil slette overvågeren?",
|
||||
deleteNotificationMsg: "Er du sikker på, at du vil slette denne underretning for alle overvågere? ",
|
||||
resoverserverDescription: "Cloudflare er standardserveren, den kan til enhver tid ændres.",
|
||||
"Resolver Server": "Navne-server",
|
||||
rrtypeDescription: "Vælg den type RR, du vil overvåge.",
|
||||
"Last Result": "Seneste resultat",
|
||||
pauseMonitorMsg: "Er du sikker på, at du vil pause Overvågeren?",
|
||||
"Create your admin account": "Opret din administratorkonto",
|
||||
"Repeat Password": "Gentag adgangskoden",
|
||||
}
|
@ -0,0 +1,108 @@
|
||||
export default {
|
||||
languageName: "Français (France)",
|
||||
Settings: "Paramètres",
|
||||
Dashboard: "Dashboard",
|
||||
"New Update": "Mise à jour disponible",
|
||||
Language: "Langue",
|
||||
Appearance: "Apparence",
|
||||
Theme: "Thème",
|
||||
General: "Général",
|
||||
Version: "Version",
|
||||
"Check Update On GitHub": "Consulter les mises à jour sur Github",
|
||||
List: "Lister",
|
||||
Add: "Ajouter",
|
||||
"Add New Monitor": "Ajouter un nouveau check",
|
||||
"Quick Stats": "Résumé",
|
||||
Up: "En ligne",
|
||||
Down: "Hors ligne",
|
||||
Pending: "Dans la file d'attente",
|
||||
Unknown: "Inconnu",
|
||||
Pause: "En Pause",
|
||||
pauseDashboardHome: "Éléments mis en pause",
|
||||
Name: "Nom",
|
||||
Status: "État",
|
||||
DateTime: "Heure",
|
||||
Message: "Messages",
|
||||
"No important events": "Pas d'évènements important",
|
||||
Resume: "Reprendre",
|
||||
Edit: "Modifier",
|
||||
Delete: "Supprimer",
|
||||
Current: "Actuellement",
|
||||
Uptime: "Uptime",
|
||||
"Cert Exp.": "Cert Exp.",
|
||||
days: "Jours",
|
||||
day: "Jour",
|
||||
"-day": "Demi-Journée",
|
||||
hour: "Heure",
|
||||
"-hour": "Demi-Heure",
|
||||
checkEverySecond: "Vérifier toutes les {0} secondes",
|
||||
"Avg.": "Moy.",
|
||||
Response: "Réponse",
|
||||
Ping: "Ping",
|
||||
"Monitor Type": "Type de Monitoring",
|
||||
Keyword: "Mot-clé",
|
||||
"Friendly Name": "Nom d'affichage",
|
||||
URL: "URL",
|
||||
Hostname: "Nom d'hôte",
|
||||
Port: "Port",
|
||||
"Heartbeat Interval": "Intervale de vérifications",
|
||||
Retries: "Essais",
|
||||
retriesDescription: "Nombre d'essais avant que le service soit déclaré hors-ligne.",
|
||||
Advanced: "Avancé",
|
||||
ignoreTLSError: "Ignorer les erreurs liées au certificat SSL/TLS",
|
||||
"Upside Down Mode": "Mode inversé",
|
||||
upsideDownModeDescription: "Si le service est en ligne il sera alors noté hors-ligne et vice-versa.",
|
||||
"Max. Redirects": "Redirections",
|
||||
maxRedirectDescription: "Nombre maximal de redirections avant que le service soit noté hors-ligne.",
|
||||
"Accepted Status Codes": "Codes HTTP",
|
||||
acceptedStatusCodesDescription: "Si les codes HTTP reçus sont ceux séléctionnés, alors le serveur sera noté en ligne.",
|
||||
Save: "Sauvegarder",
|
||||
Notifications: "Notifications",
|
||||
"Not available, please setup.": "Créez des notifications depuis les paramètres.",
|
||||
"Setup Notification": "Créer une notification",
|
||||
Light: "Clair",
|
||||
Dark: "Sombre",
|
||||
Auto: "Automatique",
|
||||
"Theme - Heartbeat Bar": "Voir les services monitorés",
|
||||
Normal: "Général",
|
||||
Bottom: "Au dessus",
|
||||
None: "Neutre",
|
||||
Timezone: "Fuseau Horaire",
|
||||
"Search Engine Visibility": "SEO",
|
||||
"Allow indexing": "Autoriser l'indexation par des moteurs de recherche",
|
||||
"Discourage search engines from indexing site": "Empêche les moteurs de recherche d'indexer votre site",
|
||||
"Change Password": "Changer le mot de passe",
|
||||
"Current Password": "Mot de passe actuel",
|
||||
"New Password": "Nouveau mot de passe",
|
||||
"Repeat New Password": "Répéter votre nouveau mot de passe",
|
||||
passwordNotMatchMsg: "Les mots de passe ne correspondent pas",
|
||||
"Update Password": "Mettre à jour le mot de passe",
|
||||
"Disable Auth": "Désactiver l'authentification intégrée",
|
||||
"Enable Auth": "Activer l'authentification",
|
||||
Logout: "Se déconnecter",
|
||||
notificationDescription: "Une fois ajoutée, vous devez l'activer manuellement dans les paramètres de vos hosts.",
|
||||
Leave: "Quitter",
|
||||
"I understand, please disable": "Je comprends, je l'ai désactivé",
|
||||
Confirm: "Confirmer",
|
||||
Yes: "Oui",
|
||||
No: "Non",
|
||||
Username: "Nom d'utilisateur",
|
||||
Password: "Mot de passe",
|
||||
"Remember me": "Se souvenir de moi",
|
||||
Login: "Se connecter",
|
||||
"No Monitors, please": "Pas de monitor, veuillez ",
|
||||
"add one": "en ajouter un.",
|
||||
"Notification Type": "Type de notification",
|
||||
Email: "Email",
|
||||
Test: "Tester",
|
||||
keywordDescription: "Le mot clé sera cherché dans la réponse HTML/JSON reçue du site internet.",
|
||||
"Certificate Info": "Des informations sur le certificat SSL",
|
||||
deleteMonitorMsg: "Êtes-vous sûr de vouloir supprimer ce monitor ?",
|
||||
deleteNotificationMsg: "Êtes-vous sûr de vouloir supprimer ce type de notifications ? Une fois désactivée, les services qui l'utilisent ne pourront plus envoyer de notifications.",
|
||||
"Resolver Server": "Serveur DNS utilisé",
|
||||
"Resource Record Type": "Type d'enregistrement DNS recherché",
|
||||
resoverserverDescription: "Le DNS de cloudflare est utilisé par défaut, mais vous pouvez le changer si vous le souhaitez.",
|
||||
rrtypeDescription: "Veuillez séléctionner un type d'enregistrement DNS",
|
||||
pauseMonitorMsg: "Are you sure want to pause?",
|
||||
"Last Result": "Last Result"
|
||||
}
|
Loading…
Reference in new issue