diff --git a/CHANGELOG.md b/CHANGELOG.md
index 00a144d..645b916 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,10 +1,25 @@
# MMM-Fuel Changelog
+## [2.0.2]
+
+### Added
+
+* French Translations
+* Clarification for config option `updateInterval` in readme
+
+### Changed
+
+* Dependency Update
+
+### Removed
+
+* Github pages
+
## [2.0.1]
### Fixed
-* Rendering of ellipsis with config `shortenText` active https://github.com/fewieden/MMM-Fuel/issues/36
+* [Rendering of ellipsis with config `shortenText` active]( https://github.com/fewieden/MMM-Fuel/issues/36)
## [2.0.0]
diff --git a/MMM-Fuel.js b/MMM-Fuel.js
index fb14d21..2e52863 100644
--- a/MMM-Fuel.js
+++ b/MMM-Fuel.js
@@ -118,7 +118,8 @@ Module.register('MMM-Fuel', {
getTranslations() {
return {
en: 'translations/en.json',
- de: 'translations/de.json'
+ de: 'translations/de.json',
+ fr: 'translations/fr.json'
};
},
diff --git a/README.md b/README.md
index 95d5784..2fd3cef 100644
--- a/README.md
+++ b/README.md
@@ -18,24 +18,24 @@ Gas Station Price Module for MagicMirror2
## Installation
-1. Clone this repo into `~/MagicMirror/modules` directory.
-1. Configure your `~/MagicMirror/config/config.js`:
-
- ```
- {
- module: "MMM-Fuel",
- position: "top_right",
- config: {
- api_key: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
- lat: 52.518611,
- lng: 13.408333,
- types: ["diesel"],
- ...
- }
+* Clone this repo into `~/MagicMirror/modules` directory.
+* Configure your `~/MagicMirror/config/config.js`:
+
+```js
+{
+ module: "MMM-Fuel",
+ position: "top_right",
+ config: {
+ api_key: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
+ lat: 52.518611,
+ lng: 13.408333,
+ types: ["diesel"],
+ ...
}
- ```
+}
+```
-1. Run command `npm i --production` in `~/MagicMirror/modules/MMM-Fuel` directory.
+* Run command `npm i --production` in `~/MagicMirror/modules/MMM-Fuel` directory.
## Config Options
@@ -60,7 +60,7 @@ Gas Station Price Module for MagicMirror2
| `iconHeader` | `true` | Boolean to display the car icon in the header. |
| `rotate` | `true` | Boolean to enable/disable rotation between sort by price and distance. |
| `rotateInterval` | `60000` (1 min) | How fast the sorting should be switched between byPrice and byDistance. |
-| `updateInterval` | `900000` (15 mins) | How often should the data be fetched. |
+| `updateInterval` | `900000` (15 mins) | How often should the data be fetched. **If your value is to small, you risk to get banned from the API provider. I suggest a minimum of 15mins** |
### tankerkoenig (Germany only)
diff --git a/apis/nsw.js b/apis/nsw.js
index 4391221..f937575 100644
--- a/apis/nsw.js
+++ b/apis/nsw.js
@@ -40,7 +40,9 @@ let token;
* @description Helper function to refresh the API token.
* @async
*
- * @returns {Promise}
+ * @param {object} config - Config object with authentication details.
+ *
+ * @returns {Promise} This async function just returns a promise but no value.
*
* @see apis/README.md
*/
@@ -160,7 +162,10 @@ async function requestFuelType(type) {
})
});
- return { type, data: await response.json() };
+ return {
+ type,
+ data: await response.json()
+ };
}
/**
diff --git a/apis/utils/index.js b/apis/utils/index.js
index da10d92..69898a5 100644
--- a/apis/utils/index.js
+++ b/apis/utils/index.js
@@ -38,4 +38,7 @@ function sortByDistance(a, b) {
* @module apis/utils
* @description Utility functions for API integrations.
*/
-module.exports = { filterStations, sortByDistance };
+module.exports = {
+ filterStations,
+ sortByDistance
+};
diff --git a/package.json b/package.json
index 1676493..802ece2 100644
--- a/package.json
+++ b/package.json
@@ -1,9 +1,9 @@
{
"name": "mmm-fuel",
- "version": "2.0.1",
+ "version": "2.0.2",
"description": "Gas Station price Module for MagicMirror2",
"scripts": {
- "lint": "./node_modules/.bin/eslint . && ./node_modules/.bin/stylelint .",
+ "lint": "./node_modules/.bin/eslint . && ./node_modules/.bin/stylelint **/*.css",
"docs": "./node_modules/.bin/jsdoc -c jsdoc.json ."
},
"repository": {
@@ -22,15 +22,15 @@
},
"homepage": "https://github.com/fewieden/MMM-Fuel#readme",
"devDependencies": {
- "eslint": "^5.11.0",
+ "eslint": "^6.8.0",
"eslint-config-recommended": "^4.0.0",
- "jsdoc": "^3.4.3",
- "stylelint": "^7.8.0",
- "stylelint-config-standard": "^16.0.0"
+ "jsdoc": "^3.6.4",
+ "stylelint": "^13.3.3",
+ "stylelint-config-standard": "^20.0.0"
},
"dependencies": {
- "fs-extra": "^7.0.1",
- "moment": "^2.23.0",
- "node-fetch": "^2.3.0"
+ "fs-extra": "^9.0.0",
+ "moment": "^2.24.0",
+ "node-fetch": "^2.6.0"
}
}
diff --git a/translations/fr.json b/translations/fr.json
new file mode 100644
index 0000000..b4f0b6c
--- /dev/null
+++ b/translations/fr.json
@@ -0,0 +1,11 @@
+{
+ "LOADING": "Chargement...",
+ "FUEL_PRICES": "Prix du carburant",
+ "CHEAPEST_STATIONS": "Stations d'essence les moins chères",
+ "CLOSEST_STATIONS": "Stations-service les plus proches",
+ "COMMAND_LIST": "Liste de toutes les commandes vocales",
+ "MODE": "Mode",
+ "VOICE_COMMANDS": "Commandes Vocales",
+ "API_KEY_NEEDED": "Vous devez ajouter une clé API afin de visualiser les stations-service sur une carte.",
+ "MAP_API_NOT_READY": "L'API de carte n'est pas encore disponible. Réessayez plus tard."
+}