Template talk:Convert/Archive December 2019

Latest comment: 4 years ago by Johnuniq in topic CSS class

Template:Tropical cyclone classification

Would anyone familiar with how the convert template works, be able to answer this query? Jason Rees (talk) 21:28, 6 December 2019 (UTC)

That has been handled. Johnuniq (talk) 22:26, 6 December 2019 (UTC)

Feet and inches

I can find how to convert from metres into feet and inches. But how do I do it the other way around? 86.164.61.113 (talk) 18:05, 10 December 2019 (UTC)

Search for "Multiple units" on the template page. Browsing Help:Convert might also be useful for some issues. Unfortunately, the many options make finding what is possible difficult. Examples:
  • {{convert|3|ft|6|in}} → 3 feet 6 inches (1.07 m)
  • {{convert|3|ft|6+3/4|in|cm}}3 feet 6+34 inches (108.6 cm)
Johnuniq (talk) 22:38, 10 December 2019 (UTC)
Many thanks 86.164.61.113 (talk) 14:00, 11 December 2019 (UTC)

Troy weights

It seems like Troy weights in the template have a couple issues:

  1. The troy pound (lb t) doesn't have an abbreviation at all; it always outputs the name of the unit.
  2. The abbreviation for the troy ounce (oz t) doesn't have a (non-breaking) space between the "oz" and the "t".

Getsnoopy (talk) 07:51, 16 December 2019 (UTC)

Examples:
  • {{convert|12|ozt|abbr=off}} → 12 troy ounces (13 ounces; 370 grams)
  • {{convert|12|ozt|abbr=on}} → 12 ozt (13 oz; 370 g)
  • {{convert|12|lbt|abbr=off}} → 12 troy pounds (9.9 pounds; 4.5 kilograms)
  • {{convert|12|lbt|abbr=on}} → 12 troy pounds (9.9 lb; 4.5 kg)
Last time I checked (20 April 2019), Dynamite was the only article using lbt and it uses it like this:
  • {{convert|1/2|lbt|g|order=flip}}190 grams (12 troy pound)
Changing lbt would have little effect and I'm not sure about whether 190 grams (12 lb t) would be an improvement. I see that MOSNUM specifies "troy pound" and "lb t". That appears to have been added some time around April 2014 because this 21 January 2014 revision doesn't have it. Probably convert's behavior predates that. Convert took the view that some unit symbols, such as lbt for troy pound, would be unfamiliar to general readers and should not be abbreviated.
There were 778 converts using ozt in articles, and 545 of them abbreviate and show "ozt". MOSNUM wants "troy ounce" and "oz t".
I suppose the symbols for both lbt and ozt could be made MOS compliant in the next update. Thoughts? Johnuniq (talk) 09:09, 16 December 2019 (UTC)
I didn't know that MOSNUM already specified these, which is even more reason to be compliant with it. I think regarding unfamiliarity, especially since linking of units is allowed, that should take care of that issue and we should let editors use the abbreviations at their discretion. Let's change it. Getsnoopy (talk) 17:46, 16 December 2019 (UTC)

Edit request: link for standard cubic foot

The units scf and scfoot for standard cubic foot are currently linked to Atmosphere (unit). Is this for a specific purpose or could the link be updated to Standard cubic foot? Can this kind of update be added directly to the page conversion_data? Ws1920 (talk) 12:46, 8 December 2019 (UTC)

For completeness (not relevant to this proposal), I'll mention that scy was discussed in September 2014, and an attempt to clean up all links occurred in February 2018. The latter points to Module talk:Convert/show which lists all links for defined units. I just examined the code to see why it does not mention scy—the reason is that it cleverly displays only unique links and since the unit atm has Atmosphere (unit) as its link, any additional units with the same link are not listed. That was to reduce the number of entries that needed to be checked—the main motivation was to find red links due to articles having been changed over the years.
As a quick workaround I have added two temporary units (scf2 and scfoot2) that you can use. Assuming they are used, they will eventually be replaced with the standard units (scf and scfoot) when those units have been updated to use Standard cubic foot as the link. I will do that when the module is next updated, which won't be for a while. Examples:
Johnuniq (talk) 05:56, 9 December 2019 (UTC)
Thanks a lot Ws1920 (talk) 20:27, 17 December 2019 (UTC)

x inch/cm wide by y inch/cm high

Is there a way to convert expressions such as "two-inch-wide by 2.5-inch-high screen" or "24 inches wide by 30 inches high"? Or maybe the best thing to do is to rephrase them?--Carnby (talk) 14:37, 22 December 2019 (UTC)

{{convert|24|x|30|inch|0|abbr=on}} gives 24 in × 30 in (610 mm × 762 mm)
{{convert|24|by|30|inch|0|abbr=on}} gives 24 by 30 in (610 by 762 mm)  Stepho  talk  14:44, 22 December 2019 (UTC)
I mean 24 in wide × 30 in high (610 mm high × 762 mm wide) (with high and wide after inch/cm).--Carnby (talk) 16:59, 22 December 2019 (UTC)
Wouldn't rephrasing to "{{convert|24|inch|0|abbr=on}} wide × {{convert|30|inch|0|abbr=on}} high" → "24 in (610 mm) wide × 30 in (762 mm) high" work just as well, with the same idiom? --RexxS (talk) 19:44, 22 December 2019 (UTC)
I decided to write "{{convert|24|by|30|in|cm}} (width by height)" which gives "24 by 30 inches (61 by 76 cm) (width by height)".--Carnby (talk) 08:50, 27 December 2019 (UTC)

CSS class

Could this template add a CSS class to the converted text so that I would be able to hide it? It is extremely annoying to read articles overloaded with this converted stuff when you don't need it. — Preceding unsigned comment added by 192.164.153.161 (talk) 14:12, 15 December 2019 (UTC)

Definitely, please!
I'm planning to convert the tables in paper size to use this template and it would be great if this had the additional benefit of making the inch columns hideable. That means, I would like to keep th conversions to metric units, but hide the ones in English units. — Christoph Päper 23:50, 28 December 2019 (UTC)

Some inconclusive discussions were:

I wonder if the tables at Paper size are showing some "standard" measurements that would not necessarily correspond with an exact conversion. I know A4 etc. are defined rigorously and presumably an automatic conversion to inches would work for them. Does that apply to other sizes? Also, the tables currently are rather nice. Would an inch reader really care, for example, about Paper sizes#Soviet variants which is currently in mm only. At some point, you have to give in and accept that some things are measured in a way you are not familiar with. Those are just thoughts that are not relevant for this template. Re CSS, I hate bloat and there are over 3 million converts in over 650,000 articles—adding a bunch of largely useless gunk to each output does not appeal because very few geeky editors would make use of it. No casual readers would know about the feature or have a way of using it. Another problem is that convert has many options that would require a lot of mucking around to properly add CSS for all cases. You might be better with a wrapper template for things like paper sizes. Johnuniq (talk) 00:38, 29 December 2019 (UTC)