Module talk:Storm categories: Difference between revisions

Content deleted Content added
Hurricane Noah (talk | contribs)
 
(28 intermediate revisions by 11 users not shown)
Line 1:
{{Talk page header}}
{{WikiProject banner shell|
{{WikiProject Weather | tropical-cyclones-project=yes}}
}}
{{Permanently protected}}
{{WikiProject Weather | tropical-cyclones-project=yes}}
 
{{User:MiszaBot/config
| algo = old(31d60d)
| archive = Module talk:Storm categories/Archive %(counter)d
| archiveheader = {{Archive|Module talk:Storm categories}}
| counter = 1
| maxarchivesize = 50K100K
| minthreadstoarchive = 12
| minthreadsleft = 02
}}
__FORCETOC__
 
== Template-protected edit request on 2329 AprilJanuary 20222025 ==
== 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 [foo])|lang=lua}}; these lines attempt to output <code>nil</code> if <code>nullIfMissing</code> is truthy and otherwise <code>[foo]</code>, but because nil is falsy, the <code>or [foo]</code> will always trigger, and as such the expression simply short-circuits to <code>or [foo]</code>. {&#123;'''[[User:Lemondoge|Lemondoge]]'''&#124;[[User talk:Lemondoge|Talk]]&#124;[[Special:Contributions/Lemondoge|Contributions]]&#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[defaultCategory].icon) or nil)
</syntaxhighlight>
:per the above. <span style="background:#ffff55">'''''[[User:Chlod|Chlod]]'''''</span>&nbsp;<small style="font-size:calc(1em - 2pt)">([[User talk:Chlod|say&nbsp;hi!]])</small> 22:48, 12 April 2023 (UTC)
 
::{{edited2}}. '''''[[User:Paine Ellsworth|<span style="font-size:92%;color:darkblue;font-family:Segoe Script">P.I.&nbsp;Ellsworth</span>]]'''''&thinsp;,&nbsp;[[Editor|<span style="color:black">ed.</span>]]&nbsp;[[User talk:Paine Ellsworth|<sup>put'er&nbsp;there</sup>]]&nbsp;<small>09:34, 13 April 2023 (UTC)</small>
:::Thank you! <span style="background:#ffff55">'''''[[User:Chlod|Chlod]]'''''</span>&nbsp;<small style="font-size:calc(1em - 2pt)">([[User talk:Chlod|say&nbsp;hi!]])</small> 09:35, 13 April 2023 (UTC)
::::''my pleasure!''&nbsp;'''''[[User:Paine Ellsworth|<span style="font-size:100%;color:darkblue;font-family:Segoe Script">Paine</span>]]'''''&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 [[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 [[Wikipedia:WikiProject Weather/New Weather Infobox|here]]) and icons for the Beaufort scale I produced. The new scales are properly displayed at [[Module:Storm categories/sandbox]]. [[User:Hurricane Noah|<span style="white-space:nowrap;text-shadow:#009200 0.3em 0.4em 1.0em,#009200 -0.2em -0.2em 1.0em;color:#009200"><b>Noah</b></span>]]<sup>[[User talk:Hurricane Noah|<span style="color:#ff0000"><b>Talk</b></span>]]</sup> 11:45, 18 April 2023 (UTC)
: {{done}} [[User:Pppery|* Pppery *]] [[User talk:Pppery|<sub style="color:#800000">it has begun...</sub>]] 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.
 
{{Editedit template-protected|Module:Storm categories/categories|answered=yes}}
Three significant changes were made to the template:
Change "Supertyphoon" (Line 215) to "Super typhoon" [[User:Wolf20482|<span style="background-color:purple; color:white;">'''wolf20482 🐺'''</span>]] ([[User talk:Wolf20482|talk]]) 13:38, 29 January 2025 (UTC)
* An <code>isEqual</code> function was introduced to check if two categories are equal (while also checking aliases),
:{{done}}<!-- Template:ETp --> – [[User:Jonesey95|Jonesey95]] ([[User talk:Jonesey95|talk]]) 15:21, 29 January 2025 (UTC)
* <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.
 
== EditTemplate-protected edit request 18on 20 April 20232025 ==
I've created the [[Module:Storm categories/testcases|testcases page]] for future reference and for showing that the changes work (see [[Module talk:Storm categories/testcases|run results]]). Please let me know if there's any additional changes that need to be made. Thanks! <span style="background:#ffff55">'''''[[User:Chlod|Chlod]]'''''</span>&nbsp;<small style="font-size:calc(1em - 2pt)">([[User talk:Chlod|say&nbsp;hi!]])</small> 09:13, 23 April 2023 (UTC)
 
{{edit template-protected|Module:Storm categories/categories|answered=noyes}}
:{{edited2}}. '''''[[User:Paine Ellsworth|<span style="font-size:92%;color:darkblue;font-family:Segoe Script">P.I.&nbsp;Ellsworth</span>]]'''''&thinsp;,&nbsp;[[Editor|<span style="color:black">ed.</span>]]&nbsp;[[User talk:Paine Ellsworth|<sup>put'er&nbsp;there</sup>]]&nbsp;<small>15:38, 24 April 2023 (UTC)</small>
This line should be included as an alias for the "subtropical" category (i.e. placed right below the definition for "ss" near the bottom of the code):
::Thank you! {{Smiley}} <span style="background:#ffff55">'''''[[User:Chlod|Chlod]]'''''</span>&nbsp;<small style="font-size:calc(1em - 2pt)">([[User talk:Chlod|say&nbsp;hi!]])</small> 01:50, 25 April 2023 (UTC)
:::''my pleasure!''&nbsp;'''''[[User:Paine Ellsworth|<span style="font-size:100%;color:darkblue;font-family:Segoe Script">Paine</span>]]'''''&nbsp;&nbsp;<small>03:51, 25 April 2023 (UTC)</small>
 
<code>cats["swsubstorm"] = cats["subtropical"]</code>
== Template-protected edit request on 6 May 2023 ==
 
In case it's necessary, the agency responsible for warning on tropical cyclones in the South-West Indian Ocean has begun using a new category for subtropical cyclones with maximum sustained wind speeds at or above 35 kt. This should be reflected here for use in an article (https://en.wikipedia.org/wiki/2024-25_South-West_Indian_Ocean_cyclone_season), which includes a storm that has been recently designated with this category. [[User:Cherkasy0|Cherkasy0]] ([[User talk:Cherkasy0|talk]]) 12:19, 20 April 2025 (UTC)
{{edit template-protected|Module:Storm categories/categories|answered=no}}
: {{done}} [[User:Pppery|* Pppery *]] [[User talk:Pppery|<sub style="color:#800000">it has begun...</sub>]] 1820:5008, 2022 April 20232025 (UTC)
Please replace the text on the [[Module:Storm categories/categories]] page with what's currently at [[Module:Storm categories/categories/sandbox]]. The change includes more new scales as well as the addition of dozens of status icon images. [[User:Hurricane Noah|<span style="white-space:nowrap;text-shadow:#009200 0.3em 0.4em 1.0em,#009200 -0.2em -0.2em 1.0em;color:#009200"><b>Noah</b></span>]]<sup>[[User talk:Hurricane Noah|<span style="color:#ff0000"><b>Talk</b></span>]]</sup> 21:41, 6 May 2023 (UTC)