diff --git a/CHANGELOG.md b/CHANGELOG.md index 4b8c087c..0c414c0f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,14 +15,18 @@ 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. +- 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 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 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/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" }