Template talk:Convert/Archive November 2007

message: Some time ago back in August, a bot was unleashed to replace the  template with something like this: 
10 :miles :(16 :km)
The original actions of this bot were unpopular with some editors and the bot was quickly stopped (see the discussions here, and perhaps elsewhere too) - it's changes were quickly reverted on some of the affected articles.  As I suggested during those earlier discussions, I believe a better solution would be for the bot to have replaced the convert template with other smaller conversion templates.  For example, replacing  with  would transclude a whole lot less code but retain the functionality that us editors want (ie. to make it easy to update without having to get the calculator out to update the other unit as well).  
I noticed there are now a lot more conversion templates, but has anyone considered modifying the bot like in my suggestion above?
Astronaut 19:17, 27 October 2007 (UTC)
replies: text: If you will look at the section above, you will see a new "Convert" template is being designed to address the issues with code overhead while attempting work as an all-in-one template.  If successful, there will be no need a'tall for any bot-assisted replacements to take place.  Let's see how this turns out first, shall we? -- Huntster T • @ • C 19:24, 27 October 2007 (UTC)
replies: text: Oh, I'm happy to wait.  However, though I didn't read it all, it does seem most of the discussion above is about adding more complexity and more code to something that is already far too big. Astronaut 20:34, 27 October 2007 (UTC)
replies: text: The way that Jimp is building/built the "new convert" it can expand to include almost anything without bloating the code.  It's a little more complicated than that but you shouldn't have to worry about it.—MJCdetroit 00:56, 28 October 2007 (UTC)
replies: text: Yep, that's about right, adding more complexity and more code to something that is already far too big ... heaps of extra complexity and gigatonnes more code but giving us something which is smaller (significantly smaller) that what we've got.  Paradoxical?  It's just a question of how you add the code.  What counts is the pre-expand size.  Only a small amount of the new code counts to the pre-expand size of any one transclusion since the with new design only that which is needed is included.  Hence, as MJCdetroit writes, it can expand and expand without increasing the the size of any particular transclusion.  And it is expanding hence it's both true that the thing is built and still under construction—like a cancer that just keeps growing but still can make you sick at any instant. Jɪmp 06:58, 6 November 2007 (UTC)
replies: text: "like a cancer that just keeps growing but still can make you sick at any instant." ...Wow, that's such a cheery description of this pretty thing you've built. !! -- Huntster T • @ • C 09:47, 6 November 2007 (UTC)
replies: text: ...like a rose bush which keeps bringing forth new blossoms but those now in bloom still smell sweet. Jɪmp 23:42, 7 November 2007 (UTC)
thread_title:  Using a bot to replace instances of this template 

