Template talk:Convert/Archive May 2014
This is an archive of past discussions about Template:Convert. Do not edit the contents of this page. If you wish to start a new discussion or revive an old one, please do so on the current talk page. |
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)
- Sorry, I'm wrong about this. Tropic of Cancer and Tropic of Capricorn don't use the template, even though it was clearly intended that they should, using the syntax "Circle of latitude|Tropical". I don't know why that is. 86.169.185.1 (talk) 02:41, 8 May 2014 (UTC)
- I guess you know about using "what links here": Special:WhatLinksHere/Template:Circle of latitude. That shows a total of eight pages using the template. You might find someone at WT:WikiProject Geographical coordinates who could offer some useful thoughts (I found that by looking at the headers at the top of Talk:Circle of latitude). Johnuniq (talk) 06:13, 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+1⁄2 metres (140 in)
This is the keyboard slash U+002F / SOLIDUS (/). In typography, and in our {{frac}}, another character is used: 3+1⁄2. 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+1⁄2 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 accepting3-1/2
to mean2+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:
- {convert|6|-|7|m|ft}} = 6–7 metres (20–23 ft), with hyphen
- {convert|6|–|7|m|ft}} = 6–7 metres (20–23 ft), with dash
- {convert|6|‑|7|m|ft}} = 6 ‑[convert: unknown unit], with wp:NBHYPHEN
- {convert|6|‑|7|m|ft}} = 6 ‑[convert: unknown unit], with wp:NBHYPHEN
- 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+3This userpage has been blanked. If this is your userpage, you can retrieve the contents of this page in the page history. Alternatively, if you would like it deleted, simply replace the content of this page with {{db-u1}}. - {convert|pi |m |ft }} = [convert: invalid number], with pi
- {convert/old|pi|m|ft}} =
, with piThis userpage has been blanked. If this is your userpage, you can retrieve the contents of this page in the page history. Alternatively, if you would like it deleted, simply replace the content of this page with {{db-u1}}. - {convert/old|2*pi|m|ft}} =
, with 2*piThis userpage has been blanked. If this is your userpage, you can retrieve the contents of this page in the page history. Alternatively, if you would like it deleted, simply replace the content of this page with {{db-u1}}. - {convert|π|m |ft }} = [convert: invalid number], with π
- {convert |2+1/2 |ft |3/4 |in}} = 2+1⁄2 feet 3⁄4 inch (0.781 m)
- {convert/old|2+1/2|ft|3/4|in}} =
This userpage has been blanked. If this is your userpage, you can retrieve the contents of this page in the page history. Alternatively, if you would like it deleted, simply replace the content of this page with {{db-u1}}.
- 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)
- About the last example: could not find this option in Help:convert (current documentation).
The /old outcome is wrong or misleading.-- it is now. -DePiep (talk) 12:13, 14 May 2014 (UTC) - Help:convert documents that {{#expr:}} is to be used in calculations:
- {{convert|{{#expr:pi * 2}}|in|m}} → 6.2831853071796 inches (0.15959290680236 m)
- About the last example: could not find this option in Help:convert (current documentation).
-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
Documentation text, now in Help:Convert#Wrapping_and_line_breaking
|
---|
Wrapping is possible where a regular space (" ") is used. Nowrap is enforced by using nonbreaking space (
In the examples below, a A line break (<br/>) overrules any nowrap setting at that point.
The separator between the value and the unit can be a space or a nonbreaking space (
To see the wikicode result of the convert template: put your |
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)
- Started the join & linebreak entries. Could use a check for completeness. -DePiep (talk) 07:55, 17 May 2014 (UTC)
- We could write the examples like 2_metres_(6_ft_7_in). -DePiep (talk) 10:53, 16 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 links
{{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)
- 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)
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:
- GWR 1101 Class
{{TonCwt to t|38|4|LT}}
→ {{TonCwt to t|38|4|LT}} - Great Western Railway Power and Weight Classification
{{TonCwt to t|22|10|lk=on}}
→ 22 long tons 10 cwt (50,400 lb or 22.9 t) - NER 38 Class
{{TonCwt to t|14|12|lk=on}}
→ 14 long tons 12 cwt (32,700 lb or 14.8 t) - GWR 378 Class
{{TonCwt to t|15|2|lk=on}}
→ 15 long tons 2 cwt (33,800 lb or 15.3 t)
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)
- OK,I posted at Template talk:Convert/TonCwt to t#Just curious Peter Horn User talk 01:01, 9 May 2014 (UTC)
- PS what is the link to the relevant project page? Peter Horn User talk 14:05, 8 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)