Skip to content
Merged
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ planned for 2026-01-01
- [ci] Add concurrency to automated tests workflow to cancel outdated runs (#3943)
- [tests] replace `node-libgpiod` with `serialport` in electron-rebuild workflow (#3945)
- [calendar] hide repeatingCountTitle if the event count is zero (#3949)
- [weatherprovider] update override warning wording (#3914)
- [core] configure cspell to check default modules only and fix typos (#3955)
- [core] refactor: replace `XMLHttpRequest` with `fetch` in `translator.js` (#3950)
- [tests] migrate e2e tests to Playwright (#3950)
Expand Down
1 change: 0 additions & 1 deletion cspell.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,6 @@
"Stieber",
"strinner",
"stylelintrc",
"subclassing",
"sunaction",
"suncalc",
"suntimes",
Expand Down
24 changes: 12 additions & 12 deletions js/module.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
const Module = Class.extend({

/**
********************************************************
* All methods (and properties) below can be subclassed. *
********************************************************
*********************************************************
* All methods (and properties) below can be overridden. *
*********************************************************
*/

// Set the minimum MagicMirror² module version for this module.
Expand Down Expand Up @@ -75,8 +75,8 @@ const Module = Class.extend({

/**
* Generates the dom which needs to be displayed. This method is called by the MagicMirror² core.
* This method can to be subclassed if the module wants to display info on the mirror.
* Alternatively, the getTemplate method could be subclassed.
* This method can to be overridden if the module wants to display info on the mirror.
* Alternatively, the getTemplate method could be overridden.
* @returns {HTMLElement|Promise} The dom or a promise with the dom to display.
*/
getDom () {
Expand Down Expand Up @@ -109,7 +109,7 @@ const Module = Class.extend({
/**
* Generates the header string which needs to be displayed if a user has a header configured for this module.
* This method is called by the MagicMirror² core, but only if the user has configured a default header for the module.
* This method needs to be subclassed if the module wants to display modified headers on the mirror.
* This method needs to be overridden if the module wants to display modified headers on the mirror.
* @returns {string} The header to display above the header.
*/
getHeader () {
Expand All @@ -118,8 +118,8 @@ const Module = Class.extend({

/**
* Returns the template for the module which is used by the default getDom implementation.
* This method needs to be subclassed if the module wants to use a template.
* It can either return a template sting, or a template filename.
* This method needs to be overridden if the module wants to use a template.
* It can either return a template string, or a template filename.
* If the string ends with '.html' it's considered a file from within the module's folder.
* @returns {string} The template string of filename.
*/
Expand All @@ -129,7 +129,7 @@ const Module = Class.extend({

/**
* Returns the data to be used in the template.
* This method needs to be subclassed if the module wants to use a custom data.
* This method needs to be overridden if the module wants to use a custom data.
* @returns {object} The data for the template
*/
getTemplateData () {
Expand Down Expand Up @@ -196,9 +196,9 @@ const Module = Class.extend({
},

/**
********************************************
* The methods below don't need subclassing. *
********************************************
***********************************************
* The methods below should not be overridden. *
***********************************************
*/

/**
Expand Down
6 changes: 3 additions & 3 deletions modules/default/weather/weatherprovider.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,19 +42,19 @@ const WeatherProvider = Class.extend({
// This method should start the API request to fetch the current weather.
// This method should definitely be overwritten in the provider.
fetchCurrentWeather () {
Log.warn(`[weatherprovider] ${this.providerName} does not subclass the fetchCurrentWeather method.`);
Log.warn(`[weatherprovider] ${this.providerName} does not override the fetchCurrentWeather method.`);
},

// This method should start the API request to fetch the weather forecast.
// This method should definitely be overwritten in the provider.
fetchWeatherForecast () {
Log.warn(`[weatherprovider] ${this.providerName} does not subclass the fetchWeatherForecast method.`);
Log.warn(`[weatherprovider] ${this.providerName} does not override the fetchWeatherForecast method.`);
},

// This method should start the API request to fetch the weather hourly.
// This method should definitely be overwritten in the provider.
fetchWeatherHourly () {
Log.warn(`[weatherprovider] ${this.providerName} does not subclass the fetchWeatherHourly method.`);
Log.warn(`[weatherprovider] ${this.providerName} does not override the fetchWeatherHourly method.`);
},

// This returns a WeatherDay object for the current weather.
Expand Down