Get our free book on rainwater now - To Catch the Rain.

Talk:Arduino

From Appropedia
Jump to: navigation, search

Template:Convert[edit]

Tried to get the in to mm conversion working from wikipedia-- getting errors -- if anyone that is more familiar with templates could have a look - it would be most appreciated. --Joshua 19:17, 2 January 2013 (PST)

If it were just a dependency issue (i.e. we need to import more templates from Wikipedia) then I could help. From a quick look, I'm not seeing that issue, though.
(I will do some bulk template importing regardless. You can add any desired Wikipedia templates to the list at User:Chriswaterguy/Tech/Importing templates with dependencies #Next templates to import and I'll get to it. Let me know if you have urgent requests - otherwise I'm planning to leave it for a month or two. Doing the importing this way is very involved, but if I do a big batch, it's much more efficient than copying them one-by-one.)
Assuming it's something other than dependencies, User:Teratornis & User:RichardF are the experts... I've pinged Teratornis, as it seems like something he's most likely to know. --Chriswaterguy 04:55, 3 January 2013 (PST)
See my notes at User:Teratornis/Tasks#Template:Convert. For general template porting instructions see User:Teratornis/Template porting: theory and practice. {{Convert}} may be one of the most difficult templates to port from Wikipedia to non-Wikimedia wikis. I asked for pointers in two places on Wikipedia (see my notes for links) and nobody responded as far as I see. Here is a search to see what other non-Wikimedia wikis may have done:
One of the search results shows a primitive (i.e. simple and unmaintainable) version of the template that may correspond to one of the simple and unmaintainable versions from years ago on Wikipedia. The problem with that approach is that as people invariably try to add support for more unit conversions, eventually the template breaks. The version now on Wikipedia is designed (after several massive re-designs over the years) to handle arbitrarily many units, and pushes the Wikipedia template language (which is rudimentary at best as a programming language) to its limits. The various language Wikipedias seem to have a mess of incompatible flavors of the template, with most being years behind Wikipedia's comprehensive version. I can't begin to guess how long it would take to port this template and its hundreds (thousands?) of dependencies to Appropedia. It would probably take some hours of work just to get a handle on how difficult this is. Ideally we'd find someone else with a small non-Wikimedia wiki similar to Appropedia who has ported the latest Wikipedia version and (against all odds) documented how they did it. I recommend practicing any difficult porting project first on a test wiki rather than the production version of Appropedia. Littering Appropedia with the incomplete results of template porting attempts is worse than having no templates under the resulting names, because other editors may try to use the templates, only to waste their time figuring out that they don't really work. A template like {{Convert}} will appear in many articles that people block-copy from Wikipedia, and it's better to have a red link than a non-functioning template which doesn't announce itself. Of course one could edit the broken template to display a message that it isn't working yet, with a link to a page documenting the state of the porting attempt, in case anyone should want to try finishing it. --Teratornis 11:22, 5 January 2013 (PST)
Thanks, Teratornis.
We do have a dev wiki, if anyone's interested in trying. Lonny could give access (& I think I have the access details also).
The process I've worked out seems pretty reliable for small batches of templates... but importing a large xml file through Special:Import has given me problems in the past. (Maybe the new server has improved that, though.) --Chriswaterguy 17:41, 5 January 2013 (PST)
I added a few more templates and the conversions seem to be working fine now. As it turns out, I typically use a very simple process that seems to work more time than not. Put a template on a page, preview it and fill in the red links under "Templates used in this preview:" until they disappear...for as many templates down the chain as it takes. Complex templates like {{Convert}} likely still will have plenty of red affiliated links, but they can be followed on the next page where it doesn't work. Copying over the documentation helps follow the trails of what's still red over here and what they might do if they were here, not to mention how to use the dang things once they get here! ;-) --RichardF 20:18, 12 March 2013 (PDT)
Awesome! --Lonny 19:01, 13 March 2013 (PDT)