Merge branch 'patch-2' of https://github.com/yo-less/MagicMirror into yo-less-patch-2

This commit is contained in:
Michael Teeuw 2016-09-01 09:38:06 +02:00
commit 34bc527709
4 changed files with 17 additions and 2 deletions

View File

@ -7,6 +7,10 @@ This project adheres to [Semantic Versioning](http://semver.org/).
### Updated ### Updated
- Force fullscreen when kioskmode is active. - Force fullscreen when kioskmode is active.
### Added
- Added ability to remove tags from the beginning or end of newsfeed items in 'newsfeed.js'.
- Added ability to define "the day after tomorrow" for calendar events (Definition for German already included).
## [2.0.4] - 2016-08-07 ## [2.0.4] - 2016-08-07
### Added ### Added

View File

@ -150,6 +150,16 @@ Module.register("calendar",{
timeWrapper.innerHTML = this.translate("TODAY"); timeWrapper.innerHTML = this.translate("TODAY");
} else if (event.startDate - now < one_day && event.startDate - now > 0) { } else if (event.startDate - now < one_day && event.startDate - now > 0) {
timeWrapper.innerHTML = this.translate("TOMORROW"); timeWrapper.innerHTML = this.translate("TOMORROW");
} else if (event.startDate - now < 2*one_day && event.startDate - now > 0) {
/*Provide ability to show "the day after tomorrow" instead of "in a day"
*if "DAYAFTERTOMORROW" is configured in a language's translation .json file,
*,which can be found in MagicMirror/translations/
*/
if (this.translate('DAYAFTERTOMORROW') !== 'DAYAFTERTOMORROW') {
timeWrapper.innerHTML = this.translate("DAYAFTERTOMORROW");
} else {
timeWrapper.innerHTML = moment(event.startDate, "x").fromNow();
}
} else { } else {
/* Check to see if the user displays absolute or relative dates with their events /* Check to see if the user displays absolute or relative dates with their events
* Also check to see if an event is happening within an 'urgency' time frameElement * Also check to see if an event is happening within an 'urgency' time frameElement

View File

@ -5,6 +5,7 @@
/* CALENDAR */ /* CALENDAR */
"TODAY": "Heute", "TODAY": "Heute",
"TOMORROW": "Morgen", "TOMORROW": "Morgen",
"DAYAFTERTOMORROW": "&Uuml;bermorgen",
"RUNNING": "noch", "RUNNING": "noch",
"EMPTY": "Keine Termine.", "EMPTY": "Keine Termine.",

View File

@ -5,7 +5,7 @@
/* CALENDAR */ /* CALENDAR */
"TODAY": "Vandaag", "TODAY": "Vandaag",
"TOMORROW": "Morgen", "TOMORROW": "Morgen",
"RUNNING": "Eindigd over", "RUNNING": "Eindigt over",
"EMPTY": "Geen geplande afspraken.", "EMPTY": "Geen geplande afspraken.",
/* WEATHER */ /* WEATHER */