Template talk:Short description/lowercasecheck: Difference between revisions
Appearance
Content deleted Content added
→ucfirst?: @Qwerfjkl "Ignore that last comment, clearly I'm to..." [Factotum] |
Dinoguy1000 (talk | contribs) →ucfirst?: should be lcfirst given the order of results |
||
Line 3: | Line 3: | ||
:@[[User:Jonesey95|Jonesey95]]: Would <code><nowiki>{{First word|iOS, etc.|sep= ,}}</nowiki></code> → {{First word|iOS, etc.|sep= ,}} do the trick? Note the {{param|sep}} parameter treats its inputs as OR i.e. it looks for '_' or ',' not '_,' . ― [[User:Qwerfjkl|<span style="background:#1d9ffc; color:white; padding:5px; box-shadow:darkgray 2px 2px 2px;">Qwerfjkl</span>]][[User talk:Qwerfjkl|<span style="background:#79c0f2;color:white; padding:2px; box-shadow:darkgray 2px 2px 2px;">talk</span>]] 21:55, 9 February 2022 (UTC) |
:@[[User:Jonesey95|Jonesey95]]: Would <code><nowiki>{{First word|iOS, etc.|sep= ,}}</nowiki></code> → {{First word|iOS, etc.|sep= ,}} do the trick? Note the {{param|sep}} parameter treats its inputs as OR i.e. it looks for '_' or ',' not '_,' . ― [[User:Qwerfjkl|<span style="background:#1d9ffc; color:white; padding:5px; box-shadow:darkgray 2px 2px 2px;">Qwerfjkl</span>]][[User talk:Qwerfjkl|<span style="background:#79c0f2;color:white; padding:2px; box-shadow:darkgray 2px 2px 2px;">talk</span>]] 21:55, 9 February 2022 (UTC) |
||
== |
== lcfirst? == |
||
Why doesn't this template just use <code> |
Why doesn't this template just use <code>lcfirst</code> in a comparison to check if the first character is lowercase? |
||
<syntaxhighlight lang="wikitext"> |
<syntaxhighlight lang="wikitext"> |
||
{{ #ifeq: {{{1}}} | {{ |
{{ #ifeq: {{{1}}} | {{lcfirst:{{{1}}}}} |
||
| <!-- lowercase; extract first word and check against allowlist --> |
| <!-- lowercase; extract first word and check against allowlist --> |
||
| <!-- uppercase or uncased character; do nothing --> |
| <!-- uppercase or uncased character; do nothing --> |
||
Line 15: | Line 15: | ||
:[[User:Dinoguy1000|Dinoguy1000]], in case there's a situation where a valid lowercase word which is not in the allowlist is used; it's better to spot it in the tracking category than have some editor wonder why they can't fix the short description.<span id="Qwerfjkl:1712432606045:Template_talkFTTCLNShort_description/lowercasecheck" class="FTTCmt"> — [[User:Qwerfjkl|<span style="background:#1d9ffc; color:white; padding:5px; box-shadow:darkgray 2px 2px 2px;">Qwerfjkl</span>]][[User talk:Qwerfjkl|<span style="background:#79c0f2;color:white; padding:2px; box-shadow:darkgray 2px 2px 2px;">talk</span>]] 19:43, 6 April 2024 (UTC)</span> |
:[[User:Dinoguy1000|Dinoguy1000]], in case there's a situation where a valid lowercase word which is not in the allowlist is used; it's better to spot it in the tracking category than have some editor wonder why they can't fix the short description.<span id="Qwerfjkl:1712432606045:Template_talkFTTCLNShort_description/lowercasecheck" class="FTTCmt"> — [[User:Qwerfjkl|<span style="background:#1d9ffc; color:white; padding:5px; box-shadow:darkgray 2px 2px 2px;">Qwerfjkl</span>]][[User talk:Qwerfjkl|<span style="background:#79c0f2;color:white; padding:2px; box-shadow:darkgray 2px 2px 2px;">talk</span>]] 19:43, 6 April 2024 (UTC)</span> |
||
::Ignore that last comment, clearly I'm too tired to be editing. Pinging @[[User:Jonesey95|Jonesey95]].<span id="Qwerfjkl:1712432734867:Template_talkFTTCLNShort_description/lowercasecheck" class="FTTCmt"> — [[User:Qwerfjkl|<span style="background:#1d9ffc; color:white; padding:5px; box-shadow:darkgray 2px 2px 2px;">Qwerfjkl</span>]][[User talk:Qwerfjkl|<span style="background:#79c0f2;color:white; padding:2px; box-shadow:darkgray 2px 2px 2px;">talk</span>]] 19:45, 6 April 2024 (UTC)</span> |
::Ignore that last comment, clearly I'm too tired to be editing. Pinging @[[User:Jonesey95|Jonesey95]].<span id="Qwerfjkl:1712432734867:Template_talkFTTCLNShort_description/lowercasecheck" class="FTTCmt"> — [[User:Qwerfjkl|<span style="background:#1d9ffc; color:white; padding:5px; box-shadow:darkgray 2px 2px 2px;">Qwerfjkl</span>]][[User talk:Qwerfjkl|<span style="background:#79c0f2;color:white; padding:2px; box-shadow:darkgray 2px 2px 2px;">talk</span>]] 19:45, 6 April 2024 (UTC)</span> |
||
:::No worries, this made me double-check my own thinking and realize I'd suggested the wrong function for the logic as given. =) <span class=nowrap>「[[User:Dinoguy1000|<span style=color:#00f>ディノ</span><span style=color:#080>奴</span>]][[Special:Contributions/Dinoguy1000|<span style=color:#F90>千?!</span>]]」<sup>[[User talk:Dinoguy1000#top|☎ Dinoguy1000]]</sup></span> 03:38, 7 April 2024 (UTC) |
Revision as of 03:39, 7 April 2024
Needs better word extraction than Template:first word
This template needs better word extraction than {{first word}}, which includes commas. This means that even though "iOS" is on the whitelist, the short description "iOS, macOS, and tvOS software" fails the check. – Jonesey95 (talk) 23:02, 6 February 2022 (UTC)
- @Jonesey95: Would
{{First word|iOS, etc.|sep= ,}}
→ iOS do the trick? Note the{{{sep}}}
parameter treats its inputs as OR i.e. it looks for '_' or ',' not '_,' . ― Qwerfjkltalk 21:55, 9 February 2022 (UTC)
lcfirst?
Why doesn't this template just use lcfirst
in a comparison to check if the first character is lowercase?
{{ #ifeq: {{{1}}} | {{lcfirst:{{{1}}}}}
| <!-- lowercase; extract first word and check against allowlist -->
| <!-- uppercase or uncased character; do nothing -->
}}
「ディノ奴千?!」☎ Dinoguy1000 18:11, 6 April 2024 (UTC)
- Dinoguy1000, in case there's a situation where a valid lowercase word which is not in the allowlist is used; it's better to spot it in the tracking category than have some editor wonder why they can't fix the short description. — Qwerfjkltalk 19:43, 6 April 2024 (UTC)
- Ignore that last comment, clearly I'm too tired to be editing. Pinging @Jonesey95. — Qwerfjkltalk 19:45, 6 April 2024 (UTC)
- No worries, this made me double-check my own thinking and realize I'd suggested the wrong function for the logic as given. =) 「ディノ奴千?!」☎ Dinoguy1000 03:38, 7 April 2024 (UTC)
- Ignore that last comment, clearly I'm too tired to be editing. Pinging @Jonesey95. — Qwerfjkltalk 19:45, 6 April 2024 (UTC)