message: Will the new template convert carats and grains into grams? Lightmouse 18:21, 9 November 2007 (UTC)
replies: text: My sample sentence above (about the 180-grain bullet) was using the new template (Jimp's rebuild) which is at .  —MJCdetroit 20:09, 9 November 2007 (UTC)
replies: text: Excellent. Perhaps Template:Infobox Firearm Cartridge can be the first one to offer grains-to-grams and grams-to-grains. I think I understand the code in the template (it already has bidirectional conversions) but I am not confident enough to make the changes. Lightmouse 09:23, 10 November 2007 (UTC)
thread_title:  carats and grains 

message: It usually isn't really "singular" vs. "plural" that gives rise to the use of this parameter.  Those are terms applicable to nouns.  But where that parameter is used is generally in the case of adjectives. Maybe the reasons for using it should be explained somewhere. Gene Nygaard 12:18, 12 November 2007 (UTC)
replies: text: Yes, adj would have been better.  I don't know why sing was chosen in the first place.  As for the new version's continued use of this, well, you work with what you've got. Jɪmp 23:38, 12 November 2007 (UTC)
replies: text: However, its not something that can't be rectified.  The code could easily be has been adjusted to allow for either adj or sing until a bot has gone through and replaced the sings with adjs.  Can we get some bot expert on this one? Jɪmp 08:55, 13 November 2007 (UTC)
replies: text: However, it isn't always because of adjectives.  Sometimes it is because of singular nouns.  Gene Nygaard 11:17, 13 November 2007 (UTC)
replies: text: Just leave it with both terms.  Removing |sing doesn't make sense.  It would be like reinventing the wheel for some people. —MJCdetroit 13:13, 13 November 2007 (UTC)
replies: text: Forgive me if I state the obvious, I don't mean to be making a fool of any one, just want to clarify what meaning is intended.  Singular nouns are what you use with the number 1, e.g. 1 metre as opposed to 2 metres.  The template takes care of this automatically.  In the case of words such as stone where the plural form and the singular form are the same, e.g. 1 stone and 2 stone, the template takes care of this automatically also.  In the case of the feet where there are two acceptable plural forms, e.g. 2 feet or 2 foot, you use either ft or foot in the code depending on what you want. Jɪmp 01:01, 14 November 2007 (UTC)
replies: text: That's the whole point.  There are two different things involved, and "sing" should not be giving us "2-foot" with a hyphen.  Of course, it would be an error for the user to tell it to use singular in that case, but if you tell it to use singular in converting 0.6 from meters to feet, it shouldn't be giving us "0.6-meter" with a hyphen either.  Gene Nygaard 00:52, 16 November 2007 (UTC)

text: Furthermore, you give us one unit-specific example of using "ft" or "foot" as distinct parameters, certainly not an intuitive distinction.  But does that exist for everything else, too? What's the intuitive rule we are supposed to devine here? What do I use if I want to get "0.25 pound"?  to get "0.7 meter per second"?  to get "0.035 kelvin"?  Gene Nygaard 00:55, 16 November 2007 (UTC)
replies: text: I very much agree with you sing, short for singular, should do just that: make things singular.  Where the problem lies is in the fact that sing had in the past been used "for grammar" as past incarnations of the doc page (e.g.) will illustrate.  Poorly named but that's what it had been intended for and if you look out there in the wild, you'll see that sing has indeed been used exactly this way.  If we want it such that sing made things go singular without hyphens, it could be done.  First you'd have to check all the current singss to see that that had been what was intended (I've checked a number & found this not to be the case) and change them over to adjs where appropriate (i.e. everywhere or at least almost everywhere).  That done, the template could be adjusted to allow for sing to give singular without hyphens.  That's one thing you could do if you "want to get '0.25 pound'?  to get '0.7 meter per second'?  to get '0.035 kelvin'?"  Another thing you could do is just type them out ... My question is why you'd want such things in the first place, we use the singular form with adjectives and the number one and the plural form otherwise in English. Jɪmp 00:19, 20 November 2007 (UTC)
replies: text: It should be singular for all numbers whose absolute value is greater than zero and less than or equal to one.  Gene Nygaard (talk) 18:13, 20 November 2007 (UTC)
replies: text: In that case it should be done automatically ... it didn't sound right to me, 0.5 metre, but on thinking about it I realised that I wouldn't say 0.5 metres either.  I'd say 0.5 of a metre but that's not what you'd write in an encyclopædia.  Jɪmp 09:27, 22 November 2007 (UTC)
thread_title:  That "singular" terminology 

message: Look at Mount St. Helens elevation data, it seems Template:Convert/LAonDbSoff is broken. It affects :Template:Unit_ft. feydey 16:11, 12 November 2007 (UTC)
replies: text: See also broken links in :Category:Unit_display/tests. feydey 16:14, 12 November 2007 (UTC)
replies: text: I reverted the change to the NEW version.  It seems that we are going to have to get a bot to convert the Unit_display templates to use convert syntax.  I'll see what I can come up with.  —MJCdetroit 16:34, 12 November 2007 (UTC)
replies: text: I've got a bot working to switch some of those Unit display templates over to the convert syntax.  When that is done, we can update to the new version [again] and see if there are any more surprises.  —MJCdetroit 21:23, 12 November 2007 (UTC)
replies: text: There is no Template:Convert/LAonDbSoff.  My guess is that someone left lk blank. Jɪmp 23:41, 12 November 2007 (UTC)
replies: text: Those Unit display templates have |lk= in them.  That's our problem.  It's got to be changed to |lk=off.  I've done a couple of them but I've got to go. Jɪmp 00:12, 13 November 2007 (UTC)
replies: text: I've been through the Unit display template category & fixed those broken templates.  We should be good to go. Jɪmp 03:03, 13 November 2007 (UTC)
thread_title:  Broken template transcluded on many articles 

message: The instruction page shows an error. It says:
* (Expression error: Missing operand for * )
Lightmouse 21:27, 12 November 2007 (UTC)
replies: text: Because we had to revert to the old version until the Unit display templates (which are a wrapper for this template) can be switched over; see above.  That error will fix itself when the New version is back online (in the next 10 hours).  —MJCdetroit 21:30, 12 November 2007 (UTC)
replies: text: Aha. Thanks for clarifying that. Lightmouse 21:41, 12 November 2007 (UTC)
thread_title:  Code error showing on the instruction page 

