First of all, thanks for your replies.
In short, in my first message, I failed to explain the targeted use case - which has somehow moved away from BUG-235. So here it is: o I was targeting general MediaWiki wikis, not necessary Wikipedia o My primary concern was to allow an administrator to easily add support for conversion. Without relying on the end-users (the "contributors") good will or technical knowledge.
Now for the long answer.
wiki@konsoletek.com wrote:
{{Convert}} on Wikipedia isn't one single fancy template, it is actually several hundred.
I think it is actually several hundred with the new design (as of NOV-2009), but the old design was requiring several thousands (!) templates. According to [1] with the new design "new options could be implemented by changing just a few subtemplates, rather than hundreds at a time".
jcsahnwaldt@gmail.com wrote:
Why not just use http://en.wikipedia.org/wiki/Template:Convert ?
On its side, {{Convert}} has the advantage of being able to convert many different things. Keeping it with the vast diversity of knowledge carried by wikipedia (from converting musical notes to pitch [3] to converting weapon calibres [4], all of this with several different algorithms). Moreover, by working at "template level", any contributor is able to edit/update/fix it. Without requiring any special privilege.
Someone may argue that it has its own drawbacks[2], but anyway Wikipedia is a special case: it has enough manpower to fix and/or update both this template and the articles that uses (or should use) it.
This is simply not the case for the general MediaWiki user. I think of one "in house" wiki that requires handling of some fancy units. Like expressing quantities as kibibytes as well as kilobytes. Or express throughput as bytes/s or bits/s. Eventually using those values for producing embedded graphics. I don't think those units are supported by {{Convert}} now, and the point is that it requires a substantial amount of work for a non-specialist of that template to add support for them. For small wikis, I think it is more effective to let the administrator install a new extension or edit a few lines of PHP to provide the support for a new conversion.
Aryeh Gregor Simetrical+wikilist@gmail.com wrote:
The idea would be something like:
{{#unit: 1000 ft|m}} => <span title="304m (1000ft)">304m</span>
It would make more sense to have it output simply "304". That way it could be effectively used in a template to achieve any desired formatting.
I agree with that. In order to be effectively used in template, the "converter" should only perform the conversion and let the formating at the caller's charge.
Last, but not least, I spend a few hours this WE working on a prototype. It sounds promising. I intend to upload a demo in the following hours.
Best regards, Sylvain.
---- [1] http://en.wikipedia.org/wiki/Wikipedia:A_plan_to_reduce_Convert_subtemplates [2] http://en.wikipedia.org/wiki/Wikipedia:Analysis_of_Template:Convert_problems [3] http://en.wikipedia.org/wiki/Template:Convert/note [4] http://en.wikipedia.org/wiki/Template:Convert/calibre
Aryeh Gregor a écrit :
On Fri, Nov 20, 2009 at 12:04 AM, Sylvain Leroux sylvain@chicoree.fr wrote:
The idea would be something like: {{#unit: 1000 ft|m}} => <span title="304m (1000ft)">304m</span>
It would make more sense to have it output simply "304". That way it could be effectively used in a template to achieve any desired formatting.
_______________________________________________ Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l