Jump to content

Template talk:Short description/lowercasecheck

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia

This is an old revision of this page, as edited by Dinoguy1000 (talk | contribs) at 03:39, 7 April 2024 (→‎ucfirst?: should be lcfirst given the order of results). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

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)[reply]

@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)[reply]

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)[reply]

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)[reply]
Ignore that last comment, clearly I'm too tired to be editing. Pinging @Jonesey95. — Qwerfjkltalk 19:45, 6 April 2024 (UTC)[reply]
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)[reply]