Last modified: 2011-03-13 18:06:23 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T9723, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 7723 - Add initial case colon function(s)
Add initial case colon function(s)
Product: MediaWiki
Classification: Unclassified
Page editing (Other open bugs)
All All
: Lowest enhancement with 2 votes (vote)
: ---
Assigned To: Nobody - You can work on this!
Depends on:
  Show dependency treegraph
Reported: 2006-10-27 01:20 UTC by Danny B.
Modified: 2011-03-13 18:06 UTC (History)
0 users

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Description Danny B. 2006-10-27 01:20:33 UTC
Please add {{ic:}} (from: Initial case, or choose another name) which will
behave like

{{ucfirst:{{lc:<string>}}}} per entire string (icfirst) and per each word (ic).

{{ic:lorem ipsum}} = Lorem Ipsum
{{ic:LOREM IPSUM}} = Lorem Ipsum
{{icfirst:lorem ipsum}} = Lorem ipsum
{{icfirst:LOREM IPSUM}} = Lorem ipsum

Comment 1 Aryeh Gregor (not reading bugmail, please e-mail directly) 2006-11-03 03:32:29 UTC
If this is added, the standard term is "titlecase", so "tc".
Comment 2 Rob Church 2006-11-03 03:36:12 UTC
Well, title case keeps things like "or" and "the" as lowercase-first, unless at
the start, so technically not...
Comment 3 Andrew Garrett 2006-11-03 03:37:13 UTC
Right. But it's closer to the mark than "Initial case".
Comment 4 Rob Church 2006-11-03 03:40:26 UTC
Hm, interesting. Yet the user making the request seemed to prefer "initial
case", so perhaps from a user point of view, it's not. Then again, all users are
not alike. Conclusion? Add them as aliases of each other, and be done with it.
Comment 5 Andrew Garrett 2006-11-03 03:41:33 UTC
I'm willing to take a look at it. Just need to teach myself how to make these
colon functions. I'll definitely check with others before committing it, though.
Comment 6 Andrew Garrett 2006-11-03 05:26:01 UTC
Fixed in r17367, after discussion on IRC with Simetrical.
Comment 7 Brion Vibber 2006-11-03 08:37:36 UTC
Reverted in r17375; there's no clear use for this function and it would produce obviously incorrect 
results for mixed-case or all-caps words.

Please avoid feature creep, *especially* in the parser. New functions must be supported forever 
for compatibility, which we shouldn't have to do for useless things.
Comment 8 Danny B. 2006-11-17 01:45:52 UTC
Reopening, because:

I think at least {{icfirst:}} can be realized with no doubts.

As been said in comment #0
{{icfirst:<string>}} = {{ucfirst:{{lc:<string>}}}}
{{icfirst:lOrEm IpSuM}} = {{ucfirst:{{lc:lOrEm IpSuM}}}} = Lorem ipsum

I guess calling of one colon function is much nicer for parser than calling of
two of them nested whereas {{icfirst:}} has pretty wide usage ability.

Regarding {{ic:}}:
This was meant to make initials on each word in string regardless if it's
article or preposition or so, therefore it was *not* intended to be use as
regular titlecase. Actually it was born just as an complement (to have entire
pair such as other similar functions) of {{icfirst:}}, which was the original
purpose of this request. So it's not necessary to implement it, although I can
imagine useful cases.
Comment 9 Aryeh Gregor (not reading bugmail, please e-mail directly) 2006-11-17 01:57:35 UTC
Both are feature creep.  Neither is terribly useful.  Robust string functions of
some type might be added to ParserFunctions someday, which would allow you to do
this kind of stuff and more, but a special tag for this in the parser itself is
no good, and of dubious utility even in ParserFunctions (as opposed to more
generalized functions that can produce this as well as more useful things).

Note You need to log in before you can comment on or make changes to this bug.