Misplaced Pages

Module talk:Storm categories

Article snapshot taken from Wikipedia with creative commons attribution-sharealike license. Give it a read and then ask your questions in the chat. We can research this topic together.

This is an old revision of this page, as edited by Chlod (talk | contribs) at 01:50, 25 April 2023 (Template-protected edit request on 23 April 2022: Reply). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

Revision as of 01:50, 25 April 2023 by Chlod (talk | contribs) (Template-protected edit request on 23 April 2022: Reply)(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)
This is the talk page for discussing improvements to the Storm categories module.
Archives: 1Auto-archiving period: 31 days 
Module:Storm categories is permanently protected from editing because it is a heavily used or highly visible module. Substantial changes should first be proposed and discussed here on this page. If the proposal is uncontroversial or has been discussed and is supported by consensus, editors may use {{edit template-protected}} to notify an administrator or template editor to make the requested edit.

WikiProject iconWeather: Tropical Template‑class
WikiProject iconThis module is within the scope of WikiProject Weather, which collaborates on weather and related subjects on Misplaced Pages. To participate, help improve this article or visit the project page for details. WeatherWikipedia:WikiProject WeatherTemplate:WikiProject WeatherWeather
TemplateThis module does not require a rating on Misplaced Pages's content assessment scale.
Taskforce icon
This module is supported by WikiProject Tropical cyclones.


Accidental short-circuit in ternary expressions at lines 51 and 73

This module has a mistake at lines 51 and 73, in the instances of or (nullIfMissing and nil or ); these lines attempt to output nil if nullIfMissing is truthy and otherwise , but because nil is falsy, the or will always trigger, and as such the expression simply short-circuits to or . {{Lemondoge|Talk|Contributions}} 22:20, 12 April 2023 (UTC)

@Lemondoge: Good catch; didn't notice that.
This edit request has been answered. Set the |answered= or |ans= parameter to no to reactivate your request.
Line 51 to:
			or (not nullIfMissing and error("No default name for basin-based category name.") or nil)
Line 73 to:
	) or (not nullIfMissing and cats.icon) or nil)
per the above. Chlod (say hi!) 22:48, 12 April 2023 (UTC)
 Completed. P.I. Ellsworth , ed.  09:34, 13 April 2023 (UTC)
Thank you! Chlod (say hi!) 09:35, 13 April 2023 (UTC)
my pleasure! Paine  09:37, 13 April 2023 (UTC)

Edit request 18 April 2023

This edit request to Module:Storm categories/categories has been answered. Set the |answered= or |ans= parameter to no to reactivate your request.

Could you please replace Module:Storm categories/categories with what's at Module:Storm categories/categories/sandbox? It includes many new scales for various events (most of which were pegged to the existing scheme and the drought ones were discussed here) and icons for the Beaufort scale I produced. The new scales are properly displayed at Module:Storm categories/sandbox. Noah 11:45, 18 April 2023 (UTC)

 Done * Pppery * it has begun... 18:50, 20 April 2023 (UTC)

Template-protected edit request on 23 April 2022

This edit request has been answered. Set the |answered= or |ans= parameter to no to reactivate your request.

Please update the current template with the version currently in the sandbox (compare). Please be careful not to copy over the top and the demo function of the module, which imports sandbox modules; only the relevant parts changed under the first few lines.

Three significant changes were made to the template:

  • An isEqual function was introduced to check if two categories are equal (while also checking aliases),
  • nullIfMissing was renamed to nilIfMissing in all relevant functions.
  • _name was fixed to respect the nilIfMissing parameter, which it previously did not.

I've created the testcases page for future reference and for showing that the changes work (see run results). Please let me know if there's any additional changes that need to be made. Thanks! Chlod (say hi!) 09:13, 23 April 2023 (UTC)

 Completed. P.I. Ellsworth , ed.  15:38, 24 April 2023 (UTC)
Thank you! Chlod (say hi!) 01:50, 25 April 2023 (UTC)
Categories: