Skip to content

Commit 53df20f

Browse files
authored
[weatherprovider] update subclass language use override (#3914)
1 parent 38a4d23 commit 53df20f

File tree

4 files changed

+16
-16
lines changed

4 files changed

+16
-16
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ planned for 2026-01-01
3131
- [ci] Add concurrency to automated tests workflow to cancel outdated runs (#3943)
3232
- [tests] replace `node-libgpiod` with `serialport` in electron-rebuild workflow (#3945)
3333
- [calendar] hide repeatingCountTitle if the event count is zero (#3949)
34+
- [weatherprovider] update override warning wording (#3914)
3435
- [core] configure cspell to check default modules only and fix typos (#3955)
3536
- [core] refactor: replace `XMLHttpRequest` with `fetch` in `translator.js` (#3950)
3637
- [tests] migrate e2e tests to Playwright (#3950)

cspell.config.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,6 @@
275275
"Stieber",
276276
"strinner",
277277
"stylelintrc",
278-
"subclassing",
279278
"sunaction",
280279
"suncalc",
281280
"suntimes",

js/module.js

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77
const Module = Class.extend({
88

99
/**
10-
********************************************************
11-
* All methods (and properties) below can be subclassed. *
12-
********************************************************
10+
*********************************************************
11+
* All methods (and properties) below can be overridden. *
12+
*********************************************************
1313
*/
1414

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

7676
/**
7777
* Generates the dom which needs to be displayed. This method is called by the MagicMirror² core.
78-
* This method can to be subclassed if the module wants to display info on the mirror.
79-
* Alternatively, the getTemplate method could be subclassed.
78+
* This method can to be overridden if the module wants to display info on the mirror.
79+
* Alternatively, the getTemplate method could be overridden.
8080
* @returns {HTMLElement|Promise} The dom or a promise with the dom to display.
8181
*/
8282
getDom () {
@@ -109,7 +109,7 @@ const Module = Class.extend({
109109
/**
110110
* Generates the header string which needs to be displayed if a user has a header configured for this module.
111111
* This method is called by the MagicMirror² core, but only if the user has configured a default header for the module.
112-
* This method needs to be subclassed if the module wants to display modified headers on the mirror.
112+
* This method needs to be overridden if the module wants to display modified headers on the mirror.
113113
* @returns {string} The header to display above the header.
114114
*/
115115
getHeader () {
@@ -118,8 +118,8 @@ const Module = Class.extend({
118118

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

130130
/**
131131
* Returns the data to be used in the template.
132-
* This method needs to be subclassed if the module wants to use a custom data.
132+
* This method needs to be overridden if the module wants to use a custom data.
133133
* @returns {object} The data for the template
134134
*/
135135
getTemplateData () {
@@ -196,9 +196,9 @@ const Module = Class.extend({
196196
},
197197

198198
/**
199-
********************************************
200-
* The methods below don't need subclassing. *
201-
********************************************
199+
***********************************************
200+
* The methods below should not be overridden. *
201+
***********************************************
202202
*/
203203

204204
/**

modules/default/weather/weatherprovider.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,19 +42,19 @@ const WeatherProvider = Class.extend({
4242
// This method should start the API request to fetch the current weather.
4343
// This method should definitely be overwritten in the provider.
4444
fetchCurrentWeather () {
45-
Log.warn(`[weatherprovider] ${this.providerName} does not subclass the fetchCurrentWeather method.`);
45+
Log.warn(`[weatherprovider] ${this.providerName} does not override the fetchCurrentWeather method.`);
4646
},
4747

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

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

6060
// This returns a WeatherDay object for the current weather.

0 commit comments

Comments
 (0)