From 58aa83331e55db31f30b2d6ef595c832826478f2 Mon Sep 17 00:00:00 2001 From: Adam Stachowicz Date: Tue, 28 Sep 2021 06:53:23 +0200 Subject: [PATCH 01/11] Fix Polish language, add missing `Status Page` i18n --- src/i18n.js | 6 +++--- src/languages/da-DK.js | 5 +++-- src/languages/de-DE.js | 3 ++- src/languages/en.js | 3 ++- src/languages/es-ES.js | 3 ++- src/languages/et-EE.js | 3 ++- src/languages/fr-FR.js | 3 ++- src/languages/it-IT.js | 3 ++- src/languages/ja.js | 3 ++- src/languages/ko-KR.js | 3 ++- src/languages/nl-NL.js | 3 ++- src/languages/pl.js | 7 ++++--- src/languages/pt-BR.js | 2 +- src/languages/ru-RU.js | 2 +- src/languages/sr-latn.js | 3 ++- src/languages/sr.js | 3 ++- src/languages/sv-SE.js | 3 ++- src/languages/tr-TR.js | 3 ++- src/languages/zh-CN.js | 3 ++- src/languages/zh-HK.js | 3 ++- 20 files changed, 42 insertions(+), 25 deletions(-) diff --git a/src/i18n.js b/src/i18n.js index 633a53ac..bd1811f6 100644 --- a/src/i18n.js +++ b/src/i18n.js @@ -3,7 +3,6 @@ import daDK from "./languages/da-DK"; import deDE from "./languages/de-DE"; import en from "./languages/en"; import esEs from "./languages/es-ES"; -import ptBR from "./languages/pt-BR"; import etEE from "./languages/et-EE"; import frFR from "./languages/fr-FR"; import itIT from "./languages/it-IT"; @@ -11,11 +10,12 @@ import ja from "./languages/ja"; import koKR from "./languages/ko-KR"; import nlNL from "./languages/nl-NL"; import pl from "./languages/pl"; +import ptBR from "./languages/pt-BR"; import ruRU from "./languages/ru-RU"; import sr from "./languages/sr"; import srLatn from "./languages/sr-latn"; -import trTR from "./languages/tr-TR"; import svSE from "./languages/sv-SE"; +import trTR from "./languages/tr-TR"; import zhCN from "./languages/zh-CN"; import zhHK from "./languages/zh-HK"; @@ -45,6 +45,6 @@ export const i18n = createI18n({ locale: localStorage.locale || "en", fallbackLocale: "en", silentFallbackWarn: true, - silentTranslationWarn: true, + silentTranslationWarn: false, messages: languageList, }); diff --git a/src/languages/da-DK.js b/src/languages/da-DK.js index e3d375ce..b9ce20ec 100644 --- a/src/languages/da-DK.js +++ b/src/languages/da-DK.js @@ -143,7 +143,7 @@ export default { "Show URI": "Vis URI", "Clear all statistics": "Ryd alle Statistikker", retryCheckEverySecond: "Prøv igen hvert {0} sekund.", - importHandleDescription: "Vælg 'Spring over eksisterende', hvis du vil springe over hver overvåger eller underretning med samme navn. 'Overskriv' sletter alle eksisterende overvågere og underretninger.", + importHandleDescription: "Vælg 'Spring over eksisterende', hvis du vil springe over hver overvåger eller underretning med samme navn. 'Overskriv' sletter alle eksisterende overvågere og underretninger.", confirmImportMsg: "Er du sikker på at importere sikkerhedskopien? Sørg for, at du har valgt den rigtige importindstilling.", "Heartbeat Retry Interval": "Heartbeat Gentagelsesinterval", "Import Backup": "Importer Backup", @@ -170,7 +170,7 @@ export default { "Avg. Ping": "Gns. Ping", "Avg. Response": "Gns. Respons", "Entry Page": "Entry Side", - "statusPageNothing": "Intet her, tilføj venligst en Gruppe eller en Overvåger.", + statusPageNothing: "Intet her, tilføj venligst en Gruppe eller en Overvåger.", "No Services": "Ingen Tjenester", "All Systems Operational": "Alle Systemer i Drift", "Partially Degraded Service": "Delvist Forringet Service", @@ -179,4 +179,5 @@ export default { "Add a monitor": "Tilføj en Overvåger", "Edit Status Page": "Rediger Statusside", "Go to Dashboard": "Gå til Dashboard", + "Status Page": "Status Page", }; diff --git a/src/languages/de-DE.js b/src/languages/de-DE.js index ef2f7653..96cd8a28 100644 --- a/src/languages/de-DE.js +++ b/src/languages/de-DE.js @@ -169,7 +169,7 @@ export default { "Avg. Ping": "Durchsch. Ping", "Avg. Response": "Durchsch. Antwort", "Entry Page": "Einstiegsseite", - "statusPageNothing": "Nichts ist hier, bitte füge eine Gruppe oder Monitor hinzu.", + statusPageNothing: "Nichts ist hier, bitte füge eine Gruppe oder Monitor hinzu.", "No Services": "Keine Dienste", "All Systems Operational": "Alle Systeme Betriebsbereit", "Partially Degraded Service": "Teilweise beeinträchtigter Dienst", @@ -178,4 +178,5 @@ export default { "Add a monitor": "Monitor hinzufügen", "Edit Status Page": "Bearbeite Statusseite", "Go to Dashboard": "Gehe zum Dashboard", + "Status Page": "Status Page", }; diff --git a/src/languages/en.js b/src/languages/en.js index 75d8f30c..280c29b9 100644 --- a/src/languages/en.js +++ b/src/languages/en.js @@ -169,7 +169,7 @@ export default { "Avg. Ping": "Avg. Ping", "Avg. Response": "Avg. Response", "Entry Page": "Entry Page", - "statusPageNothing": "Nothing here, please add a group or a monitor.", + statusPageNothing: "Nothing here, please add a group or a monitor.", "No Services": "No Services", "All Systems Operational": "All Systems Operational", "Partially Degraded Service": "Partially Degraded Service", @@ -178,4 +178,5 @@ export default { "Add a monitor": "Add a monitor", "Edit Status Page": "Edit Status Page", "Go to Dashboard": "Go to Dashboard", + "Status Page": "Status Page", }; diff --git a/src/languages/es-ES.js b/src/languages/es-ES.js index 7571b130..366291db 100644 --- a/src/languages/es-ES.js +++ b/src/languages/es-ES.js @@ -170,7 +170,7 @@ export default { "Avg. Ping": "Avg. Ping", "Avg. Response": "Avg. Response", "Entry Page": "Entry Page", - "statusPageNothing": "Nothing here, please add a group or a monitor.", + statusPageNothing: "Nothing here, please add a group or a monitor.", "No Services": "No Services", "All Systems Operational": "All Systems Operational", "Partially Degraded Service": "Partially Degraded Service", @@ -179,4 +179,5 @@ export default { "Add a monitor": "Add a monitor", "Edit Status Page": "Edit Status Page", "Go to Dashboard": "Go to Dashboard", + "Status Page": "Status Page", }; diff --git a/src/languages/et-EE.js b/src/languages/et-EE.js index b7d9722c..fe637de5 100644 --- a/src/languages/et-EE.js +++ b/src/languages/et-EE.js @@ -170,7 +170,7 @@ export default { "Avg. Ping": "Avg. Ping", "Avg. Response": "Avg. Response", "Entry Page": "Entry Page", - "statusPageNothing": "Nothing here, please add a group or a monitor.", + statusPageNothing: "Nothing here, please add a group or a monitor.", "No Services": "No Services", "All Systems Operational": "All Systems Operational", "Partially Degraded Service": "Partially Degraded Service", @@ -179,4 +179,5 @@ export default { "Add a monitor": "Add a monitor", "Edit Status Page": "Edit Status Page", "Go to Dashboard": "Go to Dashboard", + "Status Page": "Status Page", }; diff --git a/src/languages/fr-FR.js b/src/languages/fr-FR.js index bc3c5d5d..f1060077 100644 --- a/src/languages/fr-FR.js +++ b/src/languages/fr-FR.js @@ -170,7 +170,7 @@ export default { "Avg. Ping": "Ping moyen", "Avg. Response": "Réponse moyenne", "Entry Page": "Page d'accueil", - "statusPageNothing": "Rien ici, veuillez ajouter un groupe ou une sonde.", + statusPageNothing: "Rien ici, veuillez ajouter un groupe ou une sonde.", "No Services": "Aucun service", "All Systems Operational": "Tous les systèmes sont opérationnels", "Partially Degraded Service": "Service partiellement dégradé", @@ -179,4 +179,5 @@ export default { "Add a monitor": "Ajouter une sonde", "Edit Status Page": "Modifier la page de statut", "Go to Dashboard": "Accéder au tableau de bord", + "Status Page": "Status Page", }; diff --git a/src/languages/it-IT.js b/src/languages/it-IT.js index 9beb9db5..10c2df89 100644 --- a/src/languages/it-IT.js +++ b/src/languages/it-IT.js @@ -169,7 +169,7 @@ export default { "Avg. Ping": "Ping medio", "Avg. Response": "Risposta media", "Entry Page": "Entry Page", - "statusPageNothing": "Non c'è nulla qui, aggiungere un gruppo oppure un monitoraggio.", + statusPageNothing: "Non c'è nulla qui, aggiungere un gruppo oppure un monitoraggio.", "No Services": "Nessun Servizio", "All Systems Operational": "Tutti i sistemi sono operativi", "Partially Degraded Service": "Servizio parzialmente degradato", @@ -178,4 +178,5 @@ export default { "Add a monitor": "Aggiungi un monitoraggio", "Edit Status Page": "Modifica pagina di stato", "Go to Dashboard": "Vai al Cruscotto", + "Status Page": "Status Page", }; diff --git a/src/languages/ja.js b/src/languages/ja.js index bf8e3129..3462166b 100644 --- a/src/languages/ja.js +++ b/src/languages/ja.js @@ -170,7 +170,7 @@ export default { "Avg. Ping": "Avg. Ping", "Avg. Response": "Avg. Response", "Entry Page": "Entry Page", - "statusPageNothing": "Nothing here, please add a group or a monitor.", + statusPageNothing: "Nothing here, please add a group or a monitor.", "No Services": "No Services", "All Systems Operational": "All Systems Operational", "Partially Degraded Service": "Partially Degraded Service", @@ -179,4 +179,5 @@ export default { "Add a monitor": "Add a monitor", "Edit Status Page": "Edit Status Page", "Go to Dashboard": "Go to Dashboard", + "Status Page": "Status Page", }; diff --git a/src/languages/ko-KR.js b/src/languages/ko-KR.js index fb3d65ea..881d609e 100644 --- a/src/languages/ko-KR.js +++ b/src/languages/ko-KR.js @@ -170,7 +170,7 @@ export default { "Avg. Ping": "Avg. Ping", "Avg. Response": "Avg. Response", "Entry Page": "Entry Page", - "statusPageNothing": "Nothing here, please add a group or a monitor.", + statusPageNothing: "Nothing here, please add a group or a monitor.", "No Services": "No Services", "All Systems Operational": "All Systems Operational", "Partially Degraded Service": "Partially Degraded Service", @@ -179,4 +179,5 @@ export default { "Add a monitor": "Add a monitor", "Edit Status Page": "Edit Status Page", "Go to Dashboard": "Go to Dashboard", + "Status Page": "Status Page", }; diff --git a/src/languages/nl-NL.js b/src/languages/nl-NL.js index 78bbe5a8..b55e259b 100644 --- a/src/languages/nl-NL.js +++ b/src/languages/nl-NL.js @@ -170,7 +170,7 @@ export default { "Avg. Ping": "Avg. Ping", "Avg. Response": "Avg. Response", "Entry Page": "Entry Page", - "statusPageNothing": "Nothing here, please add a group or a monitor.", + statusPageNothing: "Nothing here, please add a group or a monitor.", "No Services": "No Services", "All Systems Operational": "All Systems Operational", "Partially Degraded Service": "Partially Degraded Service", @@ -179,4 +179,5 @@ export default { "Add a monitor": "Add a monitor", "Edit Status Page": "Edit Status Page", "Go to Dashboard": "Go to Dashboard", + "Status Page": "Status Page", }; diff --git a/src/languages/pl.js b/src/languages/pl.js index 00603914..ad10ceb0 100644 --- a/src/languages/pl.js +++ b/src/languages/pl.js @@ -169,14 +169,15 @@ export default { "Search...": "Szukaj...", "Avg. Ping": "Średni ping", "Avg. Response": "Średnia odpowiedź", - "Entry Page": "Wejdź na stronę", - "statusPageNothing": "Nic tu nie ma, dodaj monitor lub grupę.", + "Entry Page": "Strona główna", + statusPageNothing: "Nic tu nie ma, dodaj grupę lub monitor.", "No Services": "Brak usług", "All Systems Operational": "Wszystkie systemy działają", "Partially Degraded Service": "Częściowy błąd usługi", "Degraded Service": "Błąd usługi", "Add Group": "Dodaj grupę", - "Add a monitor": "Dodaj monitoe", + "Add a monitor": "Dodaj monitor", "Edit Status Page": "Edytuj stronę statusu", "Go to Dashboard": "Idź do panelu", + "Status Page": "Strona statusu", }; diff --git a/src/languages/pt-BR.js b/src/languages/pt-BR.js index 4fc22fef..4f65f603 100644 --- a/src/languages/pt-BR.js +++ b/src/languages/pt-BR.js @@ -170,7 +170,7 @@ export default { "Avg. Response": "Resposta Média. ", "Status Page": "Página de Status", "Entry Page": "Página de entrada", - "statusPageNothing": "Nada aqui, por favor, adicione um grupo ou monitor.", + statusPageNothing: "Nada aqui, por favor, adicione um grupo ou monitor.", "No Services": "Nenhum Serviço", "All Systems Operational": "Todos os Serviços Operacionais", "Partially Degraded Service": "Serviço parcialmente degradado", diff --git a/src/languages/ru-RU.js b/src/languages/ru-RU.js index 1686aec4..18d97305 100644 --- a/src/languages/ru-RU.js +++ b/src/languages/ru-RU.js @@ -180,7 +180,7 @@ export default { "Edit Status Page": "Редактировать", "Go to Dashboard": "Панель мониторов", "Status Page": "Статус сервисов", - "Discard": "Отмена", + Discard: "Отмена", "Create Incident": "Создать инцидент", "Switch to Dark Theme": "Тёмная тема", "Switch to Light Theme": "Светлая тема", diff --git a/src/languages/sr-latn.js b/src/languages/sr-latn.js index 51cb7f8f..3542e1d6 100644 --- a/src/languages/sr-latn.js +++ b/src/languages/sr-latn.js @@ -170,7 +170,7 @@ export default { "Avg. Ping": "Avg. Ping", "Avg. Response": "Avg. Response", "Entry Page": "Entry Page", - "statusPageNothing": "Nothing here, please add a group or a monitor.", + statusPageNothing: "Nothing here, please add a group or a monitor.", "No Services": "No Services", "All Systems Operational": "All Systems Operational", "Partially Degraded Service": "Partially Degraded Service", @@ -179,4 +179,5 @@ export default { "Add a monitor": "Add a monitor", "Edit Status Page": "Edit Status Page", "Go to Dashboard": "Go to Dashboard", + "Status Page": "Status Page", }; diff --git a/src/languages/sr.js b/src/languages/sr.js index 0c8b6ef4..9cb1379e 100644 --- a/src/languages/sr.js +++ b/src/languages/sr.js @@ -170,7 +170,7 @@ export default { "Avg. Ping": "Avg. Ping", "Avg. Response": "Avg. Response", "Entry Page": "Entry Page", - "statusPageNothing": "Nothing here, please add a group or a monitor.", + statusPageNothing: "Nothing here, please add a group or a monitor.", "No Services": "No Services", "All Systems Operational": "All Systems Operational", "Partially Degraded Service": "Partially Degraded Service", @@ -179,4 +179,5 @@ export default { "Add a monitor": "Add a monitor", "Edit Status Page": "Edit Status Page", "Go to Dashboard": "Go to Dashboard", + "Status Page": "Status Page", }; diff --git a/src/languages/sv-SE.js b/src/languages/sv-SE.js index de4fbcc7..ef66aca5 100644 --- a/src/languages/sv-SE.js +++ b/src/languages/sv-SE.js @@ -170,7 +170,7 @@ export default { "Avg. Ping": "Avg. Ping", "Avg. Response": "Avg. Response", "Entry Page": "Entry Page", - "statusPageNothing": "Nothing here, please add a group or a monitor.", + statusPageNothing: "Nothing here, please add a group or a monitor.", "No Services": "No Services", "All Systems Operational": "All Systems Operational", "Partially Degraded Service": "Partially Degraded Service", @@ -179,4 +179,5 @@ export default { "Add a monitor": "Add a monitor", "Edit Status Page": "Edit Status Page", "Go to Dashboard": "Go to Dashboard", + "Status Page": "Status Page", }; diff --git a/src/languages/tr-TR.js b/src/languages/tr-TR.js index c73775bb..908afe6d 100644 --- a/src/languages/tr-TR.js +++ b/src/languages/tr-TR.js @@ -169,7 +169,7 @@ export default { "Avg. Ping": "Avg. Ping", "Avg. Response": "Avg. Response", "Entry Page": "Entry Page", - "statusPageNothing": "Nothing here, please add a group or a monitor.", + statusPageNothing: "Nothing here, please add a group or a monitor.", "No Services": "No Services", "All Systems Operational": "All Systems Operational", "Partially Degraded Service": "Partially Degraded Service", @@ -178,4 +178,5 @@ export default { "Add a monitor": "Add a monitor", "Edit Status Page": "Edit Status Page", "Go to Dashboard": "Go to Dashboard", + "Status Page": "Status Page", }; diff --git a/src/languages/zh-CN.js b/src/languages/zh-CN.js index e9b1c20e..a784cd34 100644 --- a/src/languages/zh-CN.js +++ b/src/languages/zh-CN.js @@ -170,7 +170,7 @@ export default { "Avg. Ping": "平均Ping", "Avg. Response": "平均响应", "Entry Page": "入口页面", - "statusPageNothing": "这里什么也没有,请添加一个分组或一个监控项。", + statusPageNothing: "这里什么也没有,请添加一个分组或一个监控项。", "No Services": "无服务", "All Systems Operational": "所有服务运行正常", "Partially Degraded Service": "部分服务出现故障", @@ -179,4 +179,5 @@ export default { "Add a monitor": "添加监控项", "Edit Status Page": "编辑状态页", "Go to Dashboard": "前往仪表盘", + "Status Page": "Status Page", }; diff --git a/src/languages/zh-HK.js b/src/languages/zh-HK.js index 92714d71..df3cc416 100644 --- a/src/languages/zh-HK.js +++ b/src/languages/zh-HK.js @@ -170,7 +170,7 @@ export default { "Avg. Ping": "Avg. Ping", "Avg. Response": "Avg. Response", "Entry Page": "Entry Page", - "statusPageNothing": "Nothing here, please add a group or a monitor.", + statusPageNothing: "Nothing here, please add a group or a monitor.", "No Services": "No Services", "All Systems Operational": "All Systems Operational", "Partially Degraded Service": "Partially Degraded Service", @@ -179,4 +179,5 @@ export default { "Add a monitor": "Add a monitor", "Edit Status Page": "Edit Status Page", "Go to Dashboard": "Go to Dashboard", + "Status Page": "Status Page", }; From fa9d26416c4696aec6b520f7b05de71500a4fa84 Mon Sep 17 00:00:00 2001 From: Adam Stachowicz Date: Tue, 28 Sep 2021 07:02:19 +0200 Subject: [PATCH 02/11] `silentTranslationWarn` if not development --- src/i18n.js | 2 +- src/main.js | 9 ++++----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/i18n.js b/src/i18n.js index bd1811f6..a8a1a0cb 100644 --- a/src/i18n.js +++ b/src/i18n.js @@ -45,6 +45,6 @@ export const i18n = createI18n({ locale: localStorage.locale || "en", fallbackLocale: "en", silentFallbackWarn: true, - silentTranslationWarn: false, + silentTranslationWarn: process.env.NODE_ENV !== "development", messages: languageList, }); diff --git a/src/main.js b/src/main.js index 94807b44..79ba2d1d 100644 --- a/src/main.js +++ b/src/main.js @@ -1,7 +1,7 @@ import "bootstrap"; import { createApp, h } from "vue"; +import contenteditable from "vue-contenteditable"; import Toast from "vue-toastification"; -import contenteditable from "vue-contenteditable" import "vue-toastification/dist/index.css"; import App from "./App.vue"; import "./assets/app.scss"; @@ -9,10 +9,9 @@ import { i18n } from "./i18n"; import { FontAwesomeIcon } from "./icon.js"; import datetime from "./mixins/datetime"; import mobile from "./mixins/mobile"; +import publicMixin from "./mixins/public"; import socket from "./mixins/socket"; import theme from "./mixins/theme"; -import publicMixin from "./mixins/public"; - import { router } from "./router"; import { appName } from "./util.ts"; @@ -27,10 +26,10 @@ const app = createApp({ data() { return { appName: appName - } + }; }, render: () => h(App), -}) +}); app.use(router); app.use(i18n); From 8ae64843fcb2c9c5772bf47007486f4bb80f3564 Mon Sep 17 00:00:00 2001 From: Adam Stachowicz Date: Mon, 4 Oct 2021 23:32:16 +0200 Subject: [PATCH 03/11] run update-language-files --- src/languages/bg-BG.js | 18 ++++++++++++++++++ src/languages/da-DK.js | 17 +++++++++++++++++ src/languages/de-DE.js | 17 +++++++++++++++++ src/languages/en.js | 32 ++++++++++++++++---------------- src/languages/es-ES.js | 17 +++++++++++++++++ src/languages/et-EE.js | 35 ++++++++++++++++++++++++++--------- src/languages/fa.js | 17 +++++++++++++++++ src/languages/fr-FR.js | 17 +++++++++++++++++ src/languages/hu.js | 18 ++++++++++++++++++ src/languages/it-IT.js | 17 +++++++++++++++++ src/languages/ja.js | 17 +++++++++++++++++ src/languages/ko-KR.js | 17 +++++++++++++++++ src/languages/nl-NL.js | 17 +++++++++++++++++ src/languages/pl.js | 17 +++++++++++++++++ src/languages/pt-BR.js | 17 +++++++++++++++++ src/languages/ru-RU.js | 17 +++++++++++++++++ src/languages/sr-latn.js | 17 +++++++++++++++++ src/languages/sr.js | 17 +++++++++++++++++ src/languages/sv-SE.js | 17 +++++++++++++++++ src/languages/tr-TR.js | 17 +++++++++++++++++ src/languages/zh-CN.js | 17 +++++++++++++++++ src/languages/zh-HK.js | 17 +++++++++++++++++ 22 files changed, 384 insertions(+), 25 deletions(-) diff --git a/src/languages/bg-BG.js b/src/languages/bg-BG.js index fcf26606..ba910bb0 100644 --- a/src/languages/bg-BG.js +++ b/src/languages/bg-BG.js @@ -178,4 +178,22 @@ export default { "Add a monitor": "Добави монитор", "Edit Status Page": "Редактирай статус страница", "Go to Dashboard": "Към Таблото", + telegram: "Telegram", + webhook: "Webhook", + smtp: "Email (SMTP)", + discord: "Discord", + teams: "Microsoft Teams", + signal: "Signal", + gotify: "Gotify", + slack: "Slack", + "rocket.chat": "Rocket.chat", + pushover: "Pushover", + pushy: "Pushy", + octopush: "Octopush", + lunasea: "LunaSea", + apprise: "Apprise (Support 50+ Notification services)", + pushbullet: "Pushbullet", + line: "Line Messenger", + mattermost: "Mattermost", + "Status Page": "Status Page", }; diff --git a/src/languages/da-DK.js b/src/languages/da-DK.js index b9ce20ec..8df3627b 100644 --- a/src/languages/da-DK.js +++ b/src/languages/da-DK.js @@ -180,4 +180,21 @@ export default { "Edit Status Page": "Rediger Statusside", "Go to Dashboard": "Gå til Dashboard", "Status Page": "Status Page", + telegram: "Telegram", + webhook: "Webhook", + smtp: "Email (SMTP)", + discord: "Discord", + teams: "Microsoft Teams", + signal: "Signal", + gotify: "Gotify", + slack: "Slack", + "rocket.chat": "Rocket.chat", + pushover: "Pushover", + pushy: "Pushy", + octopush: "Octopush", + lunasea: "LunaSea", + apprise: "Apprise (Support 50+ Notification services)", + pushbullet: "Pushbullet", + line: "Line Messenger", + mattermost: "Mattermost", }; diff --git a/src/languages/de-DE.js b/src/languages/de-DE.js index 96cd8a28..c4e903b2 100644 --- a/src/languages/de-DE.js +++ b/src/languages/de-DE.js @@ -179,4 +179,21 @@ export default { "Edit Status Page": "Bearbeite Statusseite", "Go to Dashboard": "Gehe zum Dashboard", "Status Page": "Status Page", + telegram: "Telegram", + webhook: "Webhook", + smtp: "Email (SMTP)", + discord: "Discord", + teams: "Microsoft Teams", + signal: "Signal", + gotify: "Gotify", + slack: "Slack", + "rocket.chat": "Rocket.chat", + pushover: "Pushover", + pushy: "Pushy", + octopush: "Octopush", + lunasea: "LunaSea", + apprise: "Apprise (Support 50+ Notification services)", + pushbullet: "Pushbullet", + line: "Line Messenger", + mattermost: "Mattermost", }; diff --git a/src/languages/en.js b/src/languages/en.js index f8c9e0f5..d5d61c22 100644 --- a/src/languages/en.js +++ b/src/languages/en.js @@ -178,22 +178,22 @@ export default { "Add a monitor": "Add a monitor", "Edit Status Page": "Edit Status Page", "Go to Dashboard": "Go to Dashboard", - "telegram": "Telegram", - "webhook": "Webhook", - "smtp": "Email (SMTP)", - "discord": "Discord", - "teams": "Microsoft Teams", - "signal": "Signal", - "gotify": "Gotify", - "slack": "Slack", + telegram: "Telegram", + webhook: "Webhook", + smtp: "Email (SMTP)", + discord: "Discord", + teams: "Microsoft Teams", + signal: "Signal", + gotify: "Gotify", + slack: "Slack", "rocket.chat": "Rocket.chat", - "pushover": "Pushover", - "pushy": "Pushy", - "octopush": "Octopush", - "lunasea": "LunaSea", - "apprise": "Apprise (Support 50+ Notification services)", - "pushbullet": "Pushbullet", - "line": "Line Messenger", - "mattermost": "Mattermost", + pushover: "Pushover", + pushy: "Pushy", + octopush: "Octopush", + lunasea: "LunaSea", + apprise: "Apprise (Support 50+ Notification services)", + pushbullet: "Pushbullet", + line: "Line Messenger", + mattermost: "Mattermost", "Status Page": "Status Page", }; diff --git a/src/languages/es-ES.js b/src/languages/es-ES.js index 366291db..2558a686 100644 --- a/src/languages/es-ES.js +++ b/src/languages/es-ES.js @@ -180,4 +180,21 @@ export default { "Edit Status Page": "Edit Status Page", "Go to Dashboard": "Go to Dashboard", "Status Page": "Status Page", + telegram: "Telegram", + webhook: "Webhook", + smtp: "Email (SMTP)", + discord: "Discord", + teams: "Microsoft Teams", + signal: "Signal", + gotify: "Gotify", + slack: "Slack", + "rocket.chat": "Rocket.chat", + pushover: "Pushover", + pushy: "Pushy", + octopush: "Octopush", + lunasea: "LunaSea", + apprise: "Apprise (Support 50+ Notification services)", + pushbullet: "Pushbullet", + line: "Line Messenger", + mattermost: "Mattermost", }; diff --git a/src/languages/et-EE.js b/src/languages/et-EE.js index e9c7a217..8d98edae 100644 --- a/src/languages/et-EE.js +++ b/src/languages/et-EE.js @@ -16,7 +16,7 @@ export default { rrtypeDescription: "Vali kirje tüüp, mida soovid jälgida.", pauseMonitorMsg: "Kas soovid peatada seire?", Settings: "Seaded", - "Status Page": "Ülevaade", // hääletuse tulemus, teine: seisundileht, kolmas: Olukord/Olek + "Status Page": "Status Page", Dashboard: "Töölaud", "New Update": "Uuem tarkvara versioon on saadaval.", Language: "Keel", @@ -44,7 +44,7 @@ export default { Edit: "Muuda", Delete: "Eemalda", Current: "Hetkeseisund", - Uptime: "Eluiga", // todo: launchpad? + Uptime: "Eluiga", "Cert Exp.": "Sert. aegumine", days: "päeva", day: "päev", @@ -109,7 +109,7 @@ export default { "Create your admin account": "Admininstraatori konto loomine", "Repeat Password": "korda salasõna", respTime: "Reageerimisaeg (ms)", - notAvailableShort: "N/A", // tõlkimata, umbkaudu rahvusvaheline termin peaks sobima piisavalt + notAvailableShort: "N/A", enableDefaultNotificationDescription: "Kõik järgnevalt lisatud seired kasutavad seda teavitusteenuset. Seiretelt võib teavitusteenuse ühekaupa eemaldada.", clearEventsMsg: "Kas soovid seire kõik sündmused kustutada?", clearHeartbeatsMsg: "Kas soovid seire kõik tuksed kustutada?", @@ -122,7 +122,7 @@ export default { "Clear Data": "Eemalda andmed", Events: "Sündmused", Heartbeats: "Tuksed", - "Auto Get": "Hangi automaatselt", // hangi? kõlab liiga otsetõlge + "Auto Get": "Hangi automaatselt", backupDescription: "Varunda kõik seired ja teavitused JSON faili.", backupDescription2: "PS: Varukoopia EI sisalda seirete ajalugu ja sündmustikku.", backupDescription3: "Varukoopiad sisaldavad teavitusteenusete pääsuvõtmeid.", @@ -140,7 +140,7 @@ export default { "Two Factor Authentication": "Kaksikautentimine", Active: "kasutusel", Inactive: "seadistamata", - Token: "kaksikautentimise kood", // needs to compensate for no title + Token: "kaksikautentimise kood", "Show URI": "Näita URId", "Clear all statistics": "Tühjenda ajalugu", importHandleDescription: "'kombineeri' täiendab varukoopiast ja kirjutab üle samanimelised seireid ja teavitusteenused; 'lisa praegustele' jätab olemasolevad puutumata; 'asenda' kustutab ja asendab kõik seired ja teavitusteenused.", @@ -150,14 +150,14 @@ export default { "Export Backup": "Varukoopia eksportimine", "Skip existing": "lisa praegustele", Overwrite: "asenda", - Options: "Mestimisviis", // reusal of key would be chaos + Options: "Mestimisviis", "Keep both": "kombineeri", Tags: "Sildid", "Add New below or Select...": "Leia või lisa all uus…", "Tag with this name already exist.": "Selle nimega silt on juba olemas.", "Tag with this value already exist.": "Selle väärtusega silt on juba olemas.", color: "värvus", - "value (optional)": "väärtus (fakultatiivne)", // milline sõna! + "value (optional)": "väärtus (fakultatiivne)", Gray: "hall", Red: "punane", Orange: "oranž", @@ -167,7 +167,7 @@ export default { Purple: "lilla", Pink: "roosa", "Search...": "Otsi…", - "Avg. Ping": "Keskmine ping", // pikk, aga nagunii kahel real + "Avg. Ping": "Keskmine ping", "Avg. Response": "Keskmine reaktsiooniaeg", "Entry Page": "Avaleht", statusPageNothing: "Kippu ega kõppu; siia saab lisada seireid või -gruppe.", @@ -178,5 +178,22 @@ export default { "Add Group": "Lisa grupp", "Edit Status Page": "Muuda lehte", "Go to Dashboard": "Töölauale", - "Status Page": "Status Page", + checkEverySecond: "Check every {0} seconds.", + telegram: "Telegram", + webhook: "Webhook", + smtp: "Email (SMTP)", + discord: "Discord", + teams: "Microsoft Teams", + signal: "Signal", + gotify: "Gotify", + slack: "Slack", + "rocket.chat": "Rocket.chat", + pushover: "Pushover", + pushy: "Pushy", + octopush: "Octopush", + lunasea: "LunaSea", + apprise: "Apprise (Support 50+ Notification services)", + pushbullet: "Pushbullet", + line: "Line Messenger", + mattermost: "Mattermost", }; diff --git a/src/languages/fa.js b/src/languages/fa.js index 15478666..100577f4 100644 --- a/src/languages/fa.js +++ b/src/languages/fa.js @@ -187,4 +187,21 @@ export default { Last: "آخرین", Info: "اطلاعات", "Powered By": "نیرو گرفته از", + telegram: "Telegram", + webhook: "Webhook", + smtp: "Email (SMTP)", + discord: "Discord", + teams: "Microsoft Teams", + signal: "Signal", + gotify: "Gotify", + slack: "Slack", + "rocket.chat": "Rocket.chat", + pushover: "Pushover", + pushy: "Pushy", + octopush: "Octopush", + lunasea: "LunaSea", + apprise: "Apprise (Support 50+ Notification services)", + pushbullet: "Pushbullet", + line: "Line Messenger", + mattermost: "Mattermost", }; diff --git a/src/languages/fr-FR.js b/src/languages/fr-FR.js index f1060077..6ef69f0a 100644 --- a/src/languages/fr-FR.js +++ b/src/languages/fr-FR.js @@ -180,4 +180,21 @@ export default { "Edit Status Page": "Modifier la page de statut", "Go to Dashboard": "Accéder au tableau de bord", "Status Page": "Status Page", + telegram: "Telegram", + webhook: "Webhook", + smtp: "Email (SMTP)", + discord: "Discord", + teams: "Microsoft Teams", + signal: "Signal", + gotify: "Gotify", + slack: "Slack", + "rocket.chat": "Rocket.chat", + pushover: "Pushover", + pushy: "Pushy", + octopush: "Octopush", + lunasea: "LunaSea", + apprise: "Apprise (Support 50+ Notification services)", + pushbullet: "Pushbullet", + line: "Line Messenger", + mattermost: "Mattermost", }; diff --git a/src/languages/hu.js b/src/languages/hu.js index 9d3dbf6c..039cf670 100644 --- a/src/languages/hu.js +++ b/src/languages/hu.js @@ -178,4 +178,22 @@ export default { "Add a monitor": "Figyelő hozzáadása", "Edit Status Page": "Sátusz oldal szerkesztése", "Go to Dashboard": "Menj az irányítópulthoz", + telegram: "Telegram", + webhook: "Webhook", + smtp: "Email (SMTP)", + discord: "Discord", + teams: "Microsoft Teams", + signal: "Signal", + gotify: "Gotify", + slack: "Slack", + "rocket.chat": "Rocket.chat", + pushover: "Pushover", + pushy: "Pushy", + octopush: "Octopush", + lunasea: "LunaSea", + apprise: "Apprise (Support 50+ Notification services)", + pushbullet: "Pushbullet", + line: "Line Messenger", + mattermost: "Mattermost", + "Status Page": "Status Page", }; diff --git a/src/languages/it-IT.js b/src/languages/it-IT.js index 10c2df89..b318c97e 100644 --- a/src/languages/it-IT.js +++ b/src/languages/it-IT.js @@ -179,4 +179,21 @@ export default { "Edit Status Page": "Modifica pagina di stato", "Go to Dashboard": "Vai al Cruscotto", "Status Page": "Status Page", + telegram: "Telegram", + webhook: "Webhook", + smtp: "Email (SMTP)", + discord: "Discord", + teams: "Microsoft Teams", + signal: "Signal", + gotify: "Gotify", + slack: "Slack", + "rocket.chat": "Rocket.chat", + pushover: "Pushover", + pushy: "Pushy", + octopush: "Octopush", + lunasea: "LunaSea", + apprise: "Apprise (Support 50+ Notification services)", + pushbullet: "Pushbullet", + line: "Line Messenger", + mattermost: "Mattermost", }; diff --git a/src/languages/ja.js b/src/languages/ja.js index 3462166b..5042d18b 100644 --- a/src/languages/ja.js +++ b/src/languages/ja.js @@ -180,4 +180,21 @@ export default { "Edit Status Page": "Edit Status Page", "Go to Dashboard": "Go to Dashboard", "Status Page": "Status Page", + telegram: "Telegram", + webhook: "Webhook", + smtp: "Email (SMTP)", + discord: "Discord", + teams: "Microsoft Teams", + signal: "Signal", + gotify: "Gotify", + slack: "Slack", + "rocket.chat": "Rocket.chat", + pushover: "Pushover", + pushy: "Pushy", + octopush: "Octopush", + lunasea: "LunaSea", + apprise: "Apprise (Support 50+ Notification services)", + pushbullet: "Pushbullet", + line: "Line Messenger", + mattermost: "Mattermost", }; diff --git a/src/languages/ko-KR.js b/src/languages/ko-KR.js index 881d609e..6cb86ed2 100644 --- a/src/languages/ko-KR.js +++ b/src/languages/ko-KR.js @@ -180,4 +180,21 @@ export default { "Edit Status Page": "Edit Status Page", "Go to Dashboard": "Go to Dashboard", "Status Page": "Status Page", + telegram: "Telegram", + webhook: "Webhook", + smtp: "Email (SMTP)", + discord: "Discord", + teams: "Microsoft Teams", + signal: "Signal", + gotify: "Gotify", + slack: "Slack", + "rocket.chat": "Rocket.chat", + pushover: "Pushover", + pushy: "Pushy", + octopush: "Octopush", + lunasea: "LunaSea", + apprise: "Apprise (Support 50+ Notification services)", + pushbullet: "Pushbullet", + line: "Line Messenger", + mattermost: "Mattermost", }; diff --git a/src/languages/nl-NL.js b/src/languages/nl-NL.js index b55e259b..1303a096 100644 --- a/src/languages/nl-NL.js +++ b/src/languages/nl-NL.js @@ -180,4 +180,21 @@ export default { "Edit Status Page": "Edit Status Page", "Go to Dashboard": "Go to Dashboard", "Status Page": "Status Page", + telegram: "Telegram", + webhook: "Webhook", + smtp: "Email (SMTP)", + discord: "Discord", + teams: "Microsoft Teams", + signal: "Signal", + gotify: "Gotify", + slack: "Slack", + "rocket.chat": "Rocket.chat", + pushover: "Pushover", + pushy: "Pushy", + octopush: "Octopush", + lunasea: "LunaSea", + apprise: "Apprise (Support 50+ Notification services)", + pushbullet: "Pushbullet", + line: "Line Messenger", + mattermost: "Mattermost", }; diff --git a/src/languages/pl.js b/src/languages/pl.js index ad10ceb0..9a079a9c 100644 --- a/src/languages/pl.js +++ b/src/languages/pl.js @@ -180,4 +180,21 @@ export default { "Edit Status Page": "Edytuj stronę statusu", "Go to Dashboard": "Idź do panelu", "Status Page": "Strona statusu", + telegram: "Telegram", + webhook: "Webhook", + smtp: "Email (SMTP)", + discord: "Discord", + teams: "Microsoft Teams", + signal: "Signal", + gotify: "Gotify", + slack: "Slack", + "rocket.chat": "Rocket.chat", + pushover: "Pushover", + pushy: "Pushy", + octopush: "Octopush", + lunasea: "LunaSea", + apprise: "Apprise (obsługuje 50+ usług powiadamiania)", + pushbullet: "Pushbullet", + line: "Line Messenger", + mattermost: "Mattermost", }; diff --git a/src/languages/pt-BR.js b/src/languages/pt-BR.js index 4f65f603..201314bb 100644 --- a/src/languages/pt-BR.js +++ b/src/languages/pt-BR.js @@ -179,4 +179,21 @@ export default { "Add a monitor": "Adicionar um monitor", "Edit Status Page": "Editar Página de Status", "Go to Dashboard": "Ir para a dashboard", + telegram: "Telegram", + webhook: "Webhook", + smtp: "Email (SMTP)", + discord: "Discord", + teams: "Microsoft Teams", + signal: "Signal", + gotify: "Gotify", + slack: "Slack", + "rocket.chat": "Rocket.chat", + pushover: "Pushover", + pushy: "Pushy", + octopush: "Octopush", + lunasea: "LunaSea", + apprise: "Apprise (Support 50+ Notification services)", + pushbullet: "Pushbullet", + line: "Line Messenger", + mattermost: "Mattermost", }; diff --git a/src/languages/ru-RU.js b/src/languages/ru-RU.js index 18d97305..a326a006 100644 --- a/src/languages/ru-RU.js +++ b/src/languages/ru-RU.js @@ -184,4 +184,21 @@ export default { "Create Incident": "Создать инцидент", "Switch to Dark Theme": "Тёмная тема", "Switch to Light Theme": "Светлая тема", + telegram: "Telegram", + webhook: "Webhook", + smtp: "Email (SMTP)", + discord: "Discord", + teams: "Microsoft Teams", + signal: "Signal", + gotify: "Gotify", + slack: "Slack", + "rocket.chat": "Rocket.chat", + pushover: "Pushover", + pushy: "Pushy", + octopush: "Octopush", + lunasea: "LunaSea", + apprise: "Apprise (Support 50+ Notification services)", + pushbullet: "Pushbullet", + line: "Line Messenger", + mattermost: "Mattermost", }; diff --git a/src/languages/sr-latn.js b/src/languages/sr-latn.js index 3542e1d6..f249f568 100644 --- a/src/languages/sr-latn.js +++ b/src/languages/sr-latn.js @@ -180,4 +180,21 @@ export default { "Edit Status Page": "Edit Status Page", "Go to Dashboard": "Go to Dashboard", "Status Page": "Status Page", + telegram: "Telegram", + webhook: "Webhook", + smtp: "Email (SMTP)", + discord: "Discord", + teams: "Microsoft Teams", + signal: "Signal", + gotify: "Gotify", + slack: "Slack", + "rocket.chat": "Rocket.chat", + pushover: "Pushover", + pushy: "Pushy", + octopush: "Octopush", + lunasea: "LunaSea", + apprise: "Apprise (Support 50+ Notification services)", + pushbullet: "Pushbullet", + line: "Line Messenger", + mattermost: "Mattermost", }; diff --git a/src/languages/sr.js b/src/languages/sr.js index 9cb1379e..8ea651b7 100644 --- a/src/languages/sr.js +++ b/src/languages/sr.js @@ -180,4 +180,21 @@ export default { "Edit Status Page": "Edit Status Page", "Go to Dashboard": "Go to Dashboard", "Status Page": "Status Page", + telegram: "Telegram", + webhook: "Webhook", + smtp: "Email (SMTP)", + discord: "Discord", + teams: "Microsoft Teams", + signal: "Signal", + gotify: "Gotify", + slack: "Slack", + "rocket.chat": "Rocket.chat", + pushover: "Pushover", + pushy: "Pushy", + octopush: "Octopush", + lunasea: "LunaSea", + apprise: "Apprise (Support 50+ Notification services)", + pushbullet: "Pushbullet", + line: "Line Messenger", + mattermost: "Mattermost", }; diff --git a/src/languages/sv-SE.js b/src/languages/sv-SE.js index ef66aca5..997d94a7 100644 --- a/src/languages/sv-SE.js +++ b/src/languages/sv-SE.js @@ -180,4 +180,21 @@ export default { "Edit Status Page": "Edit Status Page", "Go to Dashboard": "Go to Dashboard", "Status Page": "Status Page", + telegram: "Telegram", + webhook: "Webhook", + smtp: "Email (SMTP)", + discord: "Discord", + teams: "Microsoft Teams", + signal: "Signal", + gotify: "Gotify", + slack: "Slack", + "rocket.chat": "Rocket.chat", + pushover: "Pushover", + pushy: "Pushy", + octopush: "Octopush", + lunasea: "LunaSea", + apprise: "Apprise (Support 50+ Notification services)", + pushbullet: "Pushbullet", + line: "Line Messenger", + mattermost: "Mattermost", }; diff --git a/src/languages/tr-TR.js b/src/languages/tr-TR.js index 908afe6d..614ab0ee 100644 --- a/src/languages/tr-TR.js +++ b/src/languages/tr-TR.js @@ -179,4 +179,21 @@ export default { "Edit Status Page": "Edit Status Page", "Go to Dashboard": "Go to Dashboard", "Status Page": "Status Page", + telegram: "Telegram", + webhook: "Webhook", + smtp: "Email (SMTP)", + discord: "Discord", + teams: "Microsoft Teams", + signal: "Signal", + gotify: "Gotify", + slack: "Slack", + "rocket.chat": "Rocket.chat", + pushover: "Pushover", + pushy: "Pushy", + octopush: "Octopush", + lunasea: "LunaSea", + apprise: "Apprise (Support 50+ Notification services)", + pushbullet: "Pushbullet", + line: "Line Messenger", + mattermost: "Mattermost", }; diff --git a/src/languages/zh-CN.js b/src/languages/zh-CN.js index a784cd34..65e8909a 100644 --- a/src/languages/zh-CN.js +++ b/src/languages/zh-CN.js @@ -180,4 +180,21 @@ export default { "Edit Status Page": "编辑状态页", "Go to Dashboard": "前往仪表盘", "Status Page": "Status Page", + telegram: "Telegram", + webhook: "Webhook", + smtp: "Email (SMTP)", + discord: "Discord", + teams: "Microsoft Teams", + signal: "Signal", + gotify: "Gotify", + slack: "Slack", + "rocket.chat": "Rocket.chat", + pushover: "Pushover", + pushy: "Pushy", + octopush: "Octopush", + lunasea: "LunaSea", + apprise: "Apprise (Support 50+ Notification services)", + pushbullet: "Pushbullet", + line: "Line Messenger", + mattermost: "Mattermost", }; diff --git a/src/languages/zh-HK.js b/src/languages/zh-HK.js index df3cc416..3b12177d 100644 --- a/src/languages/zh-HK.js +++ b/src/languages/zh-HK.js @@ -180,4 +180,21 @@ export default { "Edit Status Page": "Edit Status Page", "Go to Dashboard": "Go to Dashboard", "Status Page": "Status Page", + telegram: "Telegram", + webhook: "Webhook", + smtp: "Email (SMTP)", + discord: "Discord", + teams: "Microsoft Teams", + signal: "Signal", + gotify: "Gotify", + slack: "Slack", + "rocket.chat": "Rocket.chat", + pushover: "Pushover", + pushy: "Pushy", + octopush: "Octopush", + lunasea: "LunaSea", + apprise: "Apprise (Support 50+ Notification services)", + pushbullet: "Pushbullet", + line: "Line Messenger", + mattermost: "Mattermost", }; From 4da63c5fb88b0628639fe34b5aeef5621018cf73 Mon Sep 17 00:00:00 2001 From: Adam Stachowicz Date: Mon, 4 Oct 2021 23:33:52 +0200 Subject: [PATCH 04/11] Revert `silentTranslationWarn` change --- src/i18n.js | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/i18n.js b/src/i18n.js index 17fa2e91..5c17475e 100644 --- a/src/i18n.js +++ b/src/i18n.js @@ -3,9 +3,9 @@ import bgBG from "./languages/bg-BG"; import daDK from "./languages/da-DK"; import deDE from "./languages/de-DE"; import en from "./languages/en"; -import fa from "./languages/fa"; import esEs from "./languages/es-ES"; import etEE from "./languages/et-EE"; +import fa from "./languages/fa"; import frFR from "./languages/fr-FR"; import hu from "./languages/hu"; import itIT from "./languages/it-IT"; @@ -48,16 +48,17 @@ const languageList = { }; const rtlLangs = ["fa"]; - + export const currentLocale = () => localStorage.locale || "en"; export const localeDirection = () => { - return rtlLangs.includes(currentLocale()) ? "rtl" : "ltr" -} + return rtlLangs.includes(currentLocale()) ? "rtl" : "ltr"; +}; + export const i18n = createI18n({ locale: currentLocale(), fallbackLocale: "en", silentFallbackWarn: true, - silentTranslationWarn: process.env.NODE_ENV !== "development", + silentTranslationWarn: true, messages: languageList, }); From 707e05c330ae56b34f934e2e68cf0462f0638ad2 Mon Sep 17 00:00:00 2001 From: Adam Stachowicz Date: Mon, 4 Oct 2021 23:39:56 +0200 Subject: [PATCH 05/11] Fix after merge --- src/languages/et-EE.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/languages/et-EE.js b/src/languages/et-EE.js index 8d98edae..7a660cb3 100644 --- a/src/languages/et-EE.js +++ b/src/languages/et-EE.js @@ -16,7 +16,7 @@ export default { rrtypeDescription: "Vali kirje tüüp, mida soovid jälgida.", pauseMonitorMsg: "Kas soovid peatada seire?", Settings: "Seaded", - "Status Page": "Status Page", + "Status Page": "Ülevaade", Dashboard: "Töölaud", "New Update": "Uuem tarkvara versioon on saadaval.", Language: "Keel", From 22227be408a6be84d98d745c12b38c08b03408f1 Mon Sep 17 00:00:00 2001 From: LouisLam Date: Wed, 6 Oct 2021 02:06:59 +0800 Subject: [PATCH 06/11] update version in wiki too --- extra/update-version.js | 47 +++++++++++++++++++++++++++++++++++++---- 1 file changed, 43 insertions(+), 4 deletions(-) diff --git a/extra/update-version.js b/extra/update-version.js index ca810a40..2e3b42da 100644 --- a/extra/update-version.js +++ b/extra/update-version.js @@ -19,6 +19,7 @@ if (! newVersion) { const exists = tagExists(newVersion); if (! exists) { + // Process package.json pkg.version = newVersion; pkg.scripts.setup = pkg.scripts.setup.replaceAll(oldVersion, newVersion); @@ -29,8 +30,11 @@ if (! exists) { commit(newVersion); tag(newVersion); + + updateWiki(oldVersion, newVersion); + } else { - console.log("version exists") + console.log("version exists"); } function commit(version) { @@ -38,16 +42,16 @@ function commit(version) { let res = child_process.spawnSync("git", ["commit", "-m", msg, "-a"]); let stdout = res.stdout.toString().trim(); - console.log(stdout) + console.log(stdout); if (stdout.includes("no changes added to commit")) { - throw new Error("commit error") + throw new Error("commit error"); } } function tag(version) { let res = child_process.spawnSync("git", ["tag", version]); - console.log(res.stdout.toString().trim()) + console.log(res.stdout.toString().trim()); } function tagExists(version) { @@ -59,3 +63,38 @@ function tagExists(version) { return res.stdout.toString().trim() === version; } + +function updateWiki(oldVersion, newVersion) { + const wikiDir = "./tmp/wiki"; + const howToUpdateFilename = "./tmp/wiki/🆙-How-to-Update.md"; + + safeDelete(wikiDir); + + child_process.spawnSync("git", ["clone", "https://github.com/louislam/uptime-kuma.wiki.git", wikiDir]); + let content = fs.readFileSync(howToUpdateFilename).toString(); + content = content.replaceAll(`git checkout ${oldVersion}`, `git checkout ${newVersion}`); + fs.writeFileSync(howToUpdateFilename, content); + + child_process.spawnSync("git", ["add", "-A"], { + cwd: wikiDir, + }); + + child_process.spawnSync("git", ["commit", "-m", `Update to ${newVersion} from ${oldVersion}`], { + cwd: wikiDir, + }); + + console.log("Pushing to Github"); + child_process.spawnSync("git", ["push"], { + cwd: wikiDir, + }); + + safeDelete(wikiDir); +} + +function safeDelete(dir) { + if (fs.existsSync(dir)) { + fs.rmdirSync(dir, { + recursive: true, + }); + } +} From 7a8b6a03e0159a0b1aab9ec649db41d560d8c33d Mon Sep 17 00:00:00 2001 From: Brainpitcher <53742575+Brainpitcher@users.noreply.github.com> Date: Wed, 6 Oct 2021 09:49:44 +0500 Subject: [PATCH 07/11] Update ru-RU.js MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit "Cert Exp.": "Сертификат истекает" now it sounds in russian --- src/languages/ru-RU.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/languages/ru-RU.js b/src/languages/ru-RU.js index 1686aec4..4e56900d 100644 --- a/src/languages/ru-RU.js +++ b/src/languages/ru-RU.js @@ -43,7 +43,7 @@ export default { Delete: "Удалить", Current: "Текущий", Uptime: "Аптайм", - "Cert Exp.": "Сертификат просрочен", + "Cert Exp.": "Сертификат истекает", days: "дней", day: "день", "-day": " дней", From 4ded0c073af8a81b73d84bc439eb3442d02fc172 Mon Sep 17 00:00:00 2001 From: LouisLam Date: Wed, 6 Oct 2021 13:26:43 +0800 Subject: [PATCH 08/11] [test] fix timeout issue --- package.json | 2 +- test/test.spec.js | 8 ++------ 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/package.json b/package.json index 7202f20d..7558d682 100644 --- a/package.json +++ b/package.json @@ -123,6 +123,6 @@ }, "testRegex": "./test/*.spec.js", "rootDir": ".", - "testTimeout": 15000 + "testTimeout": 30000 } } diff --git a/test/test.spec.js b/test/test.spec.js index 67505b7d..2a45c37c 100644 --- a/test/test.spec.js +++ b/test/test.spec.js @@ -75,14 +75,10 @@ describe("Init", () => { it("Change Theme", async () => { // Light await page.click(".btn[for=btncheck1]"); - await page.waitForSelector("div.light", { - timeout: 2000 - }); + await page.waitForSelector("div.light"); await page.click(".btn[for=btncheck2]"); - await page.waitForSelector("div.dark", { - timeout: 2000 - }); + await page.waitForSelector("div.dark"); }); }); From 2b00e59c7a94cafce78d2dd94d6dd546fdf574be Mon Sep 17 00:00:00 2001 From: LouisLam Date: Wed, 6 Oct 2021 15:25:00 +0800 Subject: [PATCH 09/11] [test] update --- test/test.spec.js | 163 ++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 151 insertions(+), 12 deletions(-) diff --git a/test/test.spec.js b/test/test.spec.js index 2a45c37c..8077ec3d 100644 --- a/test/test.spec.js +++ b/test/test.spec.js @@ -1,6 +1,7 @@ // eslint-disable-next-line no-unused-vars -const { Page } = require("puppeteer"); +const { Page, Browser } = require("puppeteer"); const { sleep } = require("../src/util"); +const axios = require("axios"); /** * Set back the correct data type for page object @@ -8,14 +9,17 @@ const { sleep } = require("../src/util"); */ page; -beforeAll(() => { - if (process.env.JUST_FOR_TEST) { - console.log(process.env.JUST_FOR_TEST); +/** + * @type {Browser} + */ +browser; - if (process.env.JUST_FOR_TEST === "JUST_FOR_TEST_HELLO") { - console.log("secret ok"); - } - } +beforeAll(async () => { + await page.setViewport({ + width: 1280, + height: 720, + deviceScaleFactor: 1, + }); }); afterAll(() => { @@ -35,6 +39,7 @@ describe("Init", () => { await expect(page.title()).resolves.toMatch(title); }); + // Setup Page it("Setup", async () => { // Create an Admin await page.waitForSelector("#floatingInput"); @@ -49,14 +54,17 @@ describe("Init", () => { // Go to /setup again await page.goto(baseURL + "/setup"); await sleep(3000); - const pathname = await page.evaluate(() => location.pathname); + let pathname = await page.evaluate(() => location.pathname); expect(pathname).toEqual("/dashboard"); // Go to / await page.goto(baseURL); + await sleep(3000); + pathname = await page.evaluate(() => location.pathname); expect(pathname).toEqual("/dashboard"); }); + // Settings Page describe("Settings", () => { beforeAll(async () => { await page.goto(baseURL + "/settings"); @@ -73,15 +81,128 @@ describe("Init", () => { }); it("Change Theme", async () => { + await sleep(1000); + + // Dark + await click(page, ".btn[for=btncheck2]"); + await page.waitForSelector("div.dark"); + + await sleep(1000); + // Light - await page.click(".btn[for=btncheck1]"); + await click(page, ".btn[for=btncheck1]"); await page.waitForSelector("div.light"); + }); - await page.click(".btn[for=btncheck2]"); - await page.waitForSelector("div.dark"); + // TODO: Heartbeat Bar Style + + // TODO: Timezone + + it("Search Engine Visibility", async () => { + // Default + let res = await axios.get(baseURL + "/robots.txt"); + expect(res.data).toMatch("Disallow: /"); + + // Yes + await click(page, "#searchEngineIndexYes"); + await click(page, "form > div > .btn[type=submit]"); + await sleep(2000); + res = await axios.get(baseURL + "/robots.txt"); + expect(res.data).not.toMatch("Disallow: /"); + + // No + await click(page, "#searchEngineIndexNo"); + await click(page, "form > div > .btn[type=submit]"); + await sleep(2000); + res = await axios.get(baseURL + "/robots.txt"); + expect(res.data).toMatch("Disallow: /"); + }); + + it("Entry Page", async () => { + const newPage = await browser.newPage(); + + // Default + await newPage.goto(baseURL); + await sleep(3000); + let pathname = await newPage.evaluate(() => location.pathname); + expect(pathname).toEqual("/dashboard"); + + // Status Page + await click(page, "#entryPageNo"); + await click(page, "form > div > .btn[type=submit]"); + await sleep(2000); + await newPage.goto(baseURL); + await sleep(3000); + pathname = await newPage.evaluate(() => location.pathname); + expect(pathname).toEqual("/status"); + + // Back to Dashboard + await click(page, "#entryPageYes"); + await click(page, "form > div > .btn[type=submit]"); + await sleep(2000); + await newPage.goto(baseURL); + await sleep(3000); + pathname = await newPage.evaluate(() => location.pathname); + expect(pathname).toEqual("/dashboard"); + + await newPage.close(); + }); + + it("Change Password (wrong current password)", async () => { + await page.type("#current-password", "wrong_passw$$d"); + await page.type("#new-password", "new_password123"); + await page.type("#repeat-new-password", "new_password123"); + await click(page, "form > div > .btn[type=submit]", 1); + await sleep(3000); + await click(page, ".btn-danger.btn.me-1"); + await sleep(2000); + await login("admin", "new_password123"); + await sleep(2000); + let elementCount = await page.evaluate(() => document.querySelectorAll("#floatingPassword").length); + expect(elementCount).toEqual(1); + + await login("admin", "admin123"); + await sleep(3000); + }); + + it("Change Password (wrong repeat)", async () => { + await page.type("#current-password", "admin123"); + await page.type("#new-password", "new_password123"); + await page.type("#repeat-new-password", "new_password1234567898797898"); + await click(page, "form > div > .btn[type=submit]", 1); + await sleep(3000); + await click(page, ".btn-danger.btn.me-1"); + await sleep(2000); + await login("admin", "new_password123"); + await sleep(2000); + let elementCount = await page.evaluate(() => document.querySelectorAll("#floatingPassword").length); + expect(elementCount).toEqual(1); + + await login("admin", "admin123"); + await sleep(3000); }); + + // TODO: 2FA + + // TODO: Export Backup + + // TODO: Import Backup + + // TODO: Disable Auth + + // TODO: Clear Stats }); + /* + * TODO + * Create Monitor - All type + * Edit Monitor + * Delete Monitor + * + * Create Notification (token problem, maybe hard to test) + * + */ + describe("Status Page", () => { const title = "Uptime Kuma"; beforeAll(async () => { @@ -93,3 +214,21 @@ describe("Init", () => { }); }); +async function login(username, password) { + await input(page, "#floatingInput", username); + await input(page, "#floatingPassword", password); + await page.click(".btn-primary[type=submit]"); +} + +async function click(page, selector, elementIndex = 0) { + return await page.evaluate((s, i) => { + return document.querySelectorAll(s)[i].click(); + }, selector, elementIndex); +} + +async function input(page, selector, text) { + const element = await page.$(selector); + await element.click({ clickCount: 3 }); + await page.keyboard.press("Backspace"); + await page.type(selector, text); +} From cb263f2a08861d0a4ba3094c019ebdc313762c71 Mon Sep 17 00:00:00 2001 From: LouisLam Date: Wed, 6 Oct 2021 15:34:57 +0800 Subject: [PATCH 10/11] [test] wait for #language --- test/test.spec.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/test.spec.js b/test/test.spec.js index 8077ec3d..e1fd2890 100644 --- a/test/test.spec.js +++ b/test/test.spec.js @@ -71,6 +71,8 @@ describe("Init", () => { }); it("Change Language", async () => { + await page.waitForSelector("#language"); + await page.select("#language", "zh-HK"); let languageTitle = await page.evaluate(() => document.querySelector("[for=language]").innerText); expect(languageTitle).toMatch("語言"); From 54d78308133c1089240b7b08e3c3af398ab16176 Mon Sep 17 00:00:00 2001 From: Louis Lam Date: Wed, 6 Oct 2021 15:36:45 +0800 Subject: [PATCH 11/11] Update CONTRIBUTING.md --- CONTRIBUTING.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 562b8cd3..93b03ac6 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -38,6 +38,7 @@ If you are not sure, feel free to create an empty pull request draft first. - Add a new notification - Add a chart - Fix a bug +- Translations ### *️⃣ Requires one more reviewer @@ -172,3 +173,7 @@ npm install Since previously updating vite 2.5.10 to 2.6.0 broke the application completely, from now on, it should update patch release version only. Patch release = the third digit + +# Translations + +Please read: https://github.com/louislam/uptime-kuma/tree/master/src/languages