message: See Special:Whatlinkshere/Template:Convert/LAoffDbSoff. I don't know whether this template should exist or the call is made incorrectly; in any case, something needs to be fixed (I just fixed something on Dead Sea by removing a lk=, but wanted to make sure the experts for this template know of the problem). Happy editing, Kusma (talk) 13:37, 13 November 2007 (UTC)
replies: text: This subtemplate does not exist: .  Perhaps Jimp can create it.  The problem happens when |lk= is present but left empty, e.g.:  --> .  —MJCdetroit 14:14, 13 November 2007 (UTC)
replies: text: I've created it. Jɪmp 01:37, 15 November 2007 (UTC)
thread_title:  Some display errors 

message: Just discovered this having previously wished for just such a feature without looking in to it any further. I don't know if theres a list of the most used/useful templates, but I seem to learn of them by actually seeing them in use. Would it be worth adding currency conversion ? Thanks -- John (Daytona2 · talk) 14:00, 16 November 2007 (UTC)
replies: text: Currency exchange rates change minute to minute unlike the stuff converted here which almost never change.  There will probably always be 12 inches in a foot, three feet in a yard, 100 cm in a meter, etc.  —MJCdetroit 15:41, 16 November 2007 (UTC)
replies: text: And 147⁄12 ounces in a pound (at least when Encyclopædia Britannica is talking about gold, and maybe Wikipedia too?)  -- Gene Nygaard (talk) 20:14, 16 November 2007 (UTC)

text: How patronising. Where amounts in different minor currencies are converted, for instance to dollars to aid a larger audience, and point in time exchange rates are not required, it would be helpful to provide more up to date info. even if it's not at the milliseconds latest exchange rate. -- John (Daytona2 · talk) 20:22, 16 November 2007 (UTC)
replies: text: First, how are MJCdetroit's words patronising?...he was simply laying an example.  Second, currency cannot be properly converted using a static template...monetary values fluctuate significantly over any period of time.  The only viable solution would be to use values from a fixed point in time, say, the year 2000.  However, that isn't going to be hugely valuable to a given user since the value of currency from that year isn't going to be nearly the same as current value, both against itself and against other currencies.  There are a terrific number of problems when dealing with this situation.  We are far better off directing readers (where applicable) to an external site like finance.yahoo.com or similar site. -- Huntster T • @ • C 02:26, 17 November 2007 (UTC)
replies: text: I found the second sentence patronising. I understand the issue between fixed and varying conversions, I simply thought that just about anything is better than the current situation. -- John (Daytona2 · talk) 16:05, 17 November 2007 (UTC)
replies: text: It's not impossible.  This template could even be adapted to handle this ... though writing a new one would probably make more sense.  You'd just have to add a parameter to specify the date (& time) conversion is to be done.  It wouldn't be easy though, so many currencies, so many dates ... I'm afraid you'll probably have to stick to tables. Jɪmp 04:32, 21 November 2007 (UTC)
thread_title:  Excellent template thanks ! 

message: Is it the intention to include the functions of the many 'Auto' templates such as Template:Auto horsepower?
Lightmouse (talk) 10:19, 22 November 2007 (UTC)
replies: text: I have got started on power (horsepower, watts, kilowatts, ... work).  I intend to include the others as well.--Jɪmp 16:56, 25 November 2007 (UTC)
replies: text: Thanks. Your work is much appreciated. Lightmouse (talk) 21:08, 25 November 2007 (UTC)
thread_title:  The 'auto' conversion templates 

message: Is there a way to get the template to read "acre" instead of "acres", much the same way we have the option of "foot" or "feet"? Murderbike (talk) 19:57, 23 November 2007 (UTC)
replies: text: Use acre-sing ... at least until someone comes up with a better code. --Jɪmp 17:20, 25 November 2007 (UTC)
thread_title:  Tweak 

message: I keep seeing funny conversion templates. I would be happy to update my monobook script to replace them on sight. It already replaces 'km:h' in the code with 'km/h'. Perhaps a bot could search and replace the many ad hoc templates with this one.
The use of 'mi to km|187|round' produces a fault at Willamette River. It also contains 'CubicFeetPerSecAndMeters|67800|round'/
What do people think? Lightmouse (talk) 20:37, 28 November 2007 (UTC)
replies: text: I don't see anything wrong with  in that article.   there fails because the parameter starts with a space.  Could you, please, clarify?—Ëzhiki (Igels Hérissonovich Ïzhakoff-Amursky) • (yo?); 20:52, 28 November 2007 (UTC)
thread_title:  Some other funny conversion templates