From d6a50afc82e3d3ed51be81bef3523ad19c8bf418 Mon Sep 17 00:00:00 2001 From: BugHaver <43462320+bughaver@users.noreply.github.com> Date: Fri, 9 May 2025 19:19:01 +1000 Subject: [PATCH 01/10] implement short syntax for week --- CHANGELOG.md | 1 + modules/default/clock/clock.js | 15 +++++++++++-- .../modules/clock/clock_showWeek_short.js | 20 ++++++++++++++++++ .../modules/clock/es/clock_showWeek_short.js | 21 +++++++++++++++++++ tests/e2e/modules/clock_es_spec.js | 12 +++++++++++ tests/e2e/modules/clock_spec.js | 20 ++++++++++++++++++ 6 files changed, 87 insertions(+), 2 deletions(-) create mode 100644 tests/configs/modules/clock/clock_showWeek_short.js create mode 100644 tests/configs/modules/clock/es/clock_showWeek_short.js diff --git a/CHANGELOG.md b/CHANGELOG.md index 05279fab93..45c9b7b1df 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,7 @@ planned for 2025-07-01 - [config] Allow to change module order for final renderer (or dynamicaly with CSS): Feature `order` in config. (#3762) - [clock] Added option 'disableNextEvent' to hide next sun event (#3769) +- [clock] Implement short syntax for clock week (#3775) ### Changed diff --git a/modules/default/clock/clock.js b/modules/default/clock/clock.js index f5c7411d23..0f479b24f6 100644 --- a/modules/default/clock/clock.js +++ b/modules/default/clock/clock.js @@ -14,7 +14,7 @@ Module.register("clock", { clockBold: false, showDate: true, showTime: true, - showWeek: false, + showWeek: false, // options: true, false, 'short' dateFormat: "dddd, LL", sendNotifications: false, @@ -224,7 +224,18 @@ Module.register("clock", { } if (this.config.showWeek) { - weekWrapper.innerHTML = this.translate("WEEK", { weekNumber: now.week() }); + const weekTranslated = this.translate("WEEK", { weekNumber: now.week() }); + + if (this.config.showWeek === "short") { + const weekTextArr = weekTranslated.split(" "); + const weekTextShort = weekTextArr[0][0]; + const weekValue = weekTextArr.at(-1); + + weekWrapper.innerHTML = weekTextShort + weekValue; + } else { + weekWrapper.innerHTML = weekTranslated; + } + digitalWrapper.appendChild(weekWrapper); } diff --git a/tests/configs/modules/clock/clock_showWeek_short.js b/tests/configs/modules/clock/clock_showWeek_short.js new file mode 100644 index 0000000000..6728d01f8e --- /dev/null +++ b/tests/configs/modules/clock/clock_showWeek_short.js @@ -0,0 +1,20 @@ +let config = { + address: "0.0.0.0", + ipWhitelist: [], + timeFormat: 12, + + modules: [ + { + module: "clock", + position: "middle_center", + config: { + showWeek: "short" + } + } + ] +}; + +/*************** DO NOT EDIT THE LINE BELOW ***************/ +if (typeof module !== "undefined") { + module.exports = config; +} diff --git a/tests/configs/modules/clock/es/clock_showWeek_short.js b/tests/configs/modules/clock/es/clock_showWeek_short.js new file mode 100644 index 0000000000..2581a2d46d --- /dev/null +++ b/tests/configs/modules/clock/es/clock_showWeek_short.js @@ -0,0 +1,21 @@ +let config = { + address: "0.0.0.0", + ipWhitelist: [], + language: "es", + timeFormat: 12, + + modules: [ + { + module: "clock", + position: "middle_center", + config: { + showWeek: "short" + } + } + ] +}; + +/*************** DO NOT EDIT THE LINE BELOW ***************/ +if (typeof module !== "undefined") { + module.exports = config; +} diff --git a/tests/e2e/modules/clock_es_spec.js b/tests/e2e/modules/clock_es_spec.js index 134c795b0a..38b997a50b 100644 --- a/tests/e2e/modules/clock_es_spec.js +++ b/tests/e2e/modules/clock_es_spec.js @@ -62,4 +62,16 @@ describe("Clock set to spanish language module", () => { await expect(helpers.testMatch(".clock .week", weekRegex)).resolves.toBe(true); }); }); + + describe("with showWeek short config enabled", () => { + beforeAll(async () => { + await helpers.startApplication("tests/configs/modules/clock/es/clock_showWeek_short.js"); + await helpers.getDocument(); + }); + + it("shows week with correct format", async () => { + const weekRegex = /^S[0-9]{1,2}$/; + await expect(helpers.testMatch(".clock .week", weekRegex)).resolves.toBe(true); + }); + }); }); diff --git a/tests/e2e/modules/clock_spec.js b/tests/e2e/modules/clock_spec.js index 9d9680e1c4..71470fec54 100644 --- a/tests/e2e/modules/clock_spec.js +++ b/tests/e2e/modules/clock_spec.js @@ -138,6 +138,26 @@ describe("Clock module", () => { }); }); + describe("with showWeek short config enabled", () => { + beforeAll(async () => { + await helpers.startApplication("tests/configs/modules/clock/clock_showWeek_short.js"); + await helpers.getDocument(); + }); + + it("should show the week in the correct format", async () => { + const weekRegex = /^W[0-9]{1,2}$/; + await expect(helpers.testMatch(".clock .week", weekRegex)).resolves.toBe(true); + }); + + it("should show the week with the correct number of week of year", async () => { + const currentWeekNumber = moment().week(); + const weekToShow = `W${currentWeekNumber}`; + const elem = await helpers.waitForElement(".clock .week"); + expect(elem).not.toBeNull(); + expect(elem.textContent).toBe(weekToShow); + }); + }); + describe("with analog clock face enabled", () => { beforeAll(async () => { await helpers.startApplication("tests/configs/modules/clock/clock_analog.js"); From 188dcd3bb01cbb9fbfbdb8033f79ce751aa04eb4 Mon Sep 17 00:00:00 2001 From: BugHaver <43462320+lsaadeh@users.noreply.github.com> Date: Sat, 10 May 2025 18:09:53 +1000 Subject: [PATCH 02/10] implement using string --- modules/default/clock/clock.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/default/clock/clock.js b/modules/default/clock/clock.js index 0f479b24f6..1660599396 100644 --- a/modules/default/clock/clock.js +++ b/modules/default/clock/clock.js @@ -231,7 +231,7 @@ Module.register("clock", { const weekTextShort = weekTextArr[0][0]; const weekValue = weekTextArr.at(-1); - weekWrapper.innerHTML = weekTextShort + weekValue; + weekWrapper.innerHTML = `${weekTextShort}${weekValue}`; } else { weekWrapper.innerHTML = weekTranslated; } From 64e5ade0350cad7a06c7530906cd325fbd22ef8a Mon Sep 17 00:00:00 2001 From: BugHaver <43462320+lsaadeh@users.noreply.github.com> Date: Sat, 10 May 2025 19:57:52 +1000 Subject: [PATCH 03/10] updates --- modules/default/clock/clock.js | 10 ++-------- translations/af.json | 2 ++ translations/ar.json | 1 + translations/bg.json | 1 + translations/ca.json | 3 ++- translations/cs.json | 1 + translations/cv.json | 1 + translations/cy.json | 1 + translations/da.json | 1 + translations/de.json | 1 + translations/el.json | 2 ++ translations/en.json | 1 + translations/eo.json | 1 + translations/es.json | 1 + translations/et.json | 1 + translations/fi.json | 1 + translations/fr.json | 1 + translations/fy.json | 2 ++ translations/gl.json | 2 +- translations/gu.json | 1 + translations/he.json | 1 + translations/hi.json | 1 + translations/hr.json | 1 + translations/hu.json | 1 + translations/id.json | 3 ++- translations/is.json | 2 ++ translations/it.json | 1 + translations/ja.json | 2 ++ translations/ko.json | 1 + translations/lt.json | 1 + translations/ms-my.json | 1 + translations/nb.json | 1 + translations/nl.json | 1 + translations/nn.json | 2 ++ translations/pl.json | 1 + translations/ps.json | 1 + translations/pt-br.json | 2 ++ translations/pt.json | 1 + translations/ro.json | 1 + translations/ru.json | 1 + translations/sk.json | 1 + translations/sv.json | 1 + translations/th.json | 1 + translations/tlh.json | 1 + translations/tr.json | 1 + translations/uk.json | 1 + translations/zh-cn.json | 1 + translations/zh-tw.json | 1 + 48 files changed, 58 insertions(+), 11 deletions(-) diff --git a/modules/default/clock/clock.js b/modules/default/clock/clock.js index 1660599396..d013cd25a0 100644 --- a/modules/default/clock/clock.js +++ b/modules/default/clock/clock.js @@ -224,16 +224,10 @@ Module.register("clock", { } if (this.config.showWeek) { - const weekTranslated = this.translate("WEEK", { weekNumber: now.week() }); - if (this.config.showWeek === "short") { - const weekTextArr = weekTranslated.split(" "); - const weekTextShort = weekTextArr[0][0]; - const weekValue = weekTextArr.at(-1); - - weekWrapper.innerHTML = `${weekTextShort}${weekValue}`; + weekWrapper.innerHTML = this.translate("WEEK_SHORT", { weekNumber: now.week() }); } else { - weekWrapper.innerHTML = weekTranslated; + weekWrapper.innerHTML = this.translate("WEEK", { weekNumber: now.week() }); } digitalWrapper.appendChild(weekWrapper); diff --git a/translations/af.json b/translations/af.json index 7ef2bd558c..98620e21a1 100644 --- a/translations/af.json +++ b/translations/af.json @@ -7,6 +7,8 @@ "DAYAFTERTOMORROW": "Oormôre", "RUNNING": "Eindig in", "EMPTY": "Geen komende gebeurtenisse.", + "WEEK": "Week {weekNumber}", + "WEEK_SHORT": "W{weekNumber}", "N": "N", "NNE": "NNO", diff --git a/translations/ar.json b/translations/ar.json index 968d253283..3438de71d4 100644 --- a/translations/ar.json +++ b/translations/ar.json @@ -7,6 +7,7 @@ "RUNNING": "ينتهي خلال", "EMPTY": "لا توجد أحداث قادمة.", "WEEK": "الأسبوع {weekNumber}", + "WEEK_SHORT": "أ{weekNumber}", "N": "شمال", "NNE": "شمال شمال شرقي", diff --git a/translations/bg.json b/translations/bg.json index cd0c01a2df..d9ed77ae52 100644 --- a/translations/bg.json +++ b/translations/bg.json @@ -9,6 +9,7 @@ "RUNNING": "Свършва след", "EMPTY": "Няма предстоящи събития.", "WEEK": "Седмица {weekNumber}", + "WEEK_SHORT": "С{weekNumber}", "N": "С", "NNE": "ССИ", diff --git a/translations/ca.json b/translations/ca.json index 73b8948c29..098ee2e401 100644 --- a/translations/ca.json +++ b/translations/ca.json @@ -7,7 +7,8 @@ "DAYAFTERTOMORROW": "Demà passat", "RUNNING": "Acaba en", "EMPTY": "No hi ha esdeveniments programats.", - "WEEK": "Setmana", + "WEEK": "Setmana {weekNumber}", + "WEEK_SHORT": "S{weekNumber}", "N": "N", "NNE": "NNE", diff --git a/translations/cs.json b/translations/cs.json index 74a0896f0e..22121374e7 100644 --- a/translations/cs.json +++ b/translations/cs.json @@ -9,6 +9,7 @@ "RUNNING": "Končí za", "EMPTY": "Žádné nadcházející události.", "WEEK": "{weekNumber}. týden", + "WEEK_SHORT": "{weekNumber}T", "N": "S", "NNE": "SSV", diff --git a/translations/cv.json b/translations/cv.json index 34fc4fc2b5..dc3b90a897 100644 --- a/translations/cv.json +++ b/translations/cv.json @@ -8,6 +8,7 @@ "RUNNING": "Хальхи", "EMPTY": "Пулас ӗҫ ҫук", "WEEK": "{weekNumber} эрне", + "WEEK_SHORT": "{weekNumber}Э", "N": "Ҫ", "NNE": "ҪҪТ", diff --git a/translations/cy.json b/translations/cy.json index 531d811633..22dcd4ec55 100644 --- a/translations/cy.json +++ b/translations/cy.json @@ -8,6 +8,7 @@ "RUNNING": "Gorffen mewn", "EMPTY": "Dim digwyddiadau.", "WEEK": "Wythnos {weekNumber}", + "WEEK_SHORT": "W{weekNumber}", "N": "Go", "NNE": "GoGoDw", diff --git a/translations/da.json b/translations/da.json index ed32a142cd..01874e1710 100644 --- a/translations/da.json +++ b/translations/da.json @@ -9,6 +9,7 @@ "RUNNING": "Slutter om", "EMPTY": "Ingen kommende begivenheder.", "WEEK": "Uge {weekNumber}", + "WEEK_SHORT": "U{weekNumber}", "N": "N", "NNE": "NNØ", diff --git a/translations/de.json b/translations/de.json index d0f5eed7cb..86597b1601 100644 --- a/translations/de.json +++ b/translations/de.json @@ -9,6 +9,7 @@ "RUNNING": "noch", "EMPTY": "Keine Termine.", "WEEK": "{weekNumber}. Kalenderwoche", + "WEEK_SHORT": "{weekNumber}KW", "N": "N", "NNE": "NNO", diff --git a/translations/el.json b/translations/el.json index dd8d007cdf..092710600a 100644 --- a/translations/el.json +++ b/translations/el.json @@ -7,6 +7,8 @@ "TOMORROW": "Αύριο", "RUNNING": "Λήγει σε", "EMPTY": "Δεν υπάρχουν προσεχείς εκδηλώσεις.", + "WEEK": "Εβδομάδα {weekNumber}", + "WEEK_SHORT": "Ε{weekNumber}", "N": "B", "NNE": "BBA", diff --git a/translations/en.json b/translations/en.json index e10801e5b8..c4a2f196df 100644 --- a/translations/en.json +++ b/translations/en.json @@ -7,6 +7,7 @@ "RUNNING": "Ends in", "EMPTY": "No upcoming events.", "WEEK": "Week {weekNumber}", + "WEEK_SHORT": "W{weekNumber}", "N": "N", "NNE": "NNE", diff --git a/translations/eo.json b/translations/eo.json index d4579b60b6..b3bc6b7436 100644 --- a/translations/eo.json +++ b/translations/eo.json @@ -9,6 +9,7 @@ "RUNNING": "ankoraŭ", "EMPTY": "Neniu evento.", "WEEK": "{weekNumber}a kalendara semajno", + "WEEK_SHORT": "{weekNumber}S", "N": "N", "NNE": "NNOr", diff --git a/translations/es.json b/translations/es.json index 454dcf404e..67be6ab952 100644 --- a/translations/es.json +++ b/translations/es.json @@ -9,6 +9,7 @@ "RUNNING": "Termina en", "EMPTY": "No hay eventos programados.", "WEEK": "Semana {weekNumber}", + "WEEK_SHORT": "S{weekNumber}", "N": "N", "NNE": "NNE", diff --git a/translations/et.json b/translations/et.json index cd3d5ebe7a..0685847356 100644 --- a/translations/et.json +++ b/translations/et.json @@ -9,6 +9,7 @@ "RUNNING": "Lõpeb", "EMPTY": "Eelolevaid sündmusi pole.", "WEEK": "Nädal {weekNumber}", + "WEEK_SHORT": "N{weekNumber}", "N": "Põhi", "NNE": "Põhjakirre", diff --git a/translations/fi.json b/translations/fi.json index 87c0ef24a8..fc7fc98978 100644 --- a/translations/fi.json +++ b/translations/fi.json @@ -9,6 +9,7 @@ "RUNNING": "Päättyy {timeUntilEnd} päästä", "EMPTY": "Ei tulevia tapahtumia.", "WEEK": "Viikko {weekNumber}", + "WEEK_SHORT": "V{weekNumber}", "N": "P", "NNE": "PPI", diff --git a/translations/fr.json b/translations/fr.json index b7f9d02746..226f454fcf 100644 --- a/translations/fr.json +++ b/translations/fr.json @@ -9,6 +9,7 @@ "RUNNING": "Se termine dans", "EMPTY": "Aucun RDV à venir.", "WEEK": "Semaine {weekNumber}", + "WEEK_SHORT": "S{weekNumber}", "N": "N", "NNE": "NNE", diff --git a/translations/fy.json b/translations/fy.json index ba1bc12c75..1d6f659922 100644 --- a/translations/fy.json +++ b/translations/fy.json @@ -7,6 +7,8 @@ "DAYAFTERTOMORROW": "Oaremoarn", "RUNNING": "Einigest oer", "EMPTY": "Gjin plande ôfspraken.", + "WEEK": "Wike {weekNumber}", + "WEEK_SHORT": "W{weekNumber}", "N": "N", "NNE": "NNE", diff --git a/translations/gl.json b/translations/gl.json index 1de91d628f..35361f217b 100644 --- a/translations/gl.json +++ b/translations/gl.json @@ -7,8 +7,8 @@ "DAYAFTERTOMORROW": "Pasado mañá", "RUNNING": "Remata en", "EMPTY": "Non hai próximos eventos.", - "WEEK": "Semana {weekNumber}", + "WEEK_SHORT": "S{weekNumber}", "N": "N", "NNE": "NNE", diff --git a/translations/gu.json b/translations/gu.json index 015dc3d0bd..eeeb6bc481 100644 --- a/translations/gu.json +++ b/translations/gu.json @@ -8,6 +8,7 @@ "RUNNING": "માં સમાપ્ત થાય છે", "EMPTY": "કોઈ આગામી કાર્યક્રમ નથી.", "WEEK": "સપ્તાહ {weekNumber}", + "WEEK_SHORT": "સ{weekNumber}", "N": "ઉ", "NNE": "ઉઉપુ", diff --git a/translations/he.json b/translations/he.json index 1661c9cc3f..b291626c76 100644 --- a/translations/he.json +++ b/translations/he.json @@ -9,6 +9,7 @@ "RUNNING": "מסתיים ב", "EMPTY": "אין ארועים", "WEEK": "{weekNumber} שבוע", + "WEEK_SHORT": "{weekNumber}ש", "N": "צ", "NNE": "צ-צ-מז", diff --git a/translations/hi.json b/translations/hi.json index f93d2c25b8..f4e87afb06 100644 --- a/translations/hi.json +++ b/translations/hi.json @@ -9,6 +9,7 @@ "RUNNING": "में समाप्त", "EMPTY": "कोई आगामी कार्यक्रम नहीं।", "WEEK": "सप्ताह {weekNumber}", + "WEEK_SHORT": "स{weekNumber}", "N": "उ", "NNE": "उउपु", diff --git a/translations/hr.json b/translations/hr.json index 27b835fd7d..4f3e0cf629 100644 --- a/translations/hr.json +++ b/translations/hr.json @@ -9,6 +9,7 @@ "RUNNING": "Završava za", "EMPTY": "Nema nadolazećih događaja.", "WEEK": "Tjedan {weekNumber}", + "WEEK_SHORT": "T{weekNumber}", "N": "N", "NNE": "NNE", diff --git a/translations/hu.json b/translations/hu.json index 7a8b3d7f76..48cc33e1c9 100644 --- a/translations/hu.json +++ b/translations/hu.json @@ -7,6 +7,7 @@ "RUNNING": "Vége lesz", "EMPTY": "Nincs közelgő esemény.", "WEEK": "{weekNumber}. hét", + "WEEK_SHORT": "{weekNumber}H", "N": "É", "NNE": "ÉÉK", diff --git a/translations/id.json b/translations/id.json index 439d2151f8..bcdb651111 100644 --- a/translations/id.json +++ b/translations/id.json @@ -7,7 +7,8 @@ "DAYAFTERTOMORROW": "Lusa", "RUNNING": "Berakhir dalam", "EMPTY": "Tidak ada agenda", - "WEEK": "Pekan", + "WEEK": "Pekan {weekNumber}", + "WEEK_SHORT": "P{weekNumber}", "N": "U", "NNE": "UTL", diff --git a/translations/is.json b/translations/is.json index c4da887cf7..05012ef522 100644 --- a/translations/is.json +++ b/translations/is.json @@ -8,6 +8,8 @@ "DAYAFTERTOMORROW": "Ekki á morgun, heldur hinn", "RUNNING": "Endar eftir", "EMPTY": "Ekkert framundan.", + "WEEK": "Vika {weekNumber}", + "WEEK_SHORT": "V{weekNumber}", "N": "N", "NNE": "NNA", diff --git a/translations/it.json b/translations/it.json index 79199f1a47..5983ffa6f0 100644 --- a/translations/it.json +++ b/translations/it.json @@ -8,6 +8,7 @@ "RUNNING": "Termina entro", "EMPTY": "Nessun evento imminente.", "WEEK": "Settimana {weekNumber}", + "WEEK_SHORT": "S{weekNumber}", "N": "N", "NNE": "NNE", diff --git a/translations/ja.json b/translations/ja.json index a59a82bfc9..ccfe15ef00 100644 --- a/translations/ja.json +++ b/translations/ja.json @@ -7,6 +7,8 @@ "TOMORROW": "明日", "RUNNING": "で終わります", "EMPTY": "直近のイベントはありません", + "WEEK": "第{weekNumber}週", + "WEEK_SHORT": "{weekNumber}週", "N": "北", "NNE": "北北東", diff --git a/translations/ko.json b/translations/ko.json index 7fc8432889..954a436ea4 100644 --- a/translations/ko.json +++ b/translations/ko.json @@ -8,6 +8,7 @@ "RUNNING": "종료 일", "EMPTY": "예정된 이벤트가 없습니다.", "WEEK": "{weekNumber}주차", + "WEEK_SHORT": "{weekNumber}주", "N": "북풍", "NNE": "북북동풍", diff --git a/translations/lt.json b/translations/lt.json index dc7a23af1a..dc2efaa1e2 100644 --- a/translations/lt.json +++ b/translations/lt.json @@ -9,6 +9,7 @@ "RUNNING": "Pasibaigs už", "EMPTY": "Nėra artimų įvykių.", "WEEK": "{weekNumber} savaitė", + "WEEK_SHORT": "{weekNumber}S", "N": "Š", "NNE": "ŠŠR", diff --git a/translations/ms-my.json b/translations/ms-my.json index 07d0bb996c..205fb4a5bd 100644 --- a/translations/ms-my.json +++ b/translations/ms-my.json @@ -8,6 +8,7 @@ "RUNNING": "Berakhir dalam", "EMPTY": "Tidak ada agenda", "WEEK": "Minggu ke-{weekNumber}", + "WEEK_SHORT": "M{weekNumber}", "N": "U", "NNE": "UUT", diff --git a/translations/nb.json b/translations/nb.json index 669b2d265a..e83f14dfcc 100644 --- a/translations/nb.json +++ b/translations/nb.json @@ -9,6 +9,7 @@ "RUNNING": "Slutter om", "EMPTY": "Ingen kommende arrangementer.", "WEEK": "Uke {weekNumber}", + "WEEK_SHORT": "U{weekNumber}", "N": "N", "NNE": "NNØ", diff --git a/translations/nl.json b/translations/nl.json index 8e2fbb34eb..c9d35ff1a4 100644 --- a/translations/nl.json +++ b/translations/nl.json @@ -9,6 +9,7 @@ "RUNNING": "Eindigt over", "EMPTY": "Geen geplande afspraken.", "WEEK": "Week {weekNumber}", + "WEEK_SHORT": "W{weekNumber}", "N": "N", "NNE": "NNO", diff --git a/translations/nn.json b/translations/nn.json index 609d8fc646..0eed034111 100644 --- a/translations/nn.json +++ b/translations/nn.json @@ -8,6 +8,8 @@ "DAYAFTERTOMORROW": "I overmorgon", "RUNNING": "Sluttar om", "EMPTY": "Ingen komande hendingar.", + "WEEK": "Veke {weekNumber}", + "WEEK_SHORT": "V{weekNumber}", "N": "N", "NNE": "NNA", diff --git a/translations/pl.json b/translations/pl.json index 04fd0ca194..d25e74780c 100644 --- a/translations/pl.json +++ b/translations/pl.json @@ -9,6 +9,7 @@ "RUNNING": "Koniec za", "EMPTY": "Brak wydarzeń.", "WEEK": "Tydzień {weekNumber}", + "WEEK_SHORT": "T{weekNumber}", "N": "N", "NNE": "NNE", diff --git a/translations/ps.json b/translations/ps.json index 701c30e82a..b44b360471 100644 --- a/translations/ps.json +++ b/translations/ps.json @@ -9,6 +9,7 @@ "RUNNING": "روان", "EMPTY": "تش", "WEEK": "{weekNumber}. اونۍ", + "WEEK_SHORT": "{weekNumber}ا", "N": "N", "NNE": "NNO", diff --git a/translations/pt-br.json b/translations/pt-br.json index 4c1a49061a..75b8f6bced 100644 --- a/translations/pt-br.json +++ b/translations/pt-br.json @@ -7,6 +7,8 @@ "TOMORROW": "Amanhã", "RUNNING": "Acaba em", "EMPTY": "Nenhum evento novo.", + "WEEK": "Semana {weekNumber}", + "WEEK_SHORT": "S{weekNumber}", "N": "N", "NNE": "NNE", diff --git a/translations/pt.json b/translations/pt.json index 2b1e1cf0ff..43098cee6a 100644 --- a/translations/pt.json +++ b/translations/pt.json @@ -9,6 +9,7 @@ "RUNNING": "Termina em", "EMPTY": "Sem eventos programados.", "WEEK": "Semana {weekNumber}", + "WEEK_SHORT": "S{weekNumber}", "N": "N", "NNE": "NNE", diff --git a/translations/ro.json b/translations/ro.json index ce04e337a2..0361a18158 100644 --- a/translations/ro.json +++ b/translations/ro.json @@ -9,6 +9,7 @@ "RUNNING": "Se termină în", "EMPTY": "Nici un eveniment.", "WEEK": "Săptămâna {weekNumber}", + "WEEK_SHORT": "S{weekNumber}", "N": "N", "NNE": "NNE", diff --git a/translations/ru.json b/translations/ru.json index eb4c2f77be..8ff6728bc1 100644 --- a/translations/ru.json +++ b/translations/ru.json @@ -9,6 +9,7 @@ "RUNNING": "Заканчивается через", "EMPTY": "Нет предстоящих событий", "WEEK": "Неделя {weekNumber}", + "WEEK_SHORT": "Н{weekNumber}", "N": "С", "NNE": "ССВ", diff --git a/translations/sk.json b/translations/sk.json index ef1757b85b..f7300f9e76 100644 --- a/translations/sk.json +++ b/translations/sk.json @@ -9,6 +9,7 @@ "RUNNING": "Končí o", "EMPTY": "Žiadne nadchádzajúce udalosti.", "WEEK": "{weekNumber}. týždeň", + "WEEK_SHORT": "{weekNumber}T", "N": "S", "NNE": "SSV", diff --git a/translations/sv.json b/translations/sv.json index 0d37a1bba6..1c48b3f168 100644 --- a/translations/sv.json +++ b/translations/sv.json @@ -9,6 +9,7 @@ "RUNNING": "Slutar", "EMPTY": "Inga kommande händelser.", "WEEK": "Vecka {weekNumber}", + "WEEK_SHORT": "V{weekNumber}", "N": "N", "NNE": "NNO", diff --git a/translations/th.json b/translations/th.json index 26f472b7b9..995cfc606b 100644 --- a/translations/th.json +++ b/translations/th.json @@ -6,6 +6,7 @@ "RUNNING": "สิ้นสุดใน", "EMPTY": "ไม่มีกิจกรรมที่กำลังจะมาถึง", "WEEK": "สัปดาห์ที่ {weekNumber}", + "WEEK_SHORT": "ส{weekNumber}", "N": "น", "NNE": "น.ต.อ.น.", diff --git a/translations/tlh.json b/translations/tlh.json index 6bcefefa55..d9aa4354cf 100644 --- a/translations/tlh.json +++ b/translations/tlh.json @@ -9,6 +9,7 @@ "RUNNING": "Dor", "EMPTY": "Sumbe' wanI'.", "WEEK": "Hogh (terran) {weekNumber}", + "WEEK_SHORT": "H{weekNumber}", "N": "N", "NNE": "NNE", diff --git a/translations/tr.json b/translations/tr.json index 3c03f2954c..d25608809a 100644 --- a/translations/tr.json +++ b/translations/tr.json @@ -8,6 +8,7 @@ "RUNNING": "Biten", "EMPTY": "Yakında etkinlik yok.", "WEEK": "Hafta {weekNumber}", + "WEEK_SHORT": "H{weekNumber}", "N": "K", "NNE": "KKD", diff --git a/translations/uk.json b/translations/uk.json index 3bb4284e0d..abaf2a364a 100644 --- a/translations/uk.json +++ b/translations/uk.json @@ -9,6 +9,7 @@ "RUNNING": "Закінчується через", "EMPTY": "Немає найближчих подій", "WEEK": "Тиждень {weekNumber}", + "WEEK_SHORT": "Т{weekNumber}", "N": "Пн", "NNE": "ПнПнСх", diff --git a/translations/zh-cn.json b/translations/zh-cn.json index f4ee2562f7..74036bbfae 100644 --- a/translations/zh-cn.json +++ b/translations/zh-cn.json @@ -9,6 +9,7 @@ "RUNNING": "结束日期", "EMPTY": "无日程安排。", "WEEK": "第{weekNumber}周", + "WEEK_SHORT": "{weekNumber}周", "N": "北风", "NNE": "北偏东风", diff --git a/translations/zh-tw.json b/translations/zh-tw.json index 6bdd95dcb5..9c22344c57 100644 --- a/translations/zh-tw.json +++ b/translations/zh-tw.json @@ -9,6 +9,7 @@ "RUNNING": "結束日期", "EMPTY": "沒有更多的活動。", "WEEK": "第 {weekNumber} 週", + "WEEK_SHORT": "{weekNumber}週", "N": "北風", "NNE": "北偏東風", From 67bd3814ec627ebbd45c3922e4097b7499ef2c1b Mon Sep 17 00:00:00 2001 From: BugHaver <43462320+bughaver@users.noreply.github.com> Date: Fri, 9 May 2025 19:19:01 +1000 Subject: [PATCH 04/10] implement short syntax for week --- CHANGELOG.md | 1 + modules/default/clock/clock.js | 9 ++++++-- .../modules/clock/clock_showWeek_short.js | 20 ++++++++++++++++++ .../modules/clock/es/clock_showWeek_short.js | 21 +++++++++++++++++++ tests/e2e/modules/clock_es_spec.js | 12 +++++++++++ tests/e2e/modules/clock_spec.js | 20 ++++++++++++++++++ translations/af.json | 2 ++ translations/ar.json | 1 + translations/bg.json | 1 + translations/ca.json | 3 ++- translations/cs.json | 1 + translations/cv.json | 1 + translations/cy.json | 1 + translations/da.json | 1 + translations/de.json | 1 + translations/el.json | 2 ++ translations/en.json | 1 + translations/eo.json | 1 + translations/es.json | 1 + translations/et.json | 1 + translations/fi.json | 1 + translations/fr.json | 1 + translations/fy.json | 2 ++ translations/gl.json | 2 +- translations/gu.json | 1 + translations/he.json | 1 + translations/hi.json | 1 + translations/hr.json | 1 + translations/hu.json | 1 + translations/id.json | 3 ++- translations/is.json | 2 ++ translations/it.json | 1 + translations/ja.json | 2 ++ translations/ko.json | 1 + translations/lt.json | 1 + translations/ms-my.json | 1 + translations/nb.json | 1 + translations/nl.json | 1 + translations/nn.json | 2 ++ translations/pl.json | 1 + translations/ps.json | 1 + translations/pt-br.json | 2 ++ translations/pt.json | 1 + translations/ro.json | 1 + translations/ru.json | 1 + translations/sk.json | 1 + translations/sv.json | 1 + translations/th.json | 1 + translations/tlh.json | 1 + translations/tr.json | 1 + translations/uk.json | 1 + translations/zh-cn.json | 1 + translations/zh-tw.json | 1 + 53 files changed, 137 insertions(+), 5 deletions(-) create mode 100644 tests/configs/modules/clock/clock_showWeek_short.js create mode 100644 tests/configs/modules/clock/es/clock_showWeek_short.js diff --git a/CHANGELOG.md b/CHANGELOG.md index 05279fab93..45c9b7b1df 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,7 @@ planned for 2025-07-01 - [config] Allow to change module order for final renderer (or dynamicaly with CSS): Feature `order` in config. (#3762) - [clock] Added option 'disableNextEvent' to hide next sun event (#3769) +- [clock] Implement short syntax for clock week (#3775) ### Changed diff --git a/modules/default/clock/clock.js b/modules/default/clock/clock.js index f5c7411d23..d013cd25a0 100644 --- a/modules/default/clock/clock.js +++ b/modules/default/clock/clock.js @@ -14,7 +14,7 @@ Module.register("clock", { clockBold: false, showDate: true, showTime: true, - showWeek: false, + showWeek: false, // options: true, false, 'short' dateFormat: "dddd, LL", sendNotifications: false, @@ -224,7 +224,12 @@ Module.register("clock", { } if (this.config.showWeek) { - weekWrapper.innerHTML = this.translate("WEEK", { weekNumber: now.week() }); + if (this.config.showWeek === "short") { + weekWrapper.innerHTML = this.translate("WEEK_SHORT", { weekNumber: now.week() }); + } else { + weekWrapper.innerHTML = this.translate("WEEK", { weekNumber: now.week() }); + } + digitalWrapper.appendChild(weekWrapper); } diff --git a/tests/configs/modules/clock/clock_showWeek_short.js b/tests/configs/modules/clock/clock_showWeek_short.js new file mode 100644 index 0000000000..6728d01f8e --- /dev/null +++ b/tests/configs/modules/clock/clock_showWeek_short.js @@ -0,0 +1,20 @@ +let config = { + address: "0.0.0.0", + ipWhitelist: [], + timeFormat: 12, + + modules: [ + { + module: "clock", + position: "middle_center", + config: { + showWeek: "short" + } + } + ] +}; + +/*************** DO NOT EDIT THE LINE BELOW ***************/ +if (typeof module !== "undefined") { + module.exports = config; +} diff --git a/tests/configs/modules/clock/es/clock_showWeek_short.js b/tests/configs/modules/clock/es/clock_showWeek_short.js new file mode 100644 index 0000000000..2581a2d46d --- /dev/null +++ b/tests/configs/modules/clock/es/clock_showWeek_short.js @@ -0,0 +1,21 @@ +let config = { + address: "0.0.0.0", + ipWhitelist: [], + language: "es", + timeFormat: 12, + + modules: [ + { + module: "clock", + position: "middle_center", + config: { + showWeek: "short" + } + } + ] +}; + +/*************** DO NOT EDIT THE LINE BELOW ***************/ +if (typeof module !== "undefined") { + module.exports = config; +} diff --git a/tests/e2e/modules/clock_es_spec.js b/tests/e2e/modules/clock_es_spec.js index 134c795b0a..38b997a50b 100644 --- a/tests/e2e/modules/clock_es_spec.js +++ b/tests/e2e/modules/clock_es_spec.js @@ -62,4 +62,16 @@ describe("Clock set to spanish language module", () => { await expect(helpers.testMatch(".clock .week", weekRegex)).resolves.toBe(true); }); }); + + describe("with showWeek short config enabled", () => { + beforeAll(async () => { + await helpers.startApplication("tests/configs/modules/clock/es/clock_showWeek_short.js"); + await helpers.getDocument(); + }); + + it("shows week with correct format", async () => { + const weekRegex = /^S[0-9]{1,2}$/; + await expect(helpers.testMatch(".clock .week", weekRegex)).resolves.toBe(true); + }); + }); }); diff --git a/tests/e2e/modules/clock_spec.js b/tests/e2e/modules/clock_spec.js index 9d9680e1c4..71470fec54 100644 --- a/tests/e2e/modules/clock_spec.js +++ b/tests/e2e/modules/clock_spec.js @@ -138,6 +138,26 @@ describe("Clock module", () => { }); }); + describe("with showWeek short config enabled", () => { + beforeAll(async () => { + await helpers.startApplication("tests/configs/modules/clock/clock_showWeek_short.js"); + await helpers.getDocument(); + }); + + it("should show the week in the correct format", async () => { + const weekRegex = /^W[0-9]{1,2}$/; + await expect(helpers.testMatch(".clock .week", weekRegex)).resolves.toBe(true); + }); + + it("should show the week with the correct number of week of year", async () => { + const currentWeekNumber = moment().week(); + const weekToShow = `W${currentWeekNumber}`; + const elem = await helpers.waitForElement(".clock .week"); + expect(elem).not.toBeNull(); + expect(elem.textContent).toBe(weekToShow); + }); + }); + describe("with analog clock face enabled", () => { beforeAll(async () => { await helpers.startApplication("tests/configs/modules/clock/clock_analog.js"); diff --git a/translations/af.json b/translations/af.json index 7ef2bd558c..98620e21a1 100644 --- a/translations/af.json +++ b/translations/af.json @@ -7,6 +7,8 @@ "DAYAFTERTOMORROW": "Oormôre", "RUNNING": "Eindig in", "EMPTY": "Geen komende gebeurtenisse.", + "WEEK": "Week {weekNumber}", + "WEEK_SHORT": "W{weekNumber}", "N": "N", "NNE": "NNO", diff --git a/translations/ar.json b/translations/ar.json index 968d253283..3438de71d4 100644 --- a/translations/ar.json +++ b/translations/ar.json @@ -7,6 +7,7 @@ "RUNNING": "ينتهي خلال", "EMPTY": "لا توجد أحداث قادمة.", "WEEK": "الأسبوع {weekNumber}", + "WEEK_SHORT": "أ{weekNumber}", "N": "شمال", "NNE": "شمال شمال شرقي", diff --git a/translations/bg.json b/translations/bg.json index cd0c01a2df..d9ed77ae52 100644 --- a/translations/bg.json +++ b/translations/bg.json @@ -9,6 +9,7 @@ "RUNNING": "Свършва след", "EMPTY": "Няма предстоящи събития.", "WEEK": "Седмица {weekNumber}", + "WEEK_SHORT": "С{weekNumber}", "N": "С", "NNE": "ССИ", diff --git a/translations/ca.json b/translations/ca.json index 73b8948c29..098ee2e401 100644 --- a/translations/ca.json +++ b/translations/ca.json @@ -7,7 +7,8 @@ "DAYAFTERTOMORROW": "Demà passat", "RUNNING": "Acaba en", "EMPTY": "No hi ha esdeveniments programats.", - "WEEK": "Setmana", + "WEEK": "Setmana {weekNumber}", + "WEEK_SHORT": "S{weekNumber}", "N": "N", "NNE": "NNE", diff --git a/translations/cs.json b/translations/cs.json index 74a0896f0e..22121374e7 100644 --- a/translations/cs.json +++ b/translations/cs.json @@ -9,6 +9,7 @@ "RUNNING": "Končí za", "EMPTY": "Žádné nadcházející události.", "WEEK": "{weekNumber}. týden", + "WEEK_SHORT": "{weekNumber}T", "N": "S", "NNE": "SSV", diff --git a/translations/cv.json b/translations/cv.json index 34fc4fc2b5..dc3b90a897 100644 --- a/translations/cv.json +++ b/translations/cv.json @@ -8,6 +8,7 @@ "RUNNING": "Хальхи", "EMPTY": "Пулас ӗҫ ҫук", "WEEK": "{weekNumber} эрне", + "WEEK_SHORT": "{weekNumber}Э", "N": "Ҫ", "NNE": "ҪҪТ", diff --git a/translations/cy.json b/translations/cy.json index 531d811633..22dcd4ec55 100644 --- a/translations/cy.json +++ b/translations/cy.json @@ -8,6 +8,7 @@ "RUNNING": "Gorffen mewn", "EMPTY": "Dim digwyddiadau.", "WEEK": "Wythnos {weekNumber}", + "WEEK_SHORT": "W{weekNumber}", "N": "Go", "NNE": "GoGoDw", diff --git a/translations/da.json b/translations/da.json index ed32a142cd..01874e1710 100644 --- a/translations/da.json +++ b/translations/da.json @@ -9,6 +9,7 @@ "RUNNING": "Slutter om", "EMPTY": "Ingen kommende begivenheder.", "WEEK": "Uge {weekNumber}", + "WEEK_SHORT": "U{weekNumber}", "N": "N", "NNE": "NNØ", diff --git a/translations/de.json b/translations/de.json index d0f5eed7cb..70b325cc2b 100644 --- a/translations/de.json +++ b/translations/de.json @@ -9,6 +9,7 @@ "RUNNING": "noch", "EMPTY": "Keine Termine.", "WEEK": "{weekNumber}. Kalenderwoche", + "WEEK_SHORT": "{weekNumber}K", "N": "N", "NNE": "NNO", diff --git a/translations/el.json b/translations/el.json index dd8d007cdf..092710600a 100644 --- a/translations/el.json +++ b/translations/el.json @@ -7,6 +7,8 @@ "TOMORROW": "Αύριο", "RUNNING": "Λήγει σε", "EMPTY": "Δεν υπάρχουν προσεχείς εκδηλώσεις.", + "WEEK": "Εβδομάδα {weekNumber}", + "WEEK_SHORT": "Ε{weekNumber}", "N": "B", "NNE": "BBA", diff --git a/translations/en.json b/translations/en.json index e10801e5b8..c4a2f196df 100644 --- a/translations/en.json +++ b/translations/en.json @@ -7,6 +7,7 @@ "RUNNING": "Ends in", "EMPTY": "No upcoming events.", "WEEK": "Week {weekNumber}", + "WEEK_SHORT": "W{weekNumber}", "N": "N", "NNE": "NNE", diff --git a/translations/eo.json b/translations/eo.json index d4579b60b6..b3bc6b7436 100644 --- a/translations/eo.json +++ b/translations/eo.json @@ -9,6 +9,7 @@ "RUNNING": "ankoraŭ", "EMPTY": "Neniu evento.", "WEEK": "{weekNumber}a kalendara semajno", + "WEEK_SHORT": "{weekNumber}S", "N": "N", "NNE": "NNOr", diff --git a/translations/es.json b/translations/es.json index 454dcf404e..67be6ab952 100644 --- a/translations/es.json +++ b/translations/es.json @@ -9,6 +9,7 @@ "RUNNING": "Termina en", "EMPTY": "No hay eventos programados.", "WEEK": "Semana {weekNumber}", + "WEEK_SHORT": "S{weekNumber}", "N": "N", "NNE": "NNE", diff --git a/translations/et.json b/translations/et.json index cd3d5ebe7a..0685847356 100644 --- a/translations/et.json +++ b/translations/et.json @@ -9,6 +9,7 @@ "RUNNING": "Lõpeb", "EMPTY": "Eelolevaid sündmusi pole.", "WEEK": "Nädal {weekNumber}", + "WEEK_SHORT": "N{weekNumber}", "N": "Põhi", "NNE": "Põhjakirre", diff --git a/translations/fi.json b/translations/fi.json index 87c0ef24a8..fc7fc98978 100644 --- a/translations/fi.json +++ b/translations/fi.json @@ -9,6 +9,7 @@ "RUNNING": "Päättyy {timeUntilEnd} päästä", "EMPTY": "Ei tulevia tapahtumia.", "WEEK": "Viikko {weekNumber}", + "WEEK_SHORT": "V{weekNumber}", "N": "P", "NNE": "PPI", diff --git a/translations/fr.json b/translations/fr.json index b7f9d02746..226f454fcf 100644 --- a/translations/fr.json +++ b/translations/fr.json @@ -9,6 +9,7 @@ "RUNNING": "Se termine dans", "EMPTY": "Aucun RDV à venir.", "WEEK": "Semaine {weekNumber}", + "WEEK_SHORT": "S{weekNumber}", "N": "N", "NNE": "NNE", diff --git a/translations/fy.json b/translations/fy.json index ba1bc12c75..1d6f659922 100644 --- a/translations/fy.json +++ b/translations/fy.json @@ -7,6 +7,8 @@ "DAYAFTERTOMORROW": "Oaremoarn", "RUNNING": "Einigest oer", "EMPTY": "Gjin plande ôfspraken.", + "WEEK": "Wike {weekNumber}", + "WEEK_SHORT": "W{weekNumber}", "N": "N", "NNE": "NNE", diff --git a/translations/gl.json b/translations/gl.json index 1de91d628f..35361f217b 100644 --- a/translations/gl.json +++ b/translations/gl.json @@ -7,8 +7,8 @@ "DAYAFTERTOMORROW": "Pasado mañá", "RUNNING": "Remata en", "EMPTY": "Non hai próximos eventos.", - "WEEK": "Semana {weekNumber}", + "WEEK_SHORT": "S{weekNumber}", "N": "N", "NNE": "NNE", diff --git a/translations/gu.json b/translations/gu.json index 015dc3d0bd..eeeb6bc481 100644 --- a/translations/gu.json +++ b/translations/gu.json @@ -8,6 +8,7 @@ "RUNNING": "માં સમાપ્ત થાય છે", "EMPTY": "કોઈ આગામી કાર્યક્રમ નથી.", "WEEK": "સપ્તાહ {weekNumber}", + "WEEK_SHORT": "સ{weekNumber}", "N": "ઉ", "NNE": "ઉઉપુ", diff --git a/translations/he.json b/translations/he.json index 1661c9cc3f..b291626c76 100644 --- a/translations/he.json +++ b/translations/he.json @@ -9,6 +9,7 @@ "RUNNING": "מסתיים ב", "EMPTY": "אין ארועים", "WEEK": "{weekNumber} שבוע", + "WEEK_SHORT": "{weekNumber}ש", "N": "צ", "NNE": "צ-צ-מז", diff --git a/translations/hi.json b/translations/hi.json index f93d2c25b8..f4e87afb06 100644 --- a/translations/hi.json +++ b/translations/hi.json @@ -9,6 +9,7 @@ "RUNNING": "में समाप्त", "EMPTY": "कोई आगामी कार्यक्रम नहीं।", "WEEK": "सप्ताह {weekNumber}", + "WEEK_SHORT": "स{weekNumber}", "N": "उ", "NNE": "उउपु", diff --git a/translations/hr.json b/translations/hr.json index 27b835fd7d..4f3e0cf629 100644 --- a/translations/hr.json +++ b/translations/hr.json @@ -9,6 +9,7 @@ "RUNNING": "Završava za", "EMPTY": "Nema nadolazećih događaja.", "WEEK": "Tjedan {weekNumber}", + "WEEK_SHORT": "T{weekNumber}", "N": "N", "NNE": "NNE", diff --git a/translations/hu.json b/translations/hu.json index 7a8b3d7f76..48cc33e1c9 100644 --- a/translations/hu.json +++ b/translations/hu.json @@ -7,6 +7,7 @@ "RUNNING": "Vége lesz", "EMPTY": "Nincs közelgő esemény.", "WEEK": "{weekNumber}. hét", + "WEEK_SHORT": "{weekNumber}H", "N": "É", "NNE": "ÉÉK", diff --git a/translations/id.json b/translations/id.json index 439d2151f8..bcdb651111 100644 --- a/translations/id.json +++ b/translations/id.json @@ -7,7 +7,8 @@ "DAYAFTERTOMORROW": "Lusa", "RUNNING": "Berakhir dalam", "EMPTY": "Tidak ada agenda", - "WEEK": "Pekan", + "WEEK": "Pekan {weekNumber}", + "WEEK_SHORT": "P{weekNumber}", "N": "U", "NNE": "UTL", diff --git a/translations/is.json b/translations/is.json index c4da887cf7..05012ef522 100644 --- a/translations/is.json +++ b/translations/is.json @@ -8,6 +8,8 @@ "DAYAFTERTOMORROW": "Ekki á morgun, heldur hinn", "RUNNING": "Endar eftir", "EMPTY": "Ekkert framundan.", + "WEEK": "Vika {weekNumber}", + "WEEK_SHORT": "V{weekNumber}", "N": "N", "NNE": "NNA", diff --git a/translations/it.json b/translations/it.json index 79199f1a47..5983ffa6f0 100644 --- a/translations/it.json +++ b/translations/it.json @@ -8,6 +8,7 @@ "RUNNING": "Termina entro", "EMPTY": "Nessun evento imminente.", "WEEK": "Settimana {weekNumber}", + "WEEK_SHORT": "S{weekNumber}", "N": "N", "NNE": "NNE", diff --git a/translations/ja.json b/translations/ja.json index a59a82bfc9..ccfe15ef00 100644 --- a/translations/ja.json +++ b/translations/ja.json @@ -7,6 +7,8 @@ "TOMORROW": "明日", "RUNNING": "で終わります", "EMPTY": "直近のイベントはありません", + "WEEK": "第{weekNumber}週", + "WEEK_SHORT": "{weekNumber}週", "N": "北", "NNE": "北北東", diff --git a/translations/ko.json b/translations/ko.json index 7fc8432889..954a436ea4 100644 --- a/translations/ko.json +++ b/translations/ko.json @@ -8,6 +8,7 @@ "RUNNING": "종료 일", "EMPTY": "예정된 이벤트가 없습니다.", "WEEK": "{weekNumber}주차", + "WEEK_SHORT": "{weekNumber}주", "N": "북풍", "NNE": "북북동풍", diff --git a/translations/lt.json b/translations/lt.json index dc7a23af1a..dc2efaa1e2 100644 --- a/translations/lt.json +++ b/translations/lt.json @@ -9,6 +9,7 @@ "RUNNING": "Pasibaigs už", "EMPTY": "Nėra artimų įvykių.", "WEEK": "{weekNumber} savaitė", + "WEEK_SHORT": "{weekNumber}S", "N": "Š", "NNE": "ŠŠR", diff --git a/translations/ms-my.json b/translations/ms-my.json index 07d0bb996c..205fb4a5bd 100644 --- a/translations/ms-my.json +++ b/translations/ms-my.json @@ -8,6 +8,7 @@ "RUNNING": "Berakhir dalam", "EMPTY": "Tidak ada agenda", "WEEK": "Minggu ke-{weekNumber}", + "WEEK_SHORT": "M{weekNumber}", "N": "U", "NNE": "UUT", diff --git a/translations/nb.json b/translations/nb.json index 669b2d265a..e83f14dfcc 100644 --- a/translations/nb.json +++ b/translations/nb.json @@ -9,6 +9,7 @@ "RUNNING": "Slutter om", "EMPTY": "Ingen kommende arrangementer.", "WEEK": "Uke {weekNumber}", + "WEEK_SHORT": "U{weekNumber}", "N": "N", "NNE": "NNØ", diff --git a/translations/nl.json b/translations/nl.json index 8e2fbb34eb..c9d35ff1a4 100644 --- a/translations/nl.json +++ b/translations/nl.json @@ -9,6 +9,7 @@ "RUNNING": "Eindigt over", "EMPTY": "Geen geplande afspraken.", "WEEK": "Week {weekNumber}", + "WEEK_SHORT": "W{weekNumber}", "N": "N", "NNE": "NNO", diff --git a/translations/nn.json b/translations/nn.json index 609d8fc646..0eed034111 100644 --- a/translations/nn.json +++ b/translations/nn.json @@ -8,6 +8,8 @@ "DAYAFTERTOMORROW": "I overmorgon", "RUNNING": "Sluttar om", "EMPTY": "Ingen komande hendingar.", + "WEEK": "Veke {weekNumber}", + "WEEK_SHORT": "V{weekNumber}", "N": "N", "NNE": "NNA", diff --git a/translations/pl.json b/translations/pl.json index 04fd0ca194..d25e74780c 100644 --- a/translations/pl.json +++ b/translations/pl.json @@ -9,6 +9,7 @@ "RUNNING": "Koniec za", "EMPTY": "Brak wydarzeń.", "WEEK": "Tydzień {weekNumber}", + "WEEK_SHORT": "T{weekNumber}", "N": "N", "NNE": "NNE", diff --git a/translations/ps.json b/translations/ps.json index 701c30e82a..b44b360471 100644 --- a/translations/ps.json +++ b/translations/ps.json @@ -9,6 +9,7 @@ "RUNNING": "روان", "EMPTY": "تش", "WEEK": "{weekNumber}. اونۍ", + "WEEK_SHORT": "{weekNumber}ا", "N": "N", "NNE": "NNO", diff --git a/translations/pt-br.json b/translations/pt-br.json index 4c1a49061a..75b8f6bced 100644 --- a/translations/pt-br.json +++ b/translations/pt-br.json @@ -7,6 +7,8 @@ "TOMORROW": "Amanhã", "RUNNING": "Acaba em", "EMPTY": "Nenhum evento novo.", + "WEEK": "Semana {weekNumber}", + "WEEK_SHORT": "S{weekNumber}", "N": "N", "NNE": "NNE", diff --git a/translations/pt.json b/translations/pt.json index 2b1e1cf0ff..43098cee6a 100644 --- a/translations/pt.json +++ b/translations/pt.json @@ -9,6 +9,7 @@ "RUNNING": "Termina em", "EMPTY": "Sem eventos programados.", "WEEK": "Semana {weekNumber}", + "WEEK_SHORT": "S{weekNumber}", "N": "N", "NNE": "NNE", diff --git a/translations/ro.json b/translations/ro.json index ce04e337a2..0361a18158 100644 --- a/translations/ro.json +++ b/translations/ro.json @@ -9,6 +9,7 @@ "RUNNING": "Se termină în", "EMPTY": "Nici un eveniment.", "WEEK": "Săptămâna {weekNumber}", + "WEEK_SHORT": "S{weekNumber}", "N": "N", "NNE": "NNE", diff --git a/translations/ru.json b/translations/ru.json index eb4c2f77be..8ff6728bc1 100644 --- a/translations/ru.json +++ b/translations/ru.json @@ -9,6 +9,7 @@ "RUNNING": "Заканчивается через", "EMPTY": "Нет предстоящих событий", "WEEK": "Неделя {weekNumber}", + "WEEK_SHORT": "Н{weekNumber}", "N": "С", "NNE": "ССВ", diff --git a/translations/sk.json b/translations/sk.json index ef1757b85b..f7300f9e76 100644 --- a/translations/sk.json +++ b/translations/sk.json @@ -9,6 +9,7 @@ "RUNNING": "Končí o", "EMPTY": "Žiadne nadchádzajúce udalosti.", "WEEK": "{weekNumber}. týždeň", + "WEEK_SHORT": "{weekNumber}T", "N": "S", "NNE": "SSV", diff --git a/translations/sv.json b/translations/sv.json index 0d37a1bba6..1c48b3f168 100644 --- a/translations/sv.json +++ b/translations/sv.json @@ -9,6 +9,7 @@ "RUNNING": "Slutar", "EMPTY": "Inga kommande händelser.", "WEEK": "Vecka {weekNumber}", + "WEEK_SHORT": "V{weekNumber}", "N": "N", "NNE": "NNO", diff --git a/translations/th.json b/translations/th.json index 26f472b7b9..995cfc606b 100644 --- a/translations/th.json +++ b/translations/th.json @@ -6,6 +6,7 @@ "RUNNING": "สิ้นสุดใน", "EMPTY": "ไม่มีกิจกรรมที่กำลังจะมาถึง", "WEEK": "สัปดาห์ที่ {weekNumber}", + "WEEK_SHORT": "ส{weekNumber}", "N": "น", "NNE": "น.ต.อ.น.", diff --git a/translations/tlh.json b/translations/tlh.json index 6bcefefa55..d9aa4354cf 100644 --- a/translations/tlh.json +++ b/translations/tlh.json @@ -9,6 +9,7 @@ "RUNNING": "Dor", "EMPTY": "Sumbe' wanI'.", "WEEK": "Hogh (terran) {weekNumber}", + "WEEK_SHORT": "H{weekNumber}", "N": "N", "NNE": "NNE", diff --git a/translations/tr.json b/translations/tr.json index 3c03f2954c..d25608809a 100644 --- a/translations/tr.json +++ b/translations/tr.json @@ -8,6 +8,7 @@ "RUNNING": "Biten", "EMPTY": "Yakında etkinlik yok.", "WEEK": "Hafta {weekNumber}", + "WEEK_SHORT": "H{weekNumber}", "N": "K", "NNE": "KKD", diff --git a/translations/uk.json b/translations/uk.json index 3bb4284e0d..abaf2a364a 100644 --- a/translations/uk.json +++ b/translations/uk.json @@ -9,6 +9,7 @@ "RUNNING": "Закінчується через", "EMPTY": "Немає найближчих подій", "WEEK": "Тиждень {weekNumber}", + "WEEK_SHORT": "Т{weekNumber}", "N": "Пн", "NNE": "ПнПнСх", diff --git a/translations/zh-cn.json b/translations/zh-cn.json index f4ee2562f7..74036bbfae 100644 --- a/translations/zh-cn.json +++ b/translations/zh-cn.json @@ -9,6 +9,7 @@ "RUNNING": "结束日期", "EMPTY": "无日程安排。", "WEEK": "第{weekNumber}周", + "WEEK_SHORT": "{weekNumber}周", "N": "北风", "NNE": "北偏东风", diff --git a/translations/zh-tw.json b/translations/zh-tw.json index 6bdd95dcb5..9c22344c57 100644 --- a/translations/zh-tw.json +++ b/translations/zh-tw.json @@ -9,6 +9,7 @@ "RUNNING": "結束日期", "EMPTY": "沒有更多的活動。", "WEEK": "第 {weekNumber} 週", + "WEEK_SHORT": "{weekNumber}週", "N": "北風", "NNE": "北偏東風", From 292679d99b78db41ee7c124da3e010b96687f41f Mon Sep 17 00:00:00 2001 From: BugHaver <43462320+lsaadeh@users.noreply.github.com> Date: Sat, 10 May 2025 20:11:17 +1000 Subject: [PATCH 05/10] updates --- translations/gl.json | 1 + 1 file changed, 1 insertion(+) diff --git a/translations/gl.json b/translations/gl.json index 35361f217b..e3bfdf8ecb 100644 --- a/translations/gl.json +++ b/translations/gl.json @@ -7,6 +7,7 @@ "DAYAFTERTOMORROW": "Pasado mañá", "RUNNING": "Remata en", "EMPTY": "Non hai próximos eventos.", + "WEEK": "Semana {weekNumber}", "WEEK_SHORT": "S{weekNumber}", From 3e10450e8ebe17addb8c3ad3e71d620b19a28f49 Mon Sep 17 00:00:00 2001 From: BugHaver <43462320+bughaver@users.noreply.github.com> Date: Sat, 10 May 2025 20:47:54 +1000 Subject: [PATCH 06/10] Update de.json --- translations/de.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/translations/de.json b/translations/de.json index 70b325cc2b..86597b1601 100644 --- a/translations/de.json +++ b/translations/de.json @@ -9,7 +9,7 @@ "RUNNING": "noch", "EMPTY": "Keine Termine.", "WEEK": "{weekNumber}. Kalenderwoche", - "WEEK_SHORT": "{weekNumber}K", + "WEEK_SHORT": "{weekNumber}KW", "N": "N", "NNE": "NNO", From 4c62cac0aa0a00e81a39e072d6446cb1742a7853 Mon Sep 17 00:00:00 2001 From: BugHaver <43462320+lsaadeh@users.noreply.github.com> Date: Sun, 11 May 2025 12:06:15 +1000 Subject: [PATCH 07/10] remove translations --- translations/af.json | 2 -- translations/ar.json | 1 - translations/bg.json | 1 - translations/ca.json | 3 +-- translations/cs.json | 1 - translations/cv.json | 1 - translations/cy.json | 1 - translations/da.json | 1 - translations/el.json | 2 -- translations/en.json | 1 - translations/eo.json | 1 - translations/es.json | 1 - translations/et.json | 1 - translations/fi.json | 1 - translations/fr.json | 1 - translations/fy.json | 2 -- translations/gl.json | 1 - translations/gu.json | 1 - translations/he.json | 1 - translations/hi.json | 1 - translations/hr.json | 1 - translations/hu.json | 1 - translations/id.json | 3 +-- translations/is.json | 2 -- translations/it.json | 1 - translations/ja.json | 2 -- translations/ko.json | 1 - translations/lt.json | 1 - translations/ms-my.json | 1 - translations/nb.json | 1 - translations/nl.json | 1 - translations/nn.json | 2 -- translations/pl.json | 1 - translations/ps.json | 1 - translations/pt-br.json | 2 -- translations/pt.json | 1 - translations/ro.json | 1 - translations/ru.json | 1 - translations/sk.json | 1 - translations/sv.json | 1 - translations/th.json | 1 - translations/tlh.json | 1 - translations/tr.json | 1 - translations/uk.json | 1 - translations/zh-cn.json | 1 - translations/zh-tw.json | 1 - 46 files changed, 2 insertions(+), 55 deletions(-) diff --git a/translations/af.json b/translations/af.json index 98620e21a1..7ef2bd558c 100644 --- a/translations/af.json +++ b/translations/af.json @@ -7,8 +7,6 @@ "DAYAFTERTOMORROW": "Oormôre", "RUNNING": "Eindig in", "EMPTY": "Geen komende gebeurtenisse.", - "WEEK": "Week {weekNumber}", - "WEEK_SHORT": "W{weekNumber}", "N": "N", "NNE": "NNO", diff --git a/translations/ar.json b/translations/ar.json index 3438de71d4..968d253283 100644 --- a/translations/ar.json +++ b/translations/ar.json @@ -7,7 +7,6 @@ "RUNNING": "ينتهي خلال", "EMPTY": "لا توجد أحداث قادمة.", "WEEK": "الأسبوع {weekNumber}", - "WEEK_SHORT": "أ{weekNumber}", "N": "شمال", "NNE": "شمال شمال شرقي", diff --git a/translations/bg.json b/translations/bg.json index d9ed77ae52..cd0c01a2df 100644 --- a/translations/bg.json +++ b/translations/bg.json @@ -9,7 +9,6 @@ "RUNNING": "Свършва след", "EMPTY": "Няма предстоящи събития.", "WEEK": "Седмица {weekNumber}", - "WEEK_SHORT": "С{weekNumber}", "N": "С", "NNE": "ССИ", diff --git a/translations/ca.json b/translations/ca.json index 098ee2e401..73b8948c29 100644 --- a/translations/ca.json +++ b/translations/ca.json @@ -7,8 +7,7 @@ "DAYAFTERTOMORROW": "Demà passat", "RUNNING": "Acaba en", "EMPTY": "No hi ha esdeveniments programats.", - "WEEK": "Setmana {weekNumber}", - "WEEK_SHORT": "S{weekNumber}", + "WEEK": "Setmana", "N": "N", "NNE": "NNE", diff --git a/translations/cs.json b/translations/cs.json index 22121374e7..74a0896f0e 100644 --- a/translations/cs.json +++ b/translations/cs.json @@ -9,7 +9,6 @@ "RUNNING": "Končí za", "EMPTY": "Žádné nadcházející události.", "WEEK": "{weekNumber}. týden", - "WEEK_SHORT": "{weekNumber}T", "N": "S", "NNE": "SSV", diff --git a/translations/cv.json b/translations/cv.json index dc3b90a897..34fc4fc2b5 100644 --- a/translations/cv.json +++ b/translations/cv.json @@ -8,7 +8,6 @@ "RUNNING": "Хальхи", "EMPTY": "Пулас ӗҫ ҫук", "WEEK": "{weekNumber} эрне", - "WEEK_SHORT": "{weekNumber}Э", "N": "Ҫ", "NNE": "ҪҪТ", diff --git a/translations/cy.json b/translations/cy.json index 22dcd4ec55..531d811633 100644 --- a/translations/cy.json +++ b/translations/cy.json @@ -8,7 +8,6 @@ "RUNNING": "Gorffen mewn", "EMPTY": "Dim digwyddiadau.", "WEEK": "Wythnos {weekNumber}", - "WEEK_SHORT": "W{weekNumber}", "N": "Go", "NNE": "GoGoDw", diff --git a/translations/da.json b/translations/da.json index 01874e1710..ed32a142cd 100644 --- a/translations/da.json +++ b/translations/da.json @@ -9,7 +9,6 @@ "RUNNING": "Slutter om", "EMPTY": "Ingen kommende begivenheder.", "WEEK": "Uge {weekNumber}", - "WEEK_SHORT": "U{weekNumber}", "N": "N", "NNE": "NNØ", diff --git a/translations/el.json b/translations/el.json index 092710600a..dd8d007cdf 100644 --- a/translations/el.json +++ b/translations/el.json @@ -7,8 +7,6 @@ "TOMORROW": "Αύριο", "RUNNING": "Λήγει σε", "EMPTY": "Δεν υπάρχουν προσεχείς εκδηλώσεις.", - "WEEK": "Εβδομάδα {weekNumber}", - "WEEK_SHORT": "Ε{weekNumber}", "N": "B", "NNE": "BBA", diff --git a/translations/en.json b/translations/en.json index c4a2f196df..e10801e5b8 100644 --- a/translations/en.json +++ b/translations/en.json @@ -7,7 +7,6 @@ "RUNNING": "Ends in", "EMPTY": "No upcoming events.", "WEEK": "Week {weekNumber}", - "WEEK_SHORT": "W{weekNumber}", "N": "N", "NNE": "NNE", diff --git a/translations/eo.json b/translations/eo.json index b3bc6b7436..d4579b60b6 100644 --- a/translations/eo.json +++ b/translations/eo.json @@ -9,7 +9,6 @@ "RUNNING": "ankoraŭ", "EMPTY": "Neniu evento.", "WEEK": "{weekNumber}a kalendara semajno", - "WEEK_SHORT": "{weekNumber}S", "N": "N", "NNE": "NNOr", diff --git a/translations/es.json b/translations/es.json index 67be6ab952..454dcf404e 100644 --- a/translations/es.json +++ b/translations/es.json @@ -9,7 +9,6 @@ "RUNNING": "Termina en", "EMPTY": "No hay eventos programados.", "WEEK": "Semana {weekNumber}", - "WEEK_SHORT": "S{weekNumber}", "N": "N", "NNE": "NNE", diff --git a/translations/et.json b/translations/et.json index 0685847356..cd3d5ebe7a 100644 --- a/translations/et.json +++ b/translations/et.json @@ -9,7 +9,6 @@ "RUNNING": "Lõpeb", "EMPTY": "Eelolevaid sündmusi pole.", "WEEK": "Nädal {weekNumber}", - "WEEK_SHORT": "N{weekNumber}", "N": "Põhi", "NNE": "Põhjakirre", diff --git a/translations/fi.json b/translations/fi.json index fc7fc98978..87c0ef24a8 100644 --- a/translations/fi.json +++ b/translations/fi.json @@ -9,7 +9,6 @@ "RUNNING": "Päättyy {timeUntilEnd} päästä", "EMPTY": "Ei tulevia tapahtumia.", "WEEK": "Viikko {weekNumber}", - "WEEK_SHORT": "V{weekNumber}", "N": "P", "NNE": "PPI", diff --git a/translations/fr.json b/translations/fr.json index 226f454fcf..b7f9d02746 100644 --- a/translations/fr.json +++ b/translations/fr.json @@ -9,7 +9,6 @@ "RUNNING": "Se termine dans", "EMPTY": "Aucun RDV à venir.", "WEEK": "Semaine {weekNumber}", - "WEEK_SHORT": "S{weekNumber}", "N": "N", "NNE": "NNE", diff --git a/translations/fy.json b/translations/fy.json index 1d6f659922..ba1bc12c75 100644 --- a/translations/fy.json +++ b/translations/fy.json @@ -7,8 +7,6 @@ "DAYAFTERTOMORROW": "Oaremoarn", "RUNNING": "Einigest oer", "EMPTY": "Gjin plande ôfspraken.", - "WEEK": "Wike {weekNumber}", - "WEEK_SHORT": "W{weekNumber}", "N": "N", "NNE": "NNE", diff --git a/translations/gl.json b/translations/gl.json index e3bfdf8ecb..1de91d628f 100644 --- a/translations/gl.json +++ b/translations/gl.json @@ -9,7 +9,6 @@ "EMPTY": "Non hai próximos eventos.", "WEEK": "Semana {weekNumber}", - "WEEK_SHORT": "S{weekNumber}", "N": "N", "NNE": "NNE", diff --git a/translations/gu.json b/translations/gu.json index eeeb6bc481..015dc3d0bd 100644 --- a/translations/gu.json +++ b/translations/gu.json @@ -8,7 +8,6 @@ "RUNNING": "માં સમાપ્ત થાય છે", "EMPTY": "કોઈ આગામી કાર્યક્રમ નથી.", "WEEK": "સપ્તાહ {weekNumber}", - "WEEK_SHORT": "સ{weekNumber}", "N": "ઉ", "NNE": "ઉઉપુ", diff --git a/translations/he.json b/translations/he.json index b291626c76..1661c9cc3f 100644 --- a/translations/he.json +++ b/translations/he.json @@ -9,7 +9,6 @@ "RUNNING": "מסתיים ב", "EMPTY": "אין ארועים", "WEEK": "{weekNumber} שבוע", - "WEEK_SHORT": "{weekNumber}ש", "N": "צ", "NNE": "צ-צ-מז", diff --git a/translations/hi.json b/translations/hi.json index f4e87afb06..f93d2c25b8 100644 --- a/translations/hi.json +++ b/translations/hi.json @@ -9,7 +9,6 @@ "RUNNING": "में समाप्त", "EMPTY": "कोई आगामी कार्यक्रम नहीं।", "WEEK": "सप्ताह {weekNumber}", - "WEEK_SHORT": "स{weekNumber}", "N": "उ", "NNE": "उउपु", diff --git a/translations/hr.json b/translations/hr.json index 4f3e0cf629..27b835fd7d 100644 --- a/translations/hr.json +++ b/translations/hr.json @@ -9,7 +9,6 @@ "RUNNING": "Završava za", "EMPTY": "Nema nadolazećih događaja.", "WEEK": "Tjedan {weekNumber}", - "WEEK_SHORT": "T{weekNumber}", "N": "N", "NNE": "NNE", diff --git a/translations/hu.json b/translations/hu.json index 48cc33e1c9..7a8b3d7f76 100644 --- a/translations/hu.json +++ b/translations/hu.json @@ -7,7 +7,6 @@ "RUNNING": "Vége lesz", "EMPTY": "Nincs közelgő esemény.", "WEEK": "{weekNumber}. hét", - "WEEK_SHORT": "{weekNumber}H", "N": "É", "NNE": "ÉÉK", diff --git a/translations/id.json b/translations/id.json index bcdb651111..439d2151f8 100644 --- a/translations/id.json +++ b/translations/id.json @@ -7,8 +7,7 @@ "DAYAFTERTOMORROW": "Lusa", "RUNNING": "Berakhir dalam", "EMPTY": "Tidak ada agenda", - "WEEK": "Pekan {weekNumber}", - "WEEK_SHORT": "P{weekNumber}", + "WEEK": "Pekan", "N": "U", "NNE": "UTL", diff --git a/translations/is.json b/translations/is.json index 05012ef522..c4da887cf7 100644 --- a/translations/is.json +++ b/translations/is.json @@ -8,8 +8,6 @@ "DAYAFTERTOMORROW": "Ekki á morgun, heldur hinn", "RUNNING": "Endar eftir", "EMPTY": "Ekkert framundan.", - "WEEK": "Vika {weekNumber}", - "WEEK_SHORT": "V{weekNumber}", "N": "N", "NNE": "NNA", diff --git a/translations/it.json b/translations/it.json index 5983ffa6f0..79199f1a47 100644 --- a/translations/it.json +++ b/translations/it.json @@ -8,7 +8,6 @@ "RUNNING": "Termina entro", "EMPTY": "Nessun evento imminente.", "WEEK": "Settimana {weekNumber}", - "WEEK_SHORT": "S{weekNumber}", "N": "N", "NNE": "NNE", diff --git a/translations/ja.json b/translations/ja.json index ccfe15ef00..a59a82bfc9 100644 --- a/translations/ja.json +++ b/translations/ja.json @@ -7,8 +7,6 @@ "TOMORROW": "明日", "RUNNING": "で終わります", "EMPTY": "直近のイベントはありません", - "WEEK": "第{weekNumber}週", - "WEEK_SHORT": "{weekNumber}週", "N": "北", "NNE": "北北東", diff --git a/translations/ko.json b/translations/ko.json index 954a436ea4..7fc8432889 100644 --- a/translations/ko.json +++ b/translations/ko.json @@ -8,7 +8,6 @@ "RUNNING": "종료 일", "EMPTY": "예정된 이벤트가 없습니다.", "WEEK": "{weekNumber}주차", - "WEEK_SHORT": "{weekNumber}주", "N": "북풍", "NNE": "북북동풍", diff --git a/translations/lt.json b/translations/lt.json index dc2efaa1e2..dc7a23af1a 100644 --- a/translations/lt.json +++ b/translations/lt.json @@ -9,7 +9,6 @@ "RUNNING": "Pasibaigs už", "EMPTY": "Nėra artimų įvykių.", "WEEK": "{weekNumber} savaitė", - "WEEK_SHORT": "{weekNumber}S", "N": "Š", "NNE": "ŠŠR", diff --git a/translations/ms-my.json b/translations/ms-my.json index 205fb4a5bd..07d0bb996c 100644 --- a/translations/ms-my.json +++ b/translations/ms-my.json @@ -8,7 +8,6 @@ "RUNNING": "Berakhir dalam", "EMPTY": "Tidak ada agenda", "WEEK": "Minggu ke-{weekNumber}", - "WEEK_SHORT": "M{weekNumber}", "N": "U", "NNE": "UUT", diff --git a/translations/nb.json b/translations/nb.json index e83f14dfcc..669b2d265a 100644 --- a/translations/nb.json +++ b/translations/nb.json @@ -9,7 +9,6 @@ "RUNNING": "Slutter om", "EMPTY": "Ingen kommende arrangementer.", "WEEK": "Uke {weekNumber}", - "WEEK_SHORT": "U{weekNumber}", "N": "N", "NNE": "NNØ", diff --git a/translations/nl.json b/translations/nl.json index c9d35ff1a4..8e2fbb34eb 100644 --- a/translations/nl.json +++ b/translations/nl.json @@ -9,7 +9,6 @@ "RUNNING": "Eindigt over", "EMPTY": "Geen geplande afspraken.", "WEEK": "Week {weekNumber}", - "WEEK_SHORT": "W{weekNumber}", "N": "N", "NNE": "NNO", diff --git a/translations/nn.json b/translations/nn.json index 0eed034111..609d8fc646 100644 --- a/translations/nn.json +++ b/translations/nn.json @@ -8,8 +8,6 @@ "DAYAFTERTOMORROW": "I overmorgon", "RUNNING": "Sluttar om", "EMPTY": "Ingen komande hendingar.", - "WEEK": "Veke {weekNumber}", - "WEEK_SHORT": "V{weekNumber}", "N": "N", "NNE": "NNA", diff --git a/translations/pl.json b/translations/pl.json index d25e74780c..04fd0ca194 100644 --- a/translations/pl.json +++ b/translations/pl.json @@ -9,7 +9,6 @@ "RUNNING": "Koniec za", "EMPTY": "Brak wydarzeń.", "WEEK": "Tydzień {weekNumber}", - "WEEK_SHORT": "T{weekNumber}", "N": "N", "NNE": "NNE", diff --git a/translations/ps.json b/translations/ps.json index b44b360471..701c30e82a 100644 --- a/translations/ps.json +++ b/translations/ps.json @@ -9,7 +9,6 @@ "RUNNING": "روان", "EMPTY": "تش", "WEEK": "{weekNumber}. اونۍ", - "WEEK_SHORT": "{weekNumber}ا", "N": "N", "NNE": "NNO", diff --git a/translations/pt-br.json b/translations/pt-br.json index 75b8f6bced..4c1a49061a 100644 --- a/translations/pt-br.json +++ b/translations/pt-br.json @@ -7,8 +7,6 @@ "TOMORROW": "Amanhã", "RUNNING": "Acaba em", "EMPTY": "Nenhum evento novo.", - "WEEK": "Semana {weekNumber}", - "WEEK_SHORT": "S{weekNumber}", "N": "N", "NNE": "NNE", diff --git a/translations/pt.json b/translations/pt.json index 43098cee6a..2b1e1cf0ff 100644 --- a/translations/pt.json +++ b/translations/pt.json @@ -9,7 +9,6 @@ "RUNNING": "Termina em", "EMPTY": "Sem eventos programados.", "WEEK": "Semana {weekNumber}", - "WEEK_SHORT": "S{weekNumber}", "N": "N", "NNE": "NNE", diff --git a/translations/ro.json b/translations/ro.json index 0361a18158..ce04e337a2 100644 --- a/translations/ro.json +++ b/translations/ro.json @@ -9,7 +9,6 @@ "RUNNING": "Se termină în", "EMPTY": "Nici un eveniment.", "WEEK": "Săptămâna {weekNumber}", - "WEEK_SHORT": "S{weekNumber}", "N": "N", "NNE": "NNE", diff --git a/translations/ru.json b/translations/ru.json index 8ff6728bc1..eb4c2f77be 100644 --- a/translations/ru.json +++ b/translations/ru.json @@ -9,7 +9,6 @@ "RUNNING": "Заканчивается через", "EMPTY": "Нет предстоящих событий", "WEEK": "Неделя {weekNumber}", - "WEEK_SHORT": "Н{weekNumber}", "N": "С", "NNE": "ССВ", diff --git a/translations/sk.json b/translations/sk.json index f7300f9e76..ef1757b85b 100644 --- a/translations/sk.json +++ b/translations/sk.json @@ -9,7 +9,6 @@ "RUNNING": "Končí o", "EMPTY": "Žiadne nadchádzajúce udalosti.", "WEEK": "{weekNumber}. týždeň", - "WEEK_SHORT": "{weekNumber}T", "N": "S", "NNE": "SSV", diff --git a/translations/sv.json b/translations/sv.json index 1c48b3f168..0d37a1bba6 100644 --- a/translations/sv.json +++ b/translations/sv.json @@ -9,7 +9,6 @@ "RUNNING": "Slutar", "EMPTY": "Inga kommande händelser.", "WEEK": "Vecka {weekNumber}", - "WEEK_SHORT": "V{weekNumber}", "N": "N", "NNE": "NNO", diff --git a/translations/th.json b/translations/th.json index 995cfc606b..26f472b7b9 100644 --- a/translations/th.json +++ b/translations/th.json @@ -6,7 +6,6 @@ "RUNNING": "สิ้นสุดใน", "EMPTY": "ไม่มีกิจกรรมที่กำลังจะมาถึง", "WEEK": "สัปดาห์ที่ {weekNumber}", - "WEEK_SHORT": "ส{weekNumber}", "N": "น", "NNE": "น.ต.อ.น.", diff --git a/translations/tlh.json b/translations/tlh.json index d9aa4354cf..6bcefefa55 100644 --- a/translations/tlh.json +++ b/translations/tlh.json @@ -9,7 +9,6 @@ "RUNNING": "Dor", "EMPTY": "Sumbe' wanI'.", "WEEK": "Hogh (terran) {weekNumber}", - "WEEK_SHORT": "H{weekNumber}", "N": "N", "NNE": "NNE", diff --git a/translations/tr.json b/translations/tr.json index d25608809a..3c03f2954c 100644 --- a/translations/tr.json +++ b/translations/tr.json @@ -8,7 +8,6 @@ "RUNNING": "Biten", "EMPTY": "Yakında etkinlik yok.", "WEEK": "Hafta {weekNumber}", - "WEEK_SHORT": "H{weekNumber}", "N": "K", "NNE": "KKD", diff --git a/translations/uk.json b/translations/uk.json index abaf2a364a..3bb4284e0d 100644 --- a/translations/uk.json +++ b/translations/uk.json @@ -9,7 +9,6 @@ "RUNNING": "Закінчується через", "EMPTY": "Немає найближчих подій", "WEEK": "Тиждень {weekNumber}", - "WEEK_SHORT": "Т{weekNumber}", "N": "Пн", "NNE": "ПнПнСх", diff --git a/translations/zh-cn.json b/translations/zh-cn.json index 74036bbfae..f4ee2562f7 100644 --- a/translations/zh-cn.json +++ b/translations/zh-cn.json @@ -9,7 +9,6 @@ "RUNNING": "结束日期", "EMPTY": "无日程安排。", "WEEK": "第{weekNumber}周", - "WEEK_SHORT": "{weekNumber}周", "N": "北风", "NNE": "北偏东风", diff --git a/translations/zh-tw.json b/translations/zh-tw.json index 9c22344c57..6bdd95dcb5 100644 --- a/translations/zh-tw.json +++ b/translations/zh-tw.json @@ -9,7 +9,6 @@ "RUNNING": "結束日期", "EMPTY": "沒有更多的活動。", "WEEK": "第 {weekNumber} 週", - "WEEK_SHORT": "{weekNumber}週", "N": "北風", "NNE": "北偏東風", From 74bf35f0c8cf19f75bebf89f2d6e112463a09003 Mon Sep 17 00:00:00 2001 From: BugHaver <43462320+lsaadeh@users.noreply.github.com> Date: Sun, 11 May 2025 12:08:17 +1000 Subject: [PATCH 08/10] add translations --- translations/en.json | 1 + translations/es.json | 1 + 2 files changed, 2 insertions(+) diff --git a/translations/en.json b/translations/en.json index e10801e5b8..c4a2f196df 100644 --- a/translations/en.json +++ b/translations/en.json @@ -7,6 +7,7 @@ "RUNNING": "Ends in", "EMPTY": "No upcoming events.", "WEEK": "Week {weekNumber}", + "WEEK_SHORT": "W{weekNumber}", "N": "N", "NNE": "NNE", diff --git a/translations/es.json b/translations/es.json index 454dcf404e..67be6ab952 100644 --- a/translations/es.json +++ b/translations/es.json @@ -9,6 +9,7 @@ "RUNNING": "Termina en", "EMPTY": "No hay eventos programados.", "WEEK": "Semana {weekNumber}", + "WEEK_SHORT": "S{weekNumber}", "N": "N", "NNE": "NNE", From 3c8863901945de01ac2ae27b44484948c9e15e35 Mon Sep 17 00:00:00 2001 From: Louis Saadeh Date: Sun, 11 May 2025 16:39:16 +1000 Subject: [PATCH 09/10] add de tests --- .../modules/clock/de/clock_showWeek.js | 21 +++++++++++++ .../modules/clock/de/clock_showWeek_short.js | 21 +++++++++++++ tests/e2e/modules/clock_de_spec.js | 31 +++++++++++++++++++ 3 files changed, 73 insertions(+) create mode 100644 tests/configs/modules/clock/de/clock_showWeek.js create mode 100644 tests/configs/modules/clock/de/clock_showWeek_short.js create mode 100644 tests/e2e/modules/clock_de_spec.js diff --git a/tests/configs/modules/clock/de/clock_showWeek.js b/tests/configs/modules/clock/de/clock_showWeek.js new file mode 100644 index 0000000000..3adf26556a --- /dev/null +++ b/tests/configs/modules/clock/de/clock_showWeek.js @@ -0,0 +1,21 @@ +let config = { + address: "0.0.0.0", + ipWhitelist: [], + language: "de", + timeFormat: 12, + + modules: [ + { + module: "clock", + position: "middle_center", + config: { + showWeek: true + } + } + ] +}; + +/*************** DO NOT EDIT THE LINE BELOW ***************/ +if (typeof module !== "undefined") { + module.exports = config; +} diff --git a/tests/configs/modules/clock/de/clock_showWeek_short.js b/tests/configs/modules/clock/de/clock_showWeek_short.js new file mode 100644 index 0000000000..bdbdca7258 --- /dev/null +++ b/tests/configs/modules/clock/de/clock_showWeek_short.js @@ -0,0 +1,21 @@ +let config = { + address: "0.0.0.0", + ipWhitelist: [], + language: "de", + timeFormat: 12, + + modules: [ + { + module: "clock", + position: "middle_center", + config: { + showWeek: "short" + } + } + ] +}; + +/*************** DO NOT EDIT THE LINE BELOW ***************/ +if (typeof module !== "undefined") { + module.exports = config; +} diff --git a/tests/e2e/modules/clock_de_spec.js b/tests/e2e/modules/clock_de_spec.js new file mode 100644 index 0000000000..e46b37abbc --- /dev/null +++ b/tests/e2e/modules/clock_de_spec.js @@ -0,0 +1,31 @@ +const helpers = require("../helpers/global-setup"); + +describe("Clock set to german language module", () => { + afterAll(async () => { + await helpers.stopApplication(); + }); + + describe("with showWeek config enabled", () => { + beforeAll(async () => { + await helpers.startApplication("tests/configs/modules/clock/de/clock_showWeek.js"); + await helpers.getDocument(); + }); + + it("shows week with correct format", async () => { + const weekRegex = /^[0-9]{1,2}. Kalenderwoche$/; + await expect(helpers.testMatch(".clock .week", weekRegex)).resolves.toBe(true); + }); + }); + + describe("with showWeek short config enabled", () => { + beforeAll(async () => { + await helpers.startApplication("tests/configs/modules/clock/de/clock_showWeek_short.js"); + await helpers.getDocument(); + }); + + it("shows week with correct format", async () => { + const weekRegex = /^[0-9]{1,2}KW$/; + await expect(helpers.testMatch(".clock .week", weekRegex)).resolves.toBe(true); + }); + }); +}); From 0ee067c65cac644d934fc0c6e58d844199a8d1f3 Mon Sep 17 00:00:00 2001 From: BugHaver <43462320+lsaadeh@users.noreply.github.com> Date: Mon, 12 May 2025 09:43:19 +1000 Subject: [PATCH 10/10] Update fr.json --- translations/fr.json | 1 + 1 file changed, 1 insertion(+) diff --git a/translations/fr.json b/translations/fr.json index b7f9d02746..226f454fcf 100644 --- a/translations/fr.json +++ b/translations/fr.json @@ -9,6 +9,7 @@ "RUNNING": "Se termine dans", "EMPTY": "Aucun RDV à venir.", "WEEK": "Semaine {weekNumber}", + "WEEK_SHORT": "S{weekNumber}", "N": "N", "NNE": "NNE",