From 8c941b1d565b1f3ff61450f91b6e9a6e56d20543 Mon Sep 17 00:00:00 2001 From: zsxeee Date: Tue, 21 Sep 2021 13:02:41 +0800 Subject: [PATCH 01/48] Add i18n for notification form --- src/components/notifications/Apprise.vue | 19 ++--- src/components/notifications/Discord.vue | 11 ++- src/components/notifications/Gotify.vue | 6 +- src/components/notifications/Line.vue | 20 ++--- src/components/notifications/LunaSea.vue | 4 +- src/components/notifications/Mattermost.vue | 30 +++---- src/components/notifications/Octopush.vue | 22 ++--- src/components/notifications/Pushbullet.vue | 8 +- src/components/notifications/Pushover.vue | 24 +++--- src/components/notifications/Pushy.vue | 6 +- src/components/notifications/RocketChat.vue | 28 +++---- src/components/notifications/SMTP.vue | 14 ++-- src/components/notifications/Signal.vue | 14 ++-- src/components/notifications/Slack.vue | 28 +++---- src/components/notifications/Teams.vue | 9 +- src/components/notifications/Telegram.vue | 16 ++-- src/components/notifications/Webhook.vue | 9 +- src/languages/en.js | 93 +++++++++++++++++++++ 18 files changed, 228 insertions(+), 133 deletions(-) diff --git a/src/components/notifications/Apprise.vue b/src/components/notifications/Apprise.vue index de3fe52b..567b1eae 100644 --- a/src/components/notifications/Apprise.vue +++ b/src/components/notifications/Apprise.vue @@ -1,20 +1,19 @@ diff --git a/src/components/notifications/Discord.vue b/src/components/notifications/Discord.vue index c45a5262..99389d29 100644 --- a/src/components/notifications/Discord.vue +++ b/src/components/notifications/Discord.vue @@ -1,20 +1,19 @@ diff --git a/src/components/notifications/Gotify.vue b/src/components/notifications/Gotify.vue index f8039d58..9e16d4e4 100644 --- a/src/components/notifications/Gotify.vue +++ b/src/components/notifications/Gotify.vue @@ -1,17 +1,17 @@ diff --git a/src/components/notifications/Line.vue b/src/components/notifications/Line.vue index 7d5312c3..f6dbc748 100644 --- a/src/components/notifications/Line.vue +++ b/src/components/notifications/Line.vue @@ -1,21 +1,21 @@ diff --git a/src/languages/en.js b/src/languages/en.js index ca568944..c4525aef 100644 --- a/src/languages/en.js +++ b/src/languages/en.js @@ -169,6 +169,7 @@ export default { "Avg. Ping": "Avg. Ping", "Avg. Response": "Avg. Response", // Start notification form + defaultNotificationName: "My {0} Alert ({1})", here: "here", "Required": "Required", From 6e55c447732cd17827bfbdb8ead5bb04715893d5 Mon Sep 17 00:00:00 2001 From: zsxeee Date: Wed, 22 Sep 2021 16:13:23 +0800 Subject: [PATCH 03/48] Chore --- src/components/NotificationDialog.vue | 3 +-- src/components/notifications/Apprise.vue | 2 +- src/components/notifications/Signal.vue | 2 +- src/languages/en.js | 4 ++-- 4 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/components/NotificationDialog.vue b/src/components/NotificationDialog.vue index 2cf5eed2..fb8ff2e0 100644 --- a/src/components/NotificationDialog.vue +++ b/src/components/NotificationDialog.vue @@ -108,7 +108,6 @@ export default { watch: { "notification.type"(to, from) { let oldName; - console.log(this.$root.notificationList) if (from) { oldName = this.getUniqueDefaultName(from); } else { @@ -193,7 +192,7 @@ export default { }) }, /** - * @param {string} notificationKey + * @param {keyof NotificationFormList} notificationKey * @return {string} */ getUniqueDefaultName(notificationKey) { diff --git a/src/components/notifications/Apprise.vue b/src/components/notifications/Apprise.vue index 567b1eae..e0f116f0 100644 --- a/src/components/notifications/Apprise.vue +++ b/src/components/notifications/Apprise.vue @@ -11,7 +11,7 @@
- {{ $t("Apprise is installed") }} + {{ $t("Apprise is installed. ") }} {{ $t("Apprise is not installed. ") }}{{ $t("Read more") }}
diff --git a/src/components/notifications/Signal.vue b/src/components/notifications/Signal.vue index 212aba6a..e3c9e7aa 100644 --- a/src/components/notifications/Signal.vue +++ b/src/components/notifications/Signal.vue @@ -19,7 +19,7 @@

- {{ $t("canCheckLike") }} + {{ $t("wayToCheckSignalURL") }}

diff --git a/src/languages/en.js b/src/languages/en.js index c4525aef..c9775403 100644 --- a/src/languages/en.js +++ b/src/languages/en.js @@ -212,7 +212,7 @@ export default { "Number": "Number", "Recipients": "Recipients", needSignalAPI: "You need to have a signal client with REST API.", - canCheckLike: "You can check this url to view how to setup one:", + wayToCheckSignalURL: "You can check this url to view how to setup one:", signalImportant: "IMPORTANT: You cannot mix groups and numbers in recipients!", "gotify": "Gotify", @@ -259,7 +259,7 @@ export default { "Read more:": "Read more: {0}", "Status:": "Status: {0}", "Read more": "Read more", - "Apprise is installed": "Apprise is installed", + "Apprise is installed. ": "Apprise is installed. ", "Apprise is not installed. ": "Apprise is not installed. ", "pushbullet": "Pushbullet", From 6e9d12638c5909cdf9185401fef1bca120e7d56a Mon Sep 17 00:00:00 2001 From: zsxeee Date: Wed, 22 Sep 2021 16:20:59 +0800 Subject: [PATCH 04/48] Avoid space ending in translation key --- src/components/notifications/Apprise.vue | 4 ++-- src/components/notifications/Line.vue | 4 ++-- src/languages/en.js | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/components/notifications/Apprise.vue b/src/components/notifications/Apprise.vue index e0f116f0..30abfc90 100644 --- a/src/components/notifications/Apprise.vue +++ b/src/components/notifications/Apprise.vue @@ -11,8 +11,8 @@

- {{ $t("Apprise is installed. ") }} - {{ $t("Apprise is not installed. ") }}{{ $t("Read more") }} + {{ $t("Apprise is installed.") }} + {{ $t("Apprise is not installed.") }}{{ $t("Read more") }}
diff --git a/src/components/notifications/Line.vue b/src/components/notifications/Line.vue index f6dbc748..0d7da26a 100644 --- a/src/components/notifications/Line.vue +++ b/src/components/notifications/Line.vue @@ -3,14 +3,14 @@ - + {{ $t("Basic Settings") }}
- + {{ $t("Messaging API") }} diff --git a/src/languages/en.js b/src/languages/en.js index c9775403..948ed437 100644 --- a/src/languages/en.js +++ b/src/languages/en.js @@ -259,8 +259,8 @@ export default { "Read more:": "Read more: {0}", "Status:": "Status: {0}", "Read more": "Read more", - "Apprise is installed. ": "Apprise is installed. ", - "Apprise is not installed. ": "Apprise is not installed. ", + "Apprise is installed.": "Apprise is installed. ", + "Apprise is not installed.": "Apprise is not installed. ", "pushbullet": "Pushbullet", "Access Token": "Access Token", @@ -268,7 +268,7 @@ export default { "line": "Line Messenger", "Channel access token": "Channel access token", "Line Developers Console": "Line Developers Console", - "Line Developers Console - ": "Line Developers Console - {0}", + lineDevConsoleTo: "Line Developers Console - {0}", "Basic Settings": "Basic Settings", "User ID": "User ID", "Messaging API": "Messaging API", From 624f632a7a537d3b21ef0c5d55b6b108a5046df2 Mon Sep 17 00:00:00 2001 From: zsxeee Date: Wed, 22 Sep 2021 22:15:50 +0800 Subject: [PATCH 05/48] Apprise status translation key --- src/components/NotificationDialog.vue | 2 +- src/components/notifications/Apprise.vue | 6 ++++-- src/languages/en.js | 4 ++-- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/components/NotificationDialog.vue b/src/components/NotificationDialog.vue index fb8ff2e0..0c2035de 100644 --- a/src/components/NotificationDialog.vue +++ b/src/components/NotificationDialog.vue @@ -200,7 +200,7 @@ export default { let name = "" do { name = this.$t("defaultNotificationName", [ - this.$t(notificationKey).replace(/\(.+\)/, ""), + this.$t(notificationKey).replace(/\(.+\)/, "").trim(), index++ ]); } while (this.$root.notificationList.find(it => it.name === name)) diff --git a/src/components/notifications/Apprise.vue b/src/components/notifications/Apprise.vue index 30abfc90..f485405b 100644 --- a/src/components/notifications/Apprise.vue +++ b/src/components/notifications/Apprise.vue @@ -11,8 +11,10 @@
- {{ $t("Apprise is installed.") }} - {{ $t("Apprise is not installed.") }}{{ $t("Read more") }} + {{ $t("appriseInstalled") }} + + {{ $t("Read more") }} +
diff --git a/src/languages/en.js b/src/languages/en.js index 948ed437..64546797 100644 --- a/src/languages/en.js +++ b/src/languages/en.js @@ -259,8 +259,8 @@ export default { "Read more:": "Read more: {0}", "Status:": "Status: {0}", "Read more": "Read more", - "Apprise is installed.": "Apprise is installed. ", - "Apprise is not installed.": "Apprise is not installed. ", + appriseInstalled: "Apprise is installed.", + appriseNotInstalled: "Apprise is not installed. {0}", "pushbullet": "Pushbullet", "Access Token": "Access Token", From 58aa83331e55db31f30b2d6ef595c832826478f2 Mon Sep 17 00:00:00 2001 From: Adam Stachowicz Date: Tue, 28 Sep 2021 06:53:23 +0200 Subject: [PATCH 06/48] 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 07/48] `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 138ddf56089d7dea14669ff7a62458a7ad264f2a Mon Sep 17 00:00:00 2001 From: zsxeee Date: Thu, 30 Sep 2021 19:22:17 +0800 Subject: [PATCH 08/48] Move attribute `tag` to start of tag --- src/components/notifications/Apprise.vue | 12 ++++++------ src/components/notifications/Line.vue | 8 ++++---- src/components/notifications/Mattermost.vue | 4 ++-- src/components/notifications/Octopush.vue | 6 +++--- src/components/notifications/Pushbullet.vue | 4 ++-- src/components/notifications/Pushover.vue | 2 +- src/components/notifications/Pushy.vue | 4 ++-- src/components/notifications/RocketChat.vue | 4 ++-- src/components/notifications/Slack.vue | 4 ++-- src/components/notifications/Teams.vue | 2 +- src/components/notifications/Webhook.vue | 2 +- src/languages/en.js | 17 ----------------- 12 files changed, 26 insertions(+), 43 deletions(-) diff --git a/src/components/notifications/Apprise.vue b/src/components/notifications/Apprise.vue index f485405b..c10e23cf 100644 --- a/src/components/notifications/Apprise.vue +++ b/src/components/notifications/Apprise.vue @@ -4,15 +4,15 @@

{{ $t("Example:", ["twilio://AccountSid:AuthToken@FromPhoneNo"]) }}

- + https://github.com/caronc/apprise/wiki#notification-services
- + {{ $t("appriseInstalled") }} - + {{ $t("Read more") }} @@ -24,12 +24,12 @@ export default { data() { return { appriseInstalled: false - } + }; }, mounted() { this.$root.getSocket().emit("checkApprise", (installed) => { this.appriseInstalled = installed; - }) + }); }, -} +}; diff --git a/src/components/notifications/Line.vue b/src/components/notifications/Line.vue index 0d7da26a..cb52c0c1 100644 --- a/src/components/notifications/Line.vue +++ b/src/components/notifications/Line.vue @@ -3,17 +3,17 @@
- + {{ $t("Basic Settings") }}
- + {{ $t("Messaging API") }} - + {{ $t("Line Developers Console") }} @@ -25,5 +25,5 @@ export default { components: { HiddenInput, }, -} +}; diff --git a/src/components/notifications/Mattermost.vue b/src/components/notifications/Mattermost.vue index 4c6e6918..2d174146 100644 --- a/src/components/notifications/Mattermost.vue +++ b/src/components/notifications/Mattermost.vue @@ -12,7 +12,7 @@
*{{ $t("Required") }} - + https://docs.mattermost.com/developer/webhooks-incoming.html

@@ -24,7 +24,7 @@

{{ $t("aboutIconURL") }}

- + https://www.webfx.com/tools/emoji-cheat-sheet/
diff --git a/src/components/notifications/Octopush.vue b/src/components/notifications/Octopush.vue index b8ea6dfa..fb0eb7f4 100644 --- a/src/components/notifications/Octopush.vue +++ b/src/components/notifications/Octopush.vue @@ -11,7 +11,7 @@ - + https://octopush.com/tarifs-sms-international/ @@ -24,7 +24,7 @@ - + https://octopush.com/api-sms-documentation/envoi-de-sms/ @@ -36,5 +36,5 @@ export default { components: { HiddenInput, }, -} +}; diff --git a/src/components/notifications/Pushbullet.vue b/src/components/notifications/Pushbullet.vue index ea848222..37a2e095 100644 --- a/src/components/notifications/Pushbullet.vue +++ b/src/components/notifications/Pushbullet.vue @@ -4,7 +4,7 @@ - + https://docs.pushbullet.com @@ -16,5 +16,5 @@ export default { components: { HiddenInput, }, -} +}; diff --git a/src/components/notifications/Pushover.vue b/src/components/notifications/Pushover.vue index 7f0a9417..af6e9d83 100644 --- a/src/components/notifications/Pushover.vue +++ b/src/components/notifications/Pushover.vue @@ -43,7 +43,7 @@
*{{ $t("Required") }} - + https://pushover.net/api

diff --git a/src/components/notifications/Pushy.vue b/src/components/notifications/Pushy.vue index b980f546..26f404d2 100644 --- a/src/components/notifications/Pushy.vue +++ b/src/components/notifications/Pushy.vue @@ -10,7 +10,7 @@

- + https://pushy.me/docs/api/send-notifications @@ -22,5 +22,5 @@ export default { components: { HiddenInput, }, -} +}; diff --git a/src/components/notifications/RocketChat.vue b/src/components/notifications/RocketChat.vue index 328da8bd..8f808210 100644 --- a/src/components/notifications/RocketChat.vue +++ b/src/components/notifications/RocketChat.vue @@ -12,7 +12,7 @@
*{{ $t("Required") }} - + https://api.slack.com/messaging/webhooks

@@ -21,7 +21,7 @@

{{ $t("aboutKumaURL") }}

- + https://www.webfx.com/tools/emoji-cheat-sheet/
diff --git a/src/components/notifications/Slack.vue b/src/components/notifications/Slack.vue index 9cd05fb5..8675922b 100644 --- a/src/components/notifications/Slack.vue +++ b/src/components/notifications/Slack.vue @@ -12,7 +12,7 @@
*{{ $t("Required") }} - + https://api.slack.com/messaging/webhooks

@@ -21,7 +21,7 @@

{{ $t("aboutKumaURL") }}

- + https://www.webfx.com/tools/emoji-cheat-sheet/
diff --git a/src/components/notifications/Teams.vue b/src/components/notifications/Teams.vue index 0c36cfed..2bc76486 100644 --- a/src/components/notifications/Teams.vue +++ b/src/components/notifications/Teams.vue @@ -8,7 +8,7 @@ class="form-control" required /> - +

"application/json" is good for any modern http servers such as express.js

- + "multipart/form-data" json_decode($_POST['data']) diff --git a/src/languages/en.js b/src/languages/en.js index 39464c3f..b4b7769d 100644 --- a/src/languages/en.js +++ b/src/languages/en.js @@ -182,7 +182,6 @@ export default { defaultNotificationName: "My {0} Alert ({1})", here: "here", "Required": "Required", - "telegram": "Telegram", "Bot Token": "Bot Token", "You can get a token from": "You can get a token from", @@ -191,13 +190,11 @@ export default { wayToGetTelegramChatID: "You can get your chat id by sending message to the bot and go to this url to view the chat_id:", "YOUR BOT TOKEN HERE": "YOUR BOT TOKEN HERE", chatIDNotFound: "Chat ID is not found, please send a message to this bot first", - "webhook": "Webhook", "Post URL": "Post URL", "Content Type": "Content Type", webhookJsonDesc: "{0} is good for any modern http servers such as express.js", webhookFormDataDesc: "{0} is good for PHP, you just need to parse the json by {1}", - "smtp": "Email (SMTP)", secureOptionNone: "None / STARTTLS (25, 587)", secureOptionTLS: "TLS (465)", @@ -206,30 +203,25 @@ export default { "To Email": "To Email", smtpCC: "CC", smtpBCC: "BCC", - "discord": "Discord", "Discord Webhook URL": "Discord Webhook URL", wayToGetDiscordURL: "You can get this by going to Server Settings -> Integrations -> Create Webhook", "Bot Display Name": "Bot Display Name", "Prefix Custom Message": "Prefix Custom Message", "Hello @everyone is...": "Hello @everyone is...", - "teams": "Microsoft Teams", "Webhook URL": "Webhook URL", wayToGetTeamsURL: "You can learn how to create a webhook url {0}.", - "signal": "Signal", "Number": "Number", "Recipients": "Recipients", needSignalAPI: "You need to have a signal client with REST API.", wayToCheckSignalURL: "You can check this url to view how to setup one:", signalImportant: "IMPORTANT: You cannot mix groups and numbers in recipients!", - "gotify": "Gotify", "Application Token": "Application Token", "Server URL": "Server URL", "Priority": "Priority", - "slack": "Slack", "Icon Emoji": "Icon Emoji", "Channel Name": "Channel Name", @@ -238,9 +230,7 @@ export default { aboutChannelName: "Enter the channel name on {0} Channel Name field if you want to bypass the webhook channel. Ex: #other-channel", aboutKumaURL: "If you leave the Uptime Kuma URL field blank, it will default to the Project Github page.", emojiCheatSheet: "Emoji cheat sheet: {0}", - "rocket.chat": "Rocket.chat", - "pushover": "Pushover", "User Key": "User Key", "Device": "Device", @@ -249,9 +239,7 @@ export default { "More info on:": "More info on: {0}", pushoverDesc1: "Emergency priority (2) has default 30 second timeout between retries and will expire after 1 hour.", pushoverDesc2: "If you want to send notifications to different devices, fill out Device field.", - "pushy": "Pushy", - "octopush": "Octopush", "SMS Type": "SMS Type", octopushTypePremium: "Premium (Fast - recommended for alerting)", @@ -259,10 +247,8 @@ export default { "Check octopush prices": "Check octopush prices {0}.", octopushPhoneNumber: "Phone number (intl format, eg : +33612345678) ", octopushSMSSender: "SMS Sender Name : 3-11 alphanumeric characters and space (a-zA-Z0-9)", - "lunasea": "LunaSea", "LunaSea Device ID": "LunaSea Device ID", - "apprise": "Apprise (Support 50+ Notification services)", "Apprise URL": "Apprise URL", "Example:": "Example: {0}", @@ -271,10 +257,8 @@ export default { "Read more": "Read more", appriseInstalled: "Apprise is installed.", appriseNotInstalled: "Apprise is not installed. {0}", - "pushbullet": "Pushbullet", "Access Token": "Access Token", - "line": "Line Messenger", "Channel access token": "Channel access token", "Line Developers Console": "Line Developers Console", @@ -283,7 +267,6 @@ export default { "User ID": "User ID", "Messaging API": "Messaging API", wayToGetLineChannelToken: "First access the {0}, create a provider and channel (Messaging API), then you can get the channel access token and user id from the above mentioned menu items.", - "mattermost": "Mattermost", "Icon URL": "Icon URL", aboutIconURL: "You can provide a link to a picture in \"Icon URL\" to override the default profile picture. Will not be used if Icon Emoji is set.", From 0f2059cde00e87d0a88ca052a4741b06c7a16294 Mon Sep 17 00:00:00 2001 From: zsxeee Date: Thu, 30 Sep 2021 19:48:24 +0800 Subject: [PATCH 09/48] Use named slot translation when has multi-slot --- src/components/NotificationDialog.vue | 52 ++++++++++++------------ src/components/notifications/Webhook.vue | 6 ++- src/languages/en.js | 4 +- 3 files changed, 32 insertions(+), 30 deletions(-) diff --git a/src/components/NotificationDialog.vue b/src/components/NotificationDialog.vue index 0c2035de..659f5726 100644 --- a/src/components/NotificationDialog.vue +++ b/src/components/NotificationDialog.vue @@ -68,11 +68,11 @@