diff --git a/.travis.yml b/.travis.yml index d98a72cd..d1bd8ff6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,3 +1,4 @@ +dist: trusty language: node_js node_js: - "8" diff --git a/CHANGELOG.md b/CHANGELOG.md index 2601bded..b0278c75 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,12 +12,18 @@ This project adheres to [Semantic Versioning](http://semver.org/). *This release is scheduled to be released on 2019-10-01.* ### Added +- Spanish translation for "PRECIP" +- Adding a Malay (Malaysian) translation for MagicMirror² - Add test check URLs of vendors 200 and 404 HTTP CODE. ### Updated - Updatenotification module: Display update notification for a limited (configurable) time. - Enabled e2e/vendor_spec.js tests +### Updated +- Updatenotification module: Display update notification for a limited (configurable) time. +- The css/custom.css will be rename after the next release. We've add into `run-start.sh` a instruction by GIT to ignore with `--skip-worktree` and `rm --cached`. The history about this change [#1540]. + ### Fixed - Updatenotification module: Properly handle race conditions, prevent crash. - Send `NEWS_FEED` notification also for the first news messages which are shown diff --git a/LICENSE.md b/LICENSE.md index 09ac7e6f..07c1fb07 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -1,7 +1,7 @@ The MIT License (MIT) ===================== -Copyright © 2016-2017 Michael Teeuw +Copyright © 2016-2019 Michael Teeuw Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation diff --git a/installers/raspberry.sh b/installers/raspberry.sh index 2a1b975b..b7a08d22 100644 --- a/installers/raspberry.sh +++ b/installers/raspberry.sh @@ -130,13 +130,6 @@ if $NPM_INSTALL; then echo -e "\e[96mInstalling npm ...\e[90m" - # Fetch the latest version of npm from the selected branch - # The NODE_STABLE_BRANCH variable will need to be manually adjusted when a new branch is released. (e.g. 7.x) - # Only tested (stable) versions are recommended as newer versions could break MagicMirror. - - #NODE_STABLE_BRANCH="9.x" - #curl -sL https://deb.nodesource.com/setup_$NODE_STABLE_BRANCH | sudo -E bash - - # sudo apt-get install -y npm echo -e "\e[92mnpm installation Done!\e[0m" fi diff --git a/js/main.js b/js/main.js index b811f937..57e4d4e7 100644 --- a/js/main.js +++ b/js/main.js @@ -203,7 +203,7 @@ var MM = (function() { */ var updateModuleContent = function(module, newHeader, newContent) { var moduleWrapper = document.getElementById(module.identifier); - if (moduleWrapper === null) return; + if (moduleWrapper === null) {return;} var headerWrapper = moduleWrapper.getElementsByClassName("module-header"); var contentWrapper = moduleWrapper.getElementsByClassName("module-content"); diff --git a/modules/default/currentweather/currentweather.js b/modules/default/currentweather/currentweather.js index 562baf31..7d917132 100644 --- a/modules/default/currentweather/currentweather.js +++ b/modules/default/currentweather/currentweather.js @@ -273,7 +273,7 @@ Module.register("currentweather",{ if (this.config.useLocationAsHeader && this.config.location !== false) { return this.config.location; } - + return this.data.header; }, diff --git a/modules/default/updatenotification/node_helper.js b/modules/default/updatenotification/node_helper.js index 1f9d2f4d..03ecd745 100644 --- a/modules/default/updatenotification/node_helper.js +++ b/modules/default/updatenotification/node_helper.js @@ -18,7 +18,7 @@ module.exports = NodeHelper.create({ configureModules: function(modules) { // Push MagicMirror itself , biggest chance it'll show up last in UI and isn't overwritten - // others will be added in front, asynchronously + // others will be added in front, asynchronously simpleGits.push({"module": "default", "git": SimpleGit(path.normalize(__dirname + "/../../../"))}); for (moduleName in modules) { diff --git a/modules/default/updatenotification/updatenotification.js b/modules/default/updatenotification/updatenotification.js index 58c3995c..d4bdc568 100644 --- a/modules/default/updatenotification/updatenotification.js +++ b/modules/default/updatenotification/updatenotification.js @@ -6,12 +6,12 @@ Module.register("updatenotification", { }, suspended: false, - moduleList: {}, + moduleList: {}, start: function () { - var self = this; + var self = this; Log.log("Start updatenotification"); - setInterval( () => { self.moduleList = {};self.updateDom(2) } , self.config.refreshInterval) + setInterval( () => { self.moduleList = {};self.updateDom(2); } , self.config.refreshInterval); }, notificationReceived: function (notification, payload, sender) { @@ -38,15 +38,15 @@ Module.register("updatenotification", { self.updateDom(2); } //self.show(1000, { lockString: self.identifier }); - + } else if (payload && payload.behind == 0){ - // if the module WAS in the list, but shouldn't be - if(this.moduleList[payload.module] != undefined){ - // remove it - delete this.moduleList[payload.module] - self.updateDom(2); - } - } + // if the module WAS in the list, but shouldn't be + if(this.moduleList[payload.module] != undefined){ + // remove it + delete this.moduleList[payload.module]; + self.updateDom(2); + } + } }, diffLink: function(module, text) { @@ -66,7 +66,7 @@ Module.register("updatenotification", { if(this.suspended==false){ // process the hash of module info found for(key of Object.keys(this.moduleList)){ - let m= this.moduleList[key] + let m= this.moduleList[key]; var message = document.createElement("div"); message.className = "small bright"; diff --git a/package.json b/package.json index 1f7e7402..808caf9d 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,7 @@ "start": "sh run-start.sh", "install": "cd vendor && npm install", "install-fonts": "cd fonts && npm install", - "postinstall": "sh installers/postinstall/postinstall.sh && npm run install-fonts", + "postinstall": "sh untrack-css.sh && sh installers/postinstall/postinstall.sh && npm run install-fonts", "test": "NODE_ENV=test ./node_modules/mocha/bin/mocha tests --recursive", "test:unit": "NODE_ENV=test ./node_modules/mocha/bin/mocha tests/unit --recursive", "test:e2e": "NODE_ENV=test ./node_modules/mocha/bin/mocha tests/e2e --recursive", diff --git a/run-start.sh b/run-start.sh index 6fc19b51..bbfcf921 100644 --- a/run-start.sh +++ b/run-start.sh @@ -1,3 +1,6 @@ + +./untrack-css.sh + if [ -z "$DISPLAY" ]; then #If not set DISPLAY is SSH remote or tty export DISPLAY=:0 # Set by default display fi diff --git a/translations/es.json b/translations/es.json index 5e5fe96d..709abada 100644 --- a/translations/es.json +++ b/translations/es.json @@ -31,5 +31,6 @@ "UPDATE_INFO_SINGLE": "Tu actual instalación está {COMMIT_COUNT} commit cambios detrás de la rama {BRANCH_NAME}.", "UPDATE_INFO_MULTIPLE": "Tu actual instalación está {COMMIT_COUNT} commits cambios detrás de la rama {BRANCH_NAME}.", - "FEELS": "Sensación térmica de" + "FEELS": "Sensación térmica de", + "PRECIP": "Precipitación" } diff --git a/translations/ms-my.json b/translations/ms-my.json new file mode 100644 index 00000000..380cf64e --- /dev/null +++ b/translations/ms-my.json @@ -0,0 +1,33 @@ +{ + "LOADING": "Tunggu Sebentar …", + + "TODAY": "Hari ini", + "TOMORROW": "Esok", + "DAYAFTERTOMORROW": "Lusa", + "RUNNING": "Berakhir dalam", + "EMPTY": "Tidak ada agenda", + + "WEEK": "Minggu ke-{weekNumber}", + + "N": "U", + "NNE": "UUT", + "NE": "TL", + "ENE": "TTL", + "E": "T", + "ESE": "TT", + "SE": "T", + "SSE": "ST", + "S": "S", + "SSW": "SBD", + "SW": "BD", + "WSW": "BBD", + "W": "B", + "WNW": "BBL", + "NW": "BL", + "NNW": "UBL", + + "UPDATE_NOTIFICATION": "MagicMirror² mempunyai update terkini.", + "UPDATE_NOTIFICATION_MODULE": "Modul {MODULE_NAME} mempunyai update terkini.", + "UPDATE_INFO_SINGLE": "Pemasangan MagicMirror² ini mempunyai {COMMIT_COUNT} commit terkebelakang dari branch {BRANCH_NAME}.", + "UPDATE_INFO_MULTIPLE": "Pemasangan MagicMirror² ini mempunyai {COMMIT_COUNT} commit terkebelakang dari branch {BRANCH_NAME}." +} diff --git a/translations/translations.js b/translations/translations.js index 683229bc..767590e8 100644 --- a/translations/translations.js +++ b/translations/translations.js @@ -40,7 +40,8 @@ var translations = { "cs" : "translations/cs.json", // Czech "hr" : "translations/hr.json", // Croatian "sk" : "translations/sk.json", // Slovak - "tlh" : "translations/tlh.json" // Klingon + "tlh" : "translations/tlh.json", // Klingon + "ms-my" : "translations/ms-my.json" // Malay }; if (typeof module !== "undefined") {module.exports = translations;} diff --git a/untrack-css.sh b/untrack-css.sh new file mode 100755 index 00000000..580052e6 --- /dev/null +++ b/untrack-css.sh @@ -0,0 +1,11 @@ +# Long history here +# https://github.com/MichMich/MagicMirror/pull/1540 +STATUS_CUSTOM_CSS=$(git ls-files -v css/custom.css|cut -f 1 --delimiter=" ") + +if [ "$STATUS_CUSTOM_CSS" = "H" ]; then + echo "We'll remove from the repository the css/custom.css" + echo "This script apply git update-index --skip-worktree css/custom.css" + git update-index --skip-worktree css/custom.css + git rm --cached css/custom.css +fi +