From a2cc7d1db93237d69f8b3d7a4f72472976f460c1 Mon Sep 17 00:00:00 2001 From: zsxeee Date: Tue, 12 Oct 2021 15:10:32 +0800 Subject: [PATCH 1/5] Avoid directory not found error --- extra/update-language-files/index.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/extra/update-language-files/index.js b/extra/update-language-files/index.js index a90f9f36..7ba30cc0 100644 --- a/extra/update-language-files/index.js +++ b/extra/update-language-files/index.js @@ -26,10 +26,12 @@ const copyRecursiveSync = function (src, dest) { } }; -console.log("Arguments:", process.argv) +console.log("Arguments:", process.argv); const baseLangCode = process.argv[2] || "en"; console.log("Base Lang: " + baseLangCode); -fs.rmdirSync("./languages", { recursive: true }); +if (fs.existsSync("./languages")) { + fs.rmdirSync("./languages", { recursive: true }); +} copyRecursiveSync("../../src/languages", "./languages"); const en = (await import("./languages/en.js")).default; @@ -39,7 +41,7 @@ console.log("Files:", files); for (const file of files) { if (!file.endsWith(".js")) { - console.log("Skipping " + file) + console.log("Skipping " + file); continue; } From 3fe91c52cb994d5e8e0617d7a05854c1e8c6c193 Mon Sep 17 00:00:00 2001 From: zsxeee Date: Tue, 12 Oct 2021 16:29:18 +0800 Subject: [PATCH 2/5] Fix i18n Missing webhook json description Ajust Telegram context-based sentence, (also changed translated language files) Missing primary base url label Wrong PromoSMS i18n Missing Octopush legacy hint Missing Matrix i18n Missing push url i18n --- src/components/notifications/Matrix.vue | 18 +++++++++--------- src/components/notifications/Octopush.vue | 2 +- src/components/notifications/PromoSMS.vue | 6 +++--- src/components/notifications/Telegram.vue | 6 +++--- src/components/notifications/Webhook.vue | 2 +- src/languages/en.js | 12 +++++++++++- src/languages/fr-FR.js | 2 +- src/languages/ko-KR.js | 2 +- src/languages/nb-NO.js | 2 +- src/languages/pl.js | 2 +- src/pages/EditMonitor.vue | 4 ++-- src/pages/Settings.vue | 2 +- 12 files changed, 35 insertions(+), 25 deletions(-) diff --git a/src/components/notifications/Matrix.vue b/src/components/notifications/Matrix.vue index d1e973cd..d4790646 100644 --- a/src/components/notifications/Matrix.vue +++ b/src/components/notifications/Matrix.vue @@ -1,25 +1,25 @@ @@ -30,5 +30,5 @@ export default { components: { HiddenInput, }, -} +}; diff --git a/src/components/notifications/Octopush.vue b/src/components/notifications/Octopush.vue index c75e87d3..37629d39 100644 --- a/src/components/notifications/Octopush.vue +++ b/src/components/notifications/Octopush.vue @@ -6,7 +6,7 @@
- Do you use the legacy version of Octopush (2011-2020) or the new version? + {{ $t("octopushLegacyHint") }}
diff --git a/src/components/notifications/PromoSMS.vue b/src/components/notifications/PromoSMS.vue index 640360d0..06dea0b2 100644 --- a/src/components/notifications/PromoSMS.vue +++ b/src/components/notifications/PromoSMS.vue @@ -13,9 +13,10 @@ - +
+ {{ $t("checkPrice", [$t("promosms")]) }} https://promosms.com/cennik/ - +
@@ -25,7 +26,6 @@
-