From 2e03868021facdad8ca891a5a759cdb84c80ec9d Mon Sep 17 00:00:00 2001 From: vincep5 Date: Thu, 17 Jan 2019 08:54:16 -0600 Subject: [PATCH] current.njk JS error and Loading string --- CHANGELOG.md | 1 + modules/default/weather/current.njk | 4 ++-- modules/default/weather/forecast.njk | 4 ++-- modules/default/weather/weather.js | 4 ++-- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0a1c4693..5f2015f8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -36,6 +36,7 @@ This project adheres to [Semantic Versioning](http://semver.org/). - Added humidity support to nunjuck unit filter. - Do not display degree symbol for temperature in Kelvin [#1503](https://github.com/MichMich/MagicMirror/issues/1503). - Added fade, fadePoint and maxNumberOfDays properties to the forecast mode [#1516](https://github.com/MichMich/MagicMirror/issues/1516) +- Fixed Loading string and decimalSymbol string replace [#1538](https://github.com/MichMich/MagicMirror/issues/1538) ## [2.6.0] - 2019-01-01 diff --git a/modules/default/weather/current.njk b/modules/default/weather/current.njk index 55720e23..64d22e7b 100644 --- a/modules/default/weather/current.njk +++ b/modules/default/weather/current.njk @@ -65,9 +65,9 @@ {% endif %} {% else %}
- {{ "LOADING" | translate }} + {{ "LOADING" | translate | safe }}
{% endif %} - + diff --git a/modules/default/weather/forecast.njk b/modules/default/weather/forecast.njk index 315ebff8..56074047 100644 --- a/modules/default/weather/forecast.njk +++ b/modules/default/weather/forecast.njk @@ -24,9 +24,9 @@ {% else %}
- {{ "LOADING" | translate }} + {{ "LOADING" | translate | safe }}
{% endif %} - + diff --git a/modules/default/weather/weather.js b/modules/default/weather/weather.js index 0c230424..f554c1fe 100644 --- a/modules/default/weather/weather.js +++ b/modules/default/weather/weather.js @@ -62,7 +62,7 @@ Module.register("weather",{ return ["font-awesome.css", "weather-icons.css", "weather.css"]; }, - // Return the scripts that are nessecery for the weather module. + // Return the scripts that are necessary for the weather module. getScripts: function () { return [ "moment.js", @@ -218,7 +218,7 @@ Module.register("weather",{ }.bind(this)); this.nunjucksEnvironment().addFilter("decimalSymbol", function(value) { - return value.replace(/\./g, this.config.decimalSymbol); + return value.toString().replace(/\./g, this.config.decimalSymbol); }.bind(this)); this.nunjucksEnvironment().addFilter("calcNumSteps", function(forecast) {