Misplaced Pages

Module talk:Storm categories: Difference between revisions

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.
Browse history interactively← Previous editContent deleted Content addedVisualWikitext
Revision as of 15:38, 24 April 2023 editPaine Ellsworth (talk | contribs)Autopatrolled, Extended confirmed users, Page movers, File movers, New page reviewers, Pending changes reviewers, Rollbackers, Template editors255,733 edits Template-protected edit request on 23 April 2022: edited← Previous edit Latest revision as of 21:22, 30 July 2024 edit undoCewbot (talk | contribs)Bots7,432,784 editsm Maintain {{WPBS}}: 1 WikiProject template. Create {{WPBS}}.Tag: Talk banner shell conversion 
(25 intermediate revisions by 7 users not shown)
Line 1: Line 1:
{{Talk page header}} {{Talk page header}}
{{WikiProject banner shell|
{{Permanently protected}}
{{WikiProject Weather | tropical-cyclones-project=yes}} {{WikiProject Weather | tropical-cyclones-project=yes}}
}}

{{Permanently protected}}
{{User:MiszaBot/config {{User:MiszaBot/config
| algo = old(31d) | algo = old(60d)
| archive = Module talk:Storm categories/Archive %(counter)d | archive = Module talk:Storm categories/Archive %(counter)d
| archiveheader = {{Archive|Module talk:Storm categories}} | archiveheader = {{Archive|Module talk:Storm categories}}
| counter = 1 | counter = 1
| maxarchivesize = 50K | maxarchivesize = 100K
| minthreadstoarchive = 1 | minthreadstoarchive = 2
| minthreadsleft = 0 | minthreadsleft = 2
}} }}
__FORCETOC__ __FORCETOC__

== 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 {{code|1=or (nullIfMissing and nil or )|lang=lua}}; these lines attempt to output <code>nil</code> if <code>nullIfMissing</code> is truthy and otherwise <code></code>, but because nil is falsy, the <code>or </code> will always trigger, and as such the expression simply short-circuits to <code>or </code>. {&#123;''']'''&#124;]&#124;]&#125;} 22:20, 12 April 2023 (UTC)

:{{re|Lemondoge}} Good catch; didn't notice that.
{{tper|answered=yes}}
:Line 51 to:
:<syntaxhighlight lang="lua" line start="51">
or (not nullIfMissing and error("No default name for basin-based category name.") or nil)
</syntaxhighlight>
:Line 73 to:
:<syntaxhighlight lang="lua" line start="73">
) or (not nullIfMissing and cats.icon) or nil)
</syntaxhighlight>
:per the above. <span style="background:#ffff55">''''']'''''</span>&nbsp;<small style="font-size:calc(1em - 2pt)">(])</small> 22:48, 12 April 2023 (UTC)

::{{edited2}}. ''''']'''''&thinsp;,&nbsp;]&nbsp;]&nbsp;<small>09:34, 13 April 2023 (UTC)</small>
:::Thank you! <span style="background:#ffff55">''''']'''''</span>&nbsp;<small style="font-size:calc(1em - 2pt)">(])</small> 09:35, 13 April 2023 (UTC)
::::''my pleasure!''&nbsp;''''']'''''&nbsp;&nbsp;<small>09:37, 13 April 2023 (UTC)</small>

== Edit request 18 April 2023 ==

{{Edit template-protected|Module:Storm categories/categories|answered=yes}}

Could you please replace ] with what's at ]? It includes many new scales for various events (most of which were pegged to the existing scheme and the drought ones were discussed ]) and icons for the Beaufort scale I produced. The new scales are properly displayed at ]. ]<sup>]</sup> 11:45, 18 April 2023 (UTC)
: {{done}} ] ] 18:50, 20 April 2023 (UTC)

== Template-protected edit request on 23 April 2022 ==

{{tper|answered=yes}}
Please update the current template with the version currently in the sandbox ({{comparePages|Module:Storm categories|Module:Storm categories/sandbox|compare}}). Please be careful not to copy over the top and the <code>demo</code> 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 <code>isEqual</code> function was introduced to check if two categories are equal (while also checking aliases),
* <code>nullIfMissing</code> was renamed to <code>nilIfMissing</code> in all relevant functions.
* <code>_name</code> was fixed to respect the <code>nilIfMissing</code> parameter, which it previously did not.

I've created the ] for future reference and for showing that the changes work (see ]). Please let me know if there's any additional changes that need to be made. Thanks! <span style="background:#ffff55">''''']'''''</span>&nbsp;<small style="font-size:calc(1em - 2pt)">(])</small> 09:13, 23 April 2023 (UTC)

:{{edited2}}. ''''']'''''&thinsp;,&nbsp;]&nbsp;]&nbsp;<small>15:38, 24 April 2023 (UTC)</small>

Latest revision as of 21:22, 30 July 2024

This is the talk page for discussing improvements to the Storm categories module.
Archives: 1Auto-archiving period: 2 months 
This module does not require a rating on Misplaced Pages's content assessment scale.
It is of interest to the following WikiProjects:
WikiProject iconWeather: Tropical
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
Taskforce icon
This module is supported by WikiProject Tropical cyclones.
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.

Categories: