Jump to content

Template talk:Convert/Archive May 2014

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


Template:Circle of latitude

Hi, I'm raising this here because the talk page of the template itself does not exist, and I see that there is some traffic here of people who may be able to help with it, as it is in the "Conversion templates" category.

In the articles Arctic Circle and Antarctic Circle, the template "Circle of latitude" is invoked to supply the figure for latitude, which is said in the articles to be as of 2012. However, there is no template documentation to indicate when the figure was last updated, and nothing to indicate that if one does change it then one should also change the "as of" date that is mentioned in articles that use it. In fact, it seems from the edit history that the figures have not been updated since 2010. The articles Tropic of Cancer and Tropic of Capricorn, which use the same template,* say that the date is as of 2014.

I think maybe in 4 years there could have been a small change to the least significant digit at the accuracy quoted, which is not a huge deal at the moment, but nevertheless the way this is currently organised is obviously very unsatisfactory for maintenance. Ideally, the "as of" date should be maintained once, in the template, and this should be automatically inserted into articles that use it. 86.169.185.1 (talk) 02:14, 8 May 2014 (UTC)

Double conversion, convert/spell

For Seboomook Lake and Saint John Railroad#History, {{convert/spell|8|to|10|cord|m3|lk=on}} instead of {{convert|8|to|10|cord|m3|lk=on}} eight to ten cords (29 to 36 m3) instead of 8 to 10 cords (29 to 36 m3). Peter Horn User talk 17:00, 9 May 2014 (UTC)

see the last time you asked. Frietjes (talk) 17:13, 9 May 2014 (UTC)
My grandson Jozua tells me that I have the memory of a gold fish. Peter Horn User talk 02:29, 13 May 2014 (UTC)

fraction slash

{Convert} now accepts the slash in fractions.

  • {{convert|3+1/2|m|in}} → 3+12 metres (140 in)

This is the keyboard slash U+002F / SOLIDUS (/). In typography, and in our {{frac}}, another character is used: 3+12. That is U+2044 FRACTION SLASH (⁄).

We could consider that if it is correct in typography, {convert} should accept it as correct number input.

  • {{convert|3+1⁄2|m|in}} → 3+12 metres (140 in) -- U+2044 used

I met this when I did a copy-paste with a frac number. There also exists U+2215 DIVISION SLASH, which I have not researched yet. I note that with fractions input, the ambivalent "3-1/2" input is still accepted: [convert: invalid number]. -DePiep (talk) 10:22, 13 April 2014 (UTC)

Sorry to be a wet blanket, but unpicking the code that parses input numbers, including fractions, still is unappealing. One problem is that there are several alternatives that might be useful once or twice—if supporting fraction slash, why not support ⁄ and ⁄ because they look the same when viewing wikitext? I would have thought that using fractions for input was fairly rare, and since an editor has to insert a + before the numerator, they may as well also use a plain slash. I agree that accepting 3-1/2 to mean 2+1/2 is a bad idea. I'll put that on my to-do list. Johnuniq (talk) 02:29, 14 April 2014 (UTC)
As one can read, no "problem" involved. I only want to introduce the point that when some text is an accepted number, {convert} should have to eat it as a number. This is a next design step, after the (great & good) design step to repleace {convert}-wikitext 1:1. So, now that we are free of wikitext, we can propose to redesign the module. -DePiep (talk) 00:57, 26 April 2014 (UTC)
  • Fractions are more rare than dash ranges: Indeed, fractions are extremely rare in conversions, when compared to dash-ranges, although ironically, in real-world text, the text-slashes are 3x times more common than dashes (as in "April/May"). Consequently, {convert} has needed to handle unicode en dash "–" in several pages. So rather than support &frasl input, the higher priority is for dash-ranges or wp:non-breaking hyphen (&8209), as follows:
Currently, when people request unusual formats, we suggest they hand-code the conversion with whatever slashes or other characters are needed in the output. -Wikid77 (talk) 05:29, 14 April 2014 (UTC)
No priority or tradeoff was claimed here. It is just that the (higher) aim should be to accept accepted numbers. -DePiep (talk) 17:18, 14 April 2014 (UTC)
  • For more accepted numbers, use {convert/old}: The prior, wikitext-based {{convert/old}} allows other forms of accepted numbers, such as "2+3" or "pi" metres. Compare:
  • {convert|2+3 |m |ft }} = [convert: invalid number], with 2+3
  • {convert/old |2+3|m|ft}} = , with 2+3
  • {convert|pi |m |ft }} = [convert: invalid number], with pi
  • {convert/old|pi|m|ft}} = , with pi
  • {convert/old|2*pi|m|ft}} = , with 2*pi
  • {convert|π|m |ft }} = [convert: invalid number], with π
  • {convert |2+1/2 |ft |3/4 |in}} = 2+12 feet 34 inch (0.781 m)
  • {convert/old|2+1/2|ft|3/4|in}} =
