From f01e7b7e204de2f9a78c7c793bccfb543b719cc1 Mon Sep 17 00:00:00 2001 From: Michael Teeuw Date: Wed, 4 Jul 2018 11:32:04 +0200 Subject: [PATCH 01/21] Prepare for 2.5.0 --- CHANGELOG.md | 9 +++++++++ package-lock.json | 2 +- package.json | 2 +- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3c242e50..b0090f5f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,15 @@ All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/). --- +## [2.5.0] - Unreleased + +*This release is scheduled to be released on 2018-10-01.* + +### Added + +### Fixed + +### Updated ## [2.4.1] - 2018-07-04 diff --git a/package-lock.json b/package-lock.json index 6241a3d6..3376a2e3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "magicmirror", - "version": "2.4.1", + "version": "2.5.0-dev", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index b220bee6..2aae05eb 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "magicmirror", - "version": "2.4.1", + "version": "2.5.0-dev", "description": "The open source modular smart mirror platform.", "main": "js/electron.js", "scripts": { From d12509957f754ad9977afc8027a2e0676c9fa5c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20Cederstr=C3=B6m?= Date: Sat, 7 Jul 2018 16:35:07 +0200 Subject: [PATCH 02/21] Abillity to toggle article in fullscreen --- modules/default/newsfeed/README.md | 1 + modules/default/newsfeed/newsfeed.js | 34 ++++++++++++++++++---------- 2 files changed, 23 insertions(+), 12 deletions(-) diff --git a/modules/default/newsfeed/README.md b/modules/default/newsfeed/README.md index 6c559578..f4888ebb 100644 --- a/modules/default/newsfeed/README.md +++ b/modules/default/newsfeed/README.md @@ -41,6 +41,7 @@ MagicMirror's [notification mechanism](https://github.com/MichMich/MagicMirror/t | `ARTICLE_PREVIOUS` | Shows the previous news title (hiding the summary or previously fully displayed article) | `ARTICLE_MORE_DETAILS` | When received the _first time_, shows the corresponding description of the currently displayed news title.
The module expects that the module's configuration option `showDescription` is set to `false` (default value).

When received a _second consecutive time_, shows the full news article in an IFRAME.
This requires that the news page can be embedded in an IFRAME, e.g. doesn't have the HTTP response header [X-Frame-Options](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Frame-Options) set to e.g. `DENY`.

When received the _next consecutive times_, reloads the page and scrolls down by `scrollLength` pixels to paginate through the article. | `ARTICLE_LESS_DETAILS` | Hides the summary or full news article and only displays the news title of the currently viewed news item. +| `ARTICLE_TOGGLE_FULL` | Toogles article in fullscreen. Note the payload of the sent notification event is ignored. diff --git a/modules/default/newsfeed/newsfeed.js b/modules/default/newsfeed/newsfeed.js index 60562248..1d141b95 100644 --- a/modules/default/newsfeed/newsfeed.js +++ b/modules/default/newsfeed/newsfeed.js @@ -366,19 +366,8 @@ Module.register("newsfeed",{ Log.info(this.name + " - scrolling down"); Log.info(this.name + " - ARTICLE_MORE_DETAILS, scroll position: " + this.config.scrollLength); } - // display full article else { - this.isShowingDescription = !this.isShowingDescription; - this.config.showFullArticle = !this.isShowingDescription; - // make bottom bar align to top to allow scrolling - if(this.config.showFullArticle == true){ - document.getElementsByClassName("region bottom bar")[0].style.bottom = "inherit"; - document.getElementsByClassName("region bottom bar")[0].style.top = "-90px"; - } - clearInterval(timer); - timer = null; - Log.info(this.name + " - showing " + this.isShowingDescription ? "article description" : "full article"); - this.updateDom(100); + this.showFullArticle(); } } else if(notification == "ARTICLE_SCROLL_UP"){ if(this.config.showFullArticle == true){ @@ -391,9 +380,30 @@ Module.register("newsfeed",{ this.resetDescrOrFullArticleAndTimer(); Log.info(this.name + " - showing only article titles again"); this.updateDom(100); + } else if (notification == "ARTICLE_TOGGLE_FULL"){ + if (this.config.showFullArticle){ + this.activeItem++; + this.resetDescrOrFullArticleAndTimer(); + } else { + this.showFullArticle(); + } } else { Log.info(this.name + " - unknown notification, ignoring: " + notification); } }, + showFullArticle: function() { + this.isShowingDescription = !this.isShowingDescription; + this.config.showFullArticle = !this.isShowingDescription; + // make bottom bar align to top to allow scrolling + if(this.config.showFullArticle == true){ + document.getElementsByClassName("region bottom bar")[0].style.bottom = "inherit"; + document.getElementsByClassName("region bottom bar")[0].style.top = "-90px"; + } + clearInterval(timer); + timer = null; + Log.info(this.name + " - showing " + this.isShowingDescription ? "article description" : "full article"); + this.updateDom(100); + } + }); From b5a7234cf31e7d8a1825f752203112bd580b1176 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20Cederstr=C3=B6m?= Date: Sat, 7 Jul 2018 17:26:17 +0200 Subject: [PATCH 03/21] Swedish translation for "FEELS" --- translations/sv.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/translations/sv.json b/translations/sv.json index 07ca0aa1..a8a5c4ea 100644 --- a/translations/sv.json +++ b/translations/sv.json @@ -28,5 +28,7 @@ "UPDATE_NOTIFICATION": "MagicMirror² uppdatering finns tillgänglig.", "UPDATE_NOTIFICATION_MODULE": "Uppdatering finns tillgänglig av {MODULE_NAME} modulen.", - "UPDATE_INFO": "Denna installation ligger {COMMIT_COUNT} steg bakom {BRANCH_NAME} grenen." + "UPDATE_INFO": "Denna installation ligger {COMMIT_COUNT} steg bakom {BRANCH_NAME} grenen.", + + "FEELS": "Känns som" } From 44e691e840d038a60dd6fbd050f2ade2d83a0139 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20Cederstr=C3=B6m?= Date: Sat, 7 Jul 2018 17:35:04 +0200 Subject: [PATCH 04/21] Update CHANGELOG.md --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index b0090f5f..85d725b2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,8 @@ This project adheres to [Semantic Versioning](http://semver.org/). ### Added +- Support for toggling news article in fullscreen + ### Fixed ### Updated From e87c2350b752caa0b47d1d974cc945ac4756ba11 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20Cederstr=C3=B6m?= Date: Sat, 7 Jul 2018 17:36:51 +0200 Subject: [PATCH 05/21] Update CHANGELOG.md --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index b0090f5f..5d71bbf3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,8 @@ This project adheres to [Semantic Versioning](http://semver.org/). ### Updated +- Swedish translations + ## [2.4.1] - 2018-07-04 ### Fixed From 08fa511d170a79c9744271fc589b6c8d33e7bf13 Mon Sep 17 00:00:00 2001 From: Teddy Payet Date: Tue, 10 Jul 2018 15:03:54 +0200 Subject: [PATCH 06/21] Add some translations (mostly french). --- CHANGELOG.md | 3 +- modules/default/alert/translations/fr.json | 4 +++ modules/default/newsfeed/newsfeed.js | 32 +++++++++---------- modules/default/newsfeed/translations/de.json | 3 ++ modules/default/newsfeed/translations/en.json | 3 ++ modules/default/newsfeed/translations/es.json | 3 ++ modules/default/newsfeed/translations/fr.json | 3 ++ translations/fr.json | 8 +++-- 8 files changed, 39 insertions(+), 20 deletions(-) create mode 100644 modules/default/alert/translations/fr.json create mode 100644 modules/default/newsfeed/translations/de.json create mode 100644 modules/default/newsfeed/translations/en.json create mode 100644 modules/default/newsfeed/translations/es.json create mode 100644 modules/default/newsfeed/translations/fr.json diff --git a/CHANGELOG.md b/CHANGELOG.md index 850ebce7..714260a2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,7 +9,8 @@ This project adheres to [Semantic Versioning](http://semver.org/). *This release is scheduled to be released on 2018-10-01.* ### Added - +- French translate for "Feels" +- Translations for newsfeed module - Support for toggling news article in fullscreen ### Fixed diff --git a/modules/default/alert/translations/fr.json b/modules/default/alert/translations/fr.json new file mode 100644 index 00000000..c89417f2 --- /dev/null +++ b/modules/default/alert/translations/fr.json @@ -0,0 +1,4 @@ +{ + "sysTitle": "MagicMirror Notification", + "welcome": "Bienvenue, le démarrage a été un succès!" +} diff --git a/modules/default/newsfeed/newsfeed.js b/modules/default/newsfeed/newsfeed.js index 1d141b95..26c3cfdc 100644 --- a/modules/default/newsfeed/newsfeed.js +++ b/modules/default/newsfeed/newsfeed.js @@ -90,7 +90,7 @@ Module.register("newsfeed",{ if (this.config.feedUrl) { wrapper.className = "small bright"; - wrapper.innerHTML = "The configuration options for the newsfeed module have changed.
Please check the documentation."; + wrapper.innerHTML = this.translate("configuration_changed"); return wrapper; } @@ -123,21 +123,21 @@ Module.register("newsfeed",{ //Remove selected tags from the beginning of rss feed items (title or description) - if (this.config.removeStartTags == "title" || this.config.removeStartTags == "both") { + if (this.config.removeStartTags === "title" || this.config.removeStartTags === "both") { for (f=0; f= this.newsItems.length) { @@ -347,7 +347,7 @@ Module.register("newsfeed",{ this.resetDescrOrFullArticleAndTimer(); Log.info(this.name + " - going from article #" + before + " to #" + this.activeItem + " (of " + this.newsItems.length + ")"); this.updateDom(100); - } else if(notification == "ARTICLE_PREVIOUS"){ + } else if(notification === "ARTICLE_PREVIOUS"){ var before = this.activeItem; this.activeItem--; if (this.activeItem < 0) { @@ -358,9 +358,9 @@ Module.register("newsfeed",{ this.updateDom(100); } // if "more details" is received the first time: show article summary, on second time show full article - else if(notification == "ARTICLE_MORE_DETAILS"){ + else if(notification === "ARTICLE_MORE_DETAILS"){ // full article is already showing, so scrolling down - if(this.config.showFullArticle == true){ + if(this.config.showFullArticle === true){ this.scrollPosition += this.config.scrollLength; window.scrollTo(0, this.scrollPosition); Log.info(this.name + " - scrolling down"); @@ -369,18 +369,18 @@ Module.register("newsfeed",{ else { this.showFullArticle(); } - } else if(notification == "ARTICLE_SCROLL_UP"){ - if(this.config.showFullArticle == true){ + } else if(notification === "ARTICLE_SCROLL_UP"){ + if(this.config.showFullArticle === true){ this.scrollPosition -= this.config.scrollLength; window.scrollTo(0, this.scrollPosition); Log.info(this.name + " - scrolling up"); Log.info(this.name + " - ARTICLE_SCROLL_UP, scroll position: " + this.config.scrollLength); } - } else if(notification == "ARTICLE_LESS_DETAILS"){ + } else if(notification === "ARTICLE_LESS_DETAILS"){ this.resetDescrOrFullArticleAndTimer(); Log.info(this.name + " - showing only article titles again"); this.updateDom(100); - } else if (notification == "ARTICLE_TOGGLE_FULL"){ + } else if (notification === "ARTICLE_TOGGLE_FULL"){ if (this.config.showFullArticle){ this.activeItem++; this.resetDescrOrFullArticleAndTimer(); @@ -396,7 +396,7 @@ Module.register("newsfeed",{ this.isShowingDescription = !this.isShowingDescription; this.config.showFullArticle = !this.isShowingDescription; // make bottom bar align to top to allow scrolling - if(this.config.showFullArticle == true){ + if(this.config.showFullArticle === true){ document.getElementsByClassName("region bottom bar")[0].style.bottom = "inherit"; document.getElementsByClassName("region bottom bar")[0].style.top = "-90px"; } diff --git a/modules/default/newsfeed/translations/de.json b/modules/default/newsfeed/translations/de.json new file mode 100644 index 00000000..6143f68c --- /dev/null +++ b/modules/default/newsfeed/translations/de.json @@ -0,0 +1,3 @@ +{ + "configuration_changed": "Las opciones de configuración para el módulo de suministro de noticias han cambiado. \nVerifique la documentación." +} \ No newline at end of file diff --git a/modules/default/newsfeed/translations/en.json b/modules/default/newsfeed/translations/en.json new file mode 100644 index 00000000..23b6100d --- /dev/null +++ b/modules/default/newsfeed/translations/en.json @@ -0,0 +1,3 @@ +{ + "configuration_changed": "The configuration options for the newsfeed module have changed.\nPlease check the documentation." +} \ No newline at end of file diff --git a/modules/default/newsfeed/translations/es.json b/modules/default/newsfeed/translations/es.json new file mode 100644 index 00000000..9ec3ef7b --- /dev/null +++ b/modules/default/newsfeed/translations/es.json @@ -0,0 +1,3 @@ +{ + "configuration_changed": "Die Konfigurationsoptionen für das Newsfeed-Modul haben sich geändert. \nBitte überprüfen Sie die Dokumentation." +} \ No newline at end of file diff --git a/modules/default/newsfeed/translations/fr.json b/modules/default/newsfeed/translations/fr.json new file mode 100644 index 00000000..85c6b412 --- /dev/null +++ b/modules/default/newsfeed/translations/fr.json @@ -0,0 +1,3 @@ +{ + "configuration_changed": "Les options de configuration du module newsfeed ont changé. \nVeuillez consulter la documentation." +} \ No newline at end of file diff --git a/translations/fr.json b/translations/fr.json index 1f7f9f86..65195b8e 100644 --- a/translations/fr.json +++ b/translations/fr.json @@ -6,7 +6,7 @@ "DAYAFTERTOMORROW": "Après-demain", "RUNNING": "Se termine dans", "EMPTY": "Aucun RDV à venir.", - + "WEEK": "Semaine {weekNumber}", "N": "N", @@ -25,8 +25,10 @@ "WNW": "ONO", "NW": "NO", "NNW": "NNO", - + "UPDATE_NOTIFICATION": "Une mise à jour de MagicMirror² est disponible", "UPDATE_NOTIFICATION_MODULE": "Une mise à jour est disponible pour le module {MODULE_NAME} .", -"UPDATE_INFO": "L'installation actuelle est {COMMIT_COUNT} en retard sur la branche {BRANCH_NAME} ." + "UPDATE_INFO": "L'installation actuelle est {COMMIT_COUNT} en retard sur la branche {BRANCH_NAME} .", + + "FEELS": "Ressenti" } From 4aa3353a1d03a3caf740fb1e156929c8917fadfd Mon Sep 17 00:00:00 2001 From: Teddy Payet Date: Wed, 11 Jul 2018 01:45:16 +0200 Subject: [PATCH 07/21] =?UTF-8?q?Wrong=20mixup=E2=80=A6=20(cf=20german=20a?= =?UTF-8?q?nd=20spanish)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Thanks fewieden. --- modules/default/newsfeed/translations/de.json | 2 +- modules/default/newsfeed/translations/es.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/default/newsfeed/translations/de.json b/modules/default/newsfeed/translations/de.json index 6143f68c..9ec3ef7b 100644 --- a/modules/default/newsfeed/translations/de.json +++ b/modules/default/newsfeed/translations/de.json @@ -1,3 +1,3 @@ { - "configuration_changed": "Las opciones de configuración para el módulo de suministro de noticias han cambiado. \nVerifique la documentación." + "configuration_changed": "Die Konfigurationsoptionen für das Newsfeed-Modul haben sich geändert. \nBitte überprüfen Sie die Dokumentation." } \ No newline at end of file diff --git a/modules/default/newsfeed/translations/es.json b/modules/default/newsfeed/translations/es.json index 9ec3ef7b..6143f68c 100644 --- a/modules/default/newsfeed/translations/es.json +++ b/modules/default/newsfeed/translations/es.json @@ -1,3 +1,3 @@ { - "configuration_changed": "Die Konfigurationsoptionen für das Newsfeed-Modul haben sich geändert. \nBitte überprüfen Sie die Dokumentation." + "configuration_changed": "Las opciones de configuración para el módulo de suministro de noticias han cambiado. \nVerifique la documentación." } \ No newline at end of file From 3350bf1ac652f05d7c1240e0656cc2036b9fa7e7 Mon Sep 17 00:00:00 2001 From: Teddy Payet Date: Wed, 11 Jul 2018 01:52:29 +0200 Subject: [PATCH 08/21] CHANGELOG --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 714260a2..e266cd9b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ This project adheres to [Semantic Versioning](http://semver.org/). - Support for toggling news article in fullscreen ### Fixed +- Mixup between german and spanish translation for newsfeed. ### Updated From 717c6555cb5ae13516ee1f3fb1c90c08a50b729d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gy=C3=B6rgy=20Bal=C3=A1ssy?= Date: Fri, 13 Jul 2018 16:23:34 +0200 Subject: [PATCH 09/21] ADDED: Missing Hungarian localization for the "WEEK" resource key. --- translations/hu.json | 2 ++ 1 file changed, 2 insertions(+) diff --git a/translations/hu.json b/translations/hu.json index 6c0a1a28..78c69859 100644 --- a/translations/hu.json +++ b/translations/hu.json @@ -7,6 +7,8 @@ "RUNNING": "Vége lesz", "EMPTY": "Nincs közelgő esemény.", + "WEEK": "{weekNumber}. hét", + "N": "É", "NNE": "ÉÉK", "NE": "ÉK", From db21ced10498a7d2e2515527f7a6cbf59d73825f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gy=C3=B6rgy=20Bal=C3=A1ssy?= Date: Fri, 13 Jul 2018 16:26:15 +0200 Subject: [PATCH 10/21] ADDED: Missing Hungarian localization for the "FEELS" resource key. --- translations/hu.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/translations/hu.json b/translations/hu.json index 78c69859..6b1b9067 100644 --- a/translations/hu.json +++ b/translations/hu.json @@ -28,5 +28,7 @@ "UPDATE_NOTIFICATION": "MagicMirror² elérhető egy frissítés!", "UPDATE_NOTIFICATION_MODULE": "A frissítés {MODULE_NAME} modul néven érhető el.", - "UPDATE_INFO": "A jelenlegi telepítés {COMMIT_COUNT} mögött {BRANCH_NAME} ágon található." + "UPDATE_INFO": "A jelenlegi telepítés {COMMIT_COUNT} mögött {BRANCH_NAME} ágon található.", + + "FEELS": "Érzet" } From 80bd32382fb7c8c839a0a6d67fc07a66096a3c50 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gy=C3=B6rgy=20Bal=C3=A1ssy?= Date: Fri, 13 Jul 2018 16:32:32 +0200 Subject: [PATCH 11/21] CHANGED: The Hungarian localization of the updatenotification module is changed to be more natural, because the existing messages felt like they were created with machine translation, and they were not only unnatural, but also misleading. --- translations/hu.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/translations/hu.json b/translations/hu.json index 6b1b9067..b483ecd9 100644 --- a/translations/hu.json +++ b/translations/hu.json @@ -26,9 +26,9 @@ "NW": "ÉNy", "NNW": "ÉÉNy", - "UPDATE_NOTIFICATION": "MagicMirror² elérhető egy frissítés!", - "UPDATE_NOTIFICATION_MODULE": "A frissítés {MODULE_NAME} modul néven érhető el.", - "UPDATE_INFO": "A jelenlegi telepítés {COMMIT_COUNT} mögött {BRANCH_NAME} ágon található.", + "UPDATE_NOTIFICATION": "MagicMirror²-hoz frissítés érhető el.", + "UPDATE_NOTIFICATION_MODULE": "A {MODULE_NAME} modulhoz frissítés érhető el.", + "UPDATE_INFO": "A jelenlegi telepítés óta {COMMIT_COUNT} commit jelent meg a {BRANCH_NAME} ágon.", "FEELS": "Érzet" } From a7278f76a8c8c92dfbba44481ce40c0db78de912 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gy=C3=B6rgy=20Bal=C3=A1ssy?= Date: Fri, 13 Jul 2018 16:42:47 +0200 Subject: [PATCH 12/21] UPDATED: The CHANGELOG.md file with description of the changes in the Hungarian localization. --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index e266cd9b..0c9c90df 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ This project adheres to [Semantic Versioning](http://semver.org/). - French translate for "Feels" - Translations for newsfeed module - Support for toggling news article in fullscreen +- Hungarian translation for "Feels" and "Week" ### Fixed - Mixup between german and spanish translation for newsfeed. @@ -19,6 +20,7 @@ This project adheres to [Semantic Versioning](http://semver.org/). ### Updated - Swedish translations +- Hungarian translations for the updatenotification module ## [2.4.1] - 2018-07-04 From e6edf85fbe82ea09643ca8b52d726ddb7fc86842 Mon Sep 17 00:00:00 2001 From: jagoba Date: Sun, 15 Jul 2018 19:13:04 +0200 Subject: [PATCH 13/21] Added Spanish translation for "FEELS" --- CHANGELOG.md | 1 + translations/es.json | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0c9c90df..e7079571 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ This project adheres to [Semantic Versioning](http://semver.org/). - Translations for newsfeed module - Support for toggling news article in fullscreen - Hungarian translation for "Feels" and "Week" +- Spanish translation for "Feels" ### Fixed - Mixup between german and spanish translation for newsfeed. diff --git a/translations/es.json b/translations/es.json index 44d08c2c..c2420494 100644 --- a/translations/es.json +++ b/translations/es.json @@ -28,5 +28,7 @@ "UPDATE_NOTIFICATION": "MagicMirror² actualización disponible.", "UPDATE_NOTIFICATION_MODULE": "Disponible una actualización para el módulo {MODULE_NAME}.", - "UPDATE_INFO": "Tu actual instalación está {COMMIT_COUNT} cambios detrás de la rama {BRANCH_NAME}." + "UPDATE_INFO": "Tu actual instalación está {COMMIT_COUNT} cambios detrás de la rama {BRANCH_NAME}.", + + "FEELS": "Sensación térmica de" } From 81432b54a344e8fdc73b5c6f948b005f9e8c45d4 Mon Sep 17 00:00:00 2001 From: Teddy Payet Date: Wed, 1 Aug 2018 09:37:27 +0200 Subject: [PATCH 14/21] Classes for alert module Use of classes instead of inline style. With those modifications, it will be easier to personnalize the alert with custom.css --- modules/default/alert/alert.js | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/modules/default/alert/alert.js b/modules/default/alert/alert.js index 85d6ef42..cc0ae302 100644 --- a/modules/default/alert/alert.js +++ b/modules/default/alert/alert.js @@ -38,13 +38,13 @@ Module.register("alert",{ if (this.config.effect == "slide") {this.config.effect = this.config.effect + "-" + this.config.position;} msg = ""; if (message.title) { - msg += "" + message.title + ""; + msg += "" + message.title + ""; } if (message.message){ if (msg != ""){ msg+= "
"; } - msg += "" + message.message + ""; + msg += "" + message.message + ""; } new NotificationFx({ @@ -63,9 +63,9 @@ Module.register("alert",{ params.imageUrl = null; image = ""; } else if (typeof params.imageFA === "undefined"){ - image = "
"; + image = "
"; } else if (typeof params.imageUrl === "undefined"){ - image = "
"; + image = "
"; } //Create overlay var overlay = document.createElement("div"); @@ -79,16 +79,16 @@ Module.register("alert",{ } //Display title and message only if they are provided in notification parameters - message =""; + var message = ""; if (params.title) { - message += "" + params.title + "" + message += "" + params.title + ""; } if (params.message) { - if (message != ""){ + if (message !== ""){ message += "
"; } - message += "" + params.message + ""; + message += "" + params.message + ""; } //Store alert in this.alerts @@ -121,16 +121,16 @@ Module.register("alert",{ setPosition: function(pos) { //Add css to body depending on the set position for notifications var sheet = document.createElement("style"); - if (pos == "center") {sheet.innerHTML = ".ns-box {margin-left: auto; margin-right: auto;text-align: center;}";} - if (pos == "right") {sheet.innerHTML = ".ns-box {margin-left: auto;text-align: right;}";} - if (pos == "left") {sheet.innerHTML = ".ns-box {margin-right: auto;text-align: left;}";} + if (pos === "center") {sheet.innerHTML = ".ns-box {margin-left: auto; margin-right: auto;text-align: center;}";} + if (pos === "right") {sheet.innerHTML = ".ns-box {margin-left: auto;text-align: right;}";} + if (pos === "left") {sheet.innerHTML = ".ns-box {margin-right: auto;text-align: left;}";} document.body.appendChild(sheet); }, notificationReceived: function(notification, payload, sender) { if (notification === "SHOW_ALERT") { if (typeof payload.type === "undefined") { payload.type = "alert"; } - if (payload.type == "alert") { + if (payload.type === "alert") { this.show_alert(payload, sender); } else if (payload.type = "notification") { this.show_notification(payload); @@ -143,7 +143,7 @@ Module.register("alert",{ this.alerts = {}; this.setPosition(this.config.position); if (this.config.welcome_message) { - if (this.config.welcome_message == true){ + if (this.config.welcome_message === true){ this.show_notification({title: this.translate("sysTitle"), message: this.translate("welcome")}); } else{ From 4a07272d7afd82a326f88bda9dfb687bbe1b28af Mon Sep 17 00:00:00 2001 From: Teddy Payet Date: Wed, 1 Aug 2018 09:42:23 +0200 Subject: [PATCH 15/21] Changelog.md updated --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index e7079571..4b8c087c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ This project adheres to [Semantic Versioning](http://semver.org/). - Support for toggling news article in fullscreen - Hungarian translation for "Feels" and "Week" - Spanish translation for "Feels" +- Add classes instead of inline style to the message from the module Alert ### Fixed - Mixup between german and spanish translation for newsfeed. From ae86b75d89fa54692ac307c55597ef0080e9bfbf Mon Sep 17 00:00:00 2001 From: heskja Date: Fri, 3 Aug 2018 20:22:44 +0200 Subject: [PATCH 16/21] Update nb.json Added translation for "FEELS" --- translations/nb.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/translations/nb.json b/translations/nb.json index 0a0595ac..30f271c6 100644 --- a/translations/nb.json +++ b/translations/nb.json @@ -28,5 +28,7 @@ "UPDATE_NOTIFICATION": "MagicMirror²-oppdatering er tilgjengelig.", "UPDATE_NOTIFICATION_MODULE": "Oppdatering tilgjengelig for modulen {MODULE_NAME}.", - "UPDATE_INFO": "Nåværende installasjon er {COMMIT_COUNT} bak {BRANCH_NAME} grenen." + "UPDATE_INFO": "Nåværende installasjon er {COMMIT_COUNT} bak {BRANCH_NAME} grenen.", + + "FEELS": "Føles som" } From 20a9ac841df51eec1723de298d7953fbb1801c5a Mon Sep 17 00:00:00 2001 From: heskja Date: Fri, 3 Aug 2018 20:23:19 +0200 Subject: [PATCH 17/21] Update nn.json Added translation for "FEELS" --- translations/nn.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/translations/nn.json b/translations/nn.json index 3c33c597..5e321fea 100644 --- a/translations/nn.json +++ b/translations/nn.json @@ -26,5 +26,7 @@ "UPDATE_NOTIFICATION": "MagicMirror² oppdatering er tilgjengeleg.", "UPDATE_NOTIFICATION_MODULE": "Oppdatering tilgjengeleg for modulen {MODULE_NAME}.", - "UPDATE_INFO": "noverande installasjon er {COMMIT_COUNT} bak {BRANCH_NAME} greinen." + "UPDATE_INFO": "noverande installasjon er {COMMIT_COUNT} bak {BRANCH_NAME} greinen.", + + "FEELS": "Kjenst som" } From c9577bcdc50d7d62090fdd54ac169a69309acaaa Mon Sep 17 00:00:00 2001 From: Janne Kalliola Date: Sun, 5 Aug 2018 19:47:27 +0300 Subject: [PATCH 18/21] Added an if to use absolute dates with all events --- modules/default/calendar/calendar.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/modules/default/calendar/calendar.js b/modules/default/calendar/calendar.js index 0780fb5c..7a4c2206 100755 --- a/modules/default/calendar/calendar.js +++ b/modules/default/calendar/calendar.js @@ -295,8 +295,12 @@ Module.register("calendar", { // If event is within 6 hour, display 'in xxx' time format or moment.fromNow() timeWrapper.innerHTML = this.capFirst(moment(event.startDate, "x").fromNow()); } else { - // Otherwise just say 'Today/Tomorrow at such-n-such time' - timeWrapper.innerHTML = this.capFirst(moment(event.startDate, "x").calendar()); + if(this.config.timeFormat === "absolute") { + timeWrapper.innerHTML = this.capFirst(moment(event.startDate, "x").format(this.config.dateFormat)); + } else { + // Otherwise just say 'Today/Tomorrow at such-n-such time' + timeWrapper.innerHTML = this.capFirst(moment(event.startDate, "x").calendar()); + } } } else { /* Check to see if the user displays absolute or relative dates with their events From 7c5e8a66e4269561d28b5d0dcf48495c23876edb Mon Sep 17 00:00:00 2001 From: Janne Kalliola Date: Sun, 5 Aug 2018 19:49:26 +0300 Subject: [PATCH 19/21] Added also description of the change to changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4b8c087c..67237d0c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,7 @@ This project adheres to [Semantic Versioning](http://semver.org/). ### Fixed - Mixup between german and spanish translation for newsfeed. +- Fixed close dates to be absolute, if no configured in the config.js - module Calendar ### Updated From 6598ae080fe06e01f110cad0d45429ec7c3c7e42 Mon Sep 17 00:00:00 2001 From: vincep5 Date: Tue, 7 Aug 2018 11:48:10 -0500 Subject: [PATCH 20/21] weatherforecast rainfall rounding --- CHANGELOG.md | 1 + modules/default/weatherforecast/weatherforecast.js | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4b8c087c..5c6953d8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,7 @@ This project adheres to [Semantic Versioning](http://semver.org/). - Hungarian translation for "Feels" and "Week" - Spanish translation for "Feels" - Add classes instead of inline style to the message from the module Alert +- Fix for weatherforecast rainfall rounding [#1374](https://github.com/MichMich/MagicMirror/issues/1374) ### Fixed - Mixup between german and spanish translation for newsfeed. diff --git a/modules/default/weatherforecast/weatherforecast.js b/modules/default/weatherforecast/weatherforecast.js index c06f5f5b..19e004ff 100644 --- a/modules/default/weatherforecast/weatherforecast.js +++ b/modules/default/weatherforecast/weatherforecast.js @@ -177,7 +177,7 @@ Module.register("weatherforecast",{ rainCell.innerHTML = ""; } else { if(config.units !== "imperial") { - rainCell.innerHTML = forecast.rain + " mm"; + rainCell.innerHTML = parseFloat(forecast.rain).toFixed(1) + " mm"; } else { rainCell.innerHTML = (parseFloat(forecast.rain) / 25.4).toFixed(2) + " in"; } @@ -350,7 +350,7 @@ Module.register("weatherforecast",{ icon: this.config.iconTable[forecast.weather[0].icon], maxTemp: this.roundValue(forecast.temp.max), minTemp: this.roundValue(forecast.temp.min), - rain: this.roundValue(forecast.rain) + rain: forecast.rain }; this.forecast.push(forecastData); From a6965342e7bbc0016aa82d9f17ddaf8147c4fc19 Mon Sep 17 00:00:00 2001 From: Michael Teeuw Date: Thu, 16 Aug 2018 12:00:06 +0200 Subject: [PATCH 21/21] Update CHANGELOG.md --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5c6953d8..166f84b4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -24,6 +24,8 @@ This project adheres to [Semantic Versioning](http://semver.org/). - Swedish translations - Hungarian translations for the updatenotification module +- Updated Norsk bokmål translation +- Updated Norsk nynorsk translation ## [2.4.1] - 2018-07-04