diff --git a/CHANGELOG.md b/CHANGELOG.md index 37b05f26..58f13a33 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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) diff --git a/cspell.config.json b/cspell.config.json index 109eb777..ec3afdc3 100644 --- a/cspell.config.json +++ b/cspell.config.json @@ -275,7 +275,6 @@ "Stieber", "strinner", "stylelintrc", - "subclassing", "sunaction", "suncalc", "suntimes", diff --git a/js/module.js b/js/module.js index 00e889a9..a600c50c 100644 --- a/js/module.js +++ b/js/module.js @@ -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. @@ -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 () { @@ -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 () { @@ -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. */ @@ -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 () { @@ -196,9 +196,9 @@ const Module = Class.extend({ }, /** - ******************************************** - * The methods below don't need subclassing. * - ******************************************** + *********************************************** + * The methods below should not be overridden. * + *********************************************** */ /** diff --git a/modules/default/weather/weatherprovider.js b/modules/default/weather/weatherprovider.js index 32395598..629d7e19 100644 --- a/modules/default/weather/weatherprovider.js +++ b/modules/default/weather/weatherprovider.js @@ -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.