To allow a larger variety of fraction inputs, then create a {convert/frac} wp:wrapper template to transform other fraction symbols into {convert} syntax. -Wikid77 (talk) 11:55, 14 May 2014 (UTC)
{{convert|{{#expr:pi * 2}}|in|m}} → 6.2831853071796 inches (0.15959290680236 m)

-DePiep (talk) 12:09, 14 May 2014 (UTC)

Wrap behavior

What is the wrap behavior (default & options)? Especially between the basic two output units (their joint). Internally a measurement is nowrap, OK. Help page gives option |disp=br, which is clear. -DePiep (talk) 12:59, 15 May 2014 (UTC)

The details are ugly, but something should be documented. You are possibly only asking about Help:Convert#Joins, but other cases also need documentation, so I have added the "Separators" section below with nearly all the details, I think. The notes should be recast in terms of wrapping, and perhaps {{nowrap}} should be mentioned. I'll put some of this at Help:Convert later, but most of it should be in an "advanced" section for anyone wanting details because including all this in the standard documentation would make too much of an impenetrable mess. Johnuniq (talk) 06:52, 16 May 2014 (UTC)
Great, as always. I was expecting a yes/no answer ;-). I've shuffled your points, as a proposal (towards documentation). -DePiep (talk) 10:44, 16 May 2014 (UTC)

Wrapping and line breaking

Johnuniq (talk) 06:52, 16 May 2014 (UTC)

Proposal by edit: use terms "measurement", "component" with consistent meaning, and group existing points. Added ;label subheaders. Add "nowrap" starting point. -DePiep (talk) 10:40, 16 May 2014 (UTC)
Same for section title: "Wrapping and line breaking". Use a singular meaning in documentation helps. -DePiep (talk) 10:47, 16 May 2014 (UTC)
We could write the examples like 2_metres_(6_ft_7_in). -DePiep (talk) 10:53, 16 May 2014 (UTC)
Started the join & linebreak entries. Could use a check for completeness. -DePiep (talk) 07:55, 17 May 2014 (UTC)
Formatting. A rule has the bullet, the examples indent. (prepare for help documentation) -DePiep (talk) 07:07, 19 May 2014 (UTC)
More formatting and ce, Introduced the _ form for nbsp. -DePiep (talk) 08:07, 19 May 2014 (UTC)
  • Johnuniq@ About the first three "Except, ..." rules above. As they show now, it is not clear for which rule they are an exception: only #3 "Some units do ..", or for #1, #2, #3 together?
I think this can be made unambiguously clear by reordering the bullets and/or indenting the exceptions. Or if you simply answer here, I can do the layout. (Of course I could deduct this by trials, but that would be a tough job). -DePiep (talk) 08:07, 19 May 2014 (UTC)

I've added this section to Help:Convert#Wrapping_and_line_breaking (new). Whenever an "advanced" help or documentation is developed, parts could move there. -DePiep (talk) 11:07, 25 May 2014 (UTC)

Thanks. Johnuniq (talk) 11:25, 25 May 2014 (UTC)

{{TonCwt to t|19|10|lk=on}}19 long tons 10 cwt (43,700 lb or 19.8 t) does not link to long ton as in does in {{convert|19|LT|lk=on}} 19 long tons (19 t). And cwt and t are not linked at all. Why? Peter Horn User talk 04:41, 7 May 2014 (UTC)

I don't know, but the documentation at {{TonCwt to t}} specifies that behavior, saying it is traditional for certain locomotives. That template is used on 266 articles so it's probably not a good idea to change what it does without a wide discussion on the relevant wikiproject talk. Johnuniq (talk) 05:38, 7 May 2014 (UTC).
Traditional, or not traditional, I fail to understand how a blanket link to avoirdupois is very helpfull, unless one is prepared to scroll through the article. Separate links to long ton and long hundredweight would perhaps he more useful7helpful. Peter Horn User talk 17:38, 7 May 2014 (UTC)
For Locomotive No. 1, {{TonCwtqtr to t|26|1|1}} {{TonCwtqtr to t|26|1|1}} Peter Horn User talk 04:23, 8 May 2014 (UTC)

I checked all usage of the template in articles as they were at 2 May 2014. The template is used 605 times in 251 articles. Almost all of them are like "{{TonCwt to t|12|3}}", and the only exceptions are:

If you think the template should do something different, I suggest you copy this comment (edit it however you like) to the relevant wikiproject. Make a proposal for how the lk=on examples should look, and allow at least two days for comments. If no objections, reply here with a link to the discussion and someone will probably help to change the template. Johnuniq (talk) 06:03, 8 May 2014 (UTC)

After going systematically through {{VRLocos}} I found a number of additional exceptions. The usage is consistently inconsistent. Peter Horn User talk 14:02, 8 May 2014 (UTC)
PS what is the link to the relevant project page? Peter Horn User talk 14:05, 8 May 2014 (UTC)
OK,I posted at Template talk:Convert/TonCwt to t#Just curious Peter Horn User talk 01:01, 9 May 2014 (UTC)
Any change to that template would affect the articles I listed above. Looking in the headers at the top of the talk page for each article shows the relevant wikiprojects. I would say that only WT:WikiProject Trains is active, and a proposal should go there. Show the current output from one of the above examples, and add the wikitext to show what you believe the result should be. Invite comments. If no objections in two days ask someone to change the template. Johnuniq (talk) 06:32, 9 May 2014 (UTC)
I put a post at Wikipedia talk:WikiProject Trains#A small problem referring back to Template talk:Convert/TonCwt to t#Just curious. Peter Horn User talk 12:28, 9 May 2014 (UTC)
And that is where there are additional posts/comments. Cwt is now linked,see above. Peter Horn User talk 14:03, 27 May 2014 (UTC)