diff --git a/CHANGELOG.md b/CHANGELOG.md
index 891a4bd1..c1d1f00b 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -4,12 +4,37 @@ All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/).
---
-## [2.4.2] - 2018-08-16
+
+## [2.5.1] - 2018-08-16
### Fixed
- Fix calendar parsing issue for Midori on RasperryPi Zero w, realted to issue #694.
+## [2.5.0] - Unreleased
+
+*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
+- 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.
+- Fixed close dates to be absolute, if no configured in the config.js - module Calendar
+
+### Updated
+
+- Swedish translations
+- Hungarian translations for the updatenotification module
+- Updated Norsk bokmål translation
+- Updated Norsk nynorsk translation
+
## [2.4.1] - 2018-07-04
### Fixed
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 = ".toString() + ")
";
+ image = ".toString() + ")
";
} 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{
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/calendar/calendar.js b/modules/default/calendar/calendar.js
index 71a68efa..ebfc4c14 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
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..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,42 +358,52 @@ 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");
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){
+ } 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"){
+ 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);
+ }
+
});
diff --git a/modules/default/newsfeed/translations/de.json b/modules/default/newsfeed/translations/de.json
new file mode 100644
index 00000000..9ec3ef7b
--- /dev/null
+++ b/modules/default/newsfeed/translations/de.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/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..6143f68c
--- /dev/null
+++ b/modules/default/newsfeed/translations/es.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/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/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);
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": {
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"
}
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"
}
diff --git a/translations/hu.json b/translations/hu.json
index 6c0a1a28..b483ecd9 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",
@@ -24,7 +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"
}
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"
}
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"
}
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"
}