Misplaced Pages

Template talk:Convert: Difference between revisions

Article snapshot taken from Wikipedia with creative commons attribution-sharealike license. Give it a read and then ask your questions in the chat. We can research this topic together.
Browse history interactively← Previous editContent deleted Content addedVisualWikitext
Revision as of 13:18, 2 September 2008 editMJCdetroit (talk | contribs)Extended confirmed users19,377 edits Plurals: cm← Previous edit Latest revision as of 04:29, 2 January 2025 edit undoJohnuniq (talk | contribs)Autopatrolled, Administrators86,653 edits Some units not getting localized/translated: bn:User:Johnuniq/Translation#Units 
Line 1: Line 1:
{{User:MiszaBot/config {{User:MiszaBot/config
|maxarchivesize = 950K
|minthreadsleft = 1
|minthreadsleft = 2
|minthreadstoarchive = 1
|algo = old(21d) |counter = 3
|algo = old(42d)
|archive = Template talk:Convert/Archive %(monthname)s %(year)d
|archive = Template talk:Convert/Archive %(counter)d
}}{{archive box|<center>'''2007'''</center>] ] ]<center>'''2008'''</center>] ] ] ] ] ] ] ]}}
|archiveheader = {{Automatic archive navigator}}
}}
{{FAQ|collapsed=no}}
{{permanently protected}}
{{Archives}}
{{Lua sidebar}}
__TOC__
{{Multiple image
| direction = vertical
| header = ]
| width = 300
| image1 = Rube Goldbergian music machine at COSI Toledo.JPG
| image2 = Rube goldberg machine.jpg
| caption1 = ... in conception
| caption2 = ... and in reality
}}


== template options: Tft3 versus Tcuft == == Indian numbering system: lakhs and crores ==


:''Moved from ]. ] (]) 01:45, 19 November 2024 (UTC)''
The template permits 'cuft' and 'ft3' in the code. It permits 'Tcuft' but not 'Tft3'. Do we need to review the code options for trillion, billion, million etc and which units they apply to? ] (]) 17:38, 7 August 2008 (UTC)
I request that we enhance the module to include ] and ].


The ] is the main nomenclature used in South Asia to name large numbers. From the lead:
:That might be a good idea. ]<sub>&nbsp;]·]</sub> 17:40, 7 August 2008 (UTC)
: {{xt|The terms '']'' or 1,00,000 (one hundred thousand, written as ''100,000'' in Pakistan, and outside the ]) and '']'' or 1,00,00,000 (ten million, written as ''10,000,000'' outside the subcontinent) are the most commonly used terms in ] to express large numbers in the system.}}
This is a dimensionless unit, or if you wish, the units are integers. (Hence if implemented, the data item in 'all_units' at ] could be named <code></code> for 'Indian numbering system'). Note also the main pattern of comma-separation into groups of two and three digits, not just three.


These terms should be converted to standard English terms, mostly with the term ''million'', except for values up to 9 lakh, which could be 900,000. Sample usage in articles:
Thanks. I would also like to say again that I think we should have 'sqft' produce 'sq ft' and 'ft2' produce 'ft&sup2;'. ] (]) 17:58, 7 August 2008 (UTC)
* '''lakh''' –
* '''crore''' –
The plural sometimes has the -s, and sometimes doesn't; so both '2 lakhs' and '2 lahk' are seen; same for crore(s).


This arose at the Rfc at ], where in my !vote (]) I called for using template {{tl|Convert}}, only to realize after the fact that the template will not handle it. This conversion is badly needed, as it will resolve a sore point about usage of lakhs and crores in many articles. Thanks, ] (]) 23:46, 18 November 2024 (UTC)
:FWIW, standard abbreviations in the petroleum and natural gas industry are:
:Earlier discussions.
:* scf - standard cubic feet
:*]
:* Mcf - thousand cubic feet
:*]
:* MMcf - million cubic feet
:*]
:* Bcf - billion cubic feet
:*]
:* Tcf - trillion cubic feet
:I have not yet examined the RfC at ]. The above discussions point out that ] and ] are not units. They are like ] which is also not a unit. However, if convert could do something useful that is not provided by {{tl|lakh}} and {{tl|crore}}, it could be investigated. ] (]) 02:03, 19 November 2024 (UTC)
:Of course, Mcf and MMcf conflict with the standard metric prefixes ''kilo'' for thousand and ''mega'' for million. ''M'' actually stands for Latin ''mille'' or thousand. ] (]) 04:59, 9 August 2008 (UTC)


::The {{tlx|lakh}} and {{tlx|crore}} templates make more sense than overloading {{tlx|convert}}. <span style="border:1px solid blue;border-radius:4px;color:blue;box-shadow: 3px 3px 4px grey;">]&nbsp;<span style="font-size:xx-small; vertical-align:top">]&nbsp;</span></span> 23:07, 19 November 2024 (UTC)
To reply to both of the above:
*Lightmouse, I really think we should avoid generating two output forms for the same concept. Decide on a single output, and have both forms use that output. Less confusion all around.
*RockyMtnGuy, while it may be useful to adopt those standards, at the same time I think we should use more logical inputs..."Kcf" for thousand, and "Mcf" for million. Unless there's a real need for "scf", I'm not sure it should be used. <span style="white-space:nowrap">— ] <small>(] • ] • ])</small></span> 15:44, 9 August 2008 (UTC)


== Nautical miles to Kilometers ==
:The real problem is that many of the units used within the petroleum industry are only used within the petroleum industry (and similar industries), are very antiquated, and do not make sense to persons outside the industry who do not know the background. For instance, "scf" for "standard cubic feet" means cubic feet corrected to standard temperature and pressure conditions, which is important if you are measuring natural gas. However, since the abbreviations Mcf and MMcf are in common use for thousand cubic feet and million cubic feet, perhaps it would be best to use abbreviations that do not conflict with them. One set of possibilities is:
:* ft<sup>3</sup> - cubic feet
:* Kft<sup>3</sup> - thousands of cubic feet
:* Mft<sup>3</sup> - millions of cubic feet
:* Gft<sup>3</sup> - billions of cubic feet
:* Tft<sup>3</sup> - trillions of cubic feet
:All of this is nonstandard, but given that most people don't know what the standard is, at least it is unambiguous and would make sense to people with computer expertise (who nowadays vastly outnumber people with petroleum expertise). ] (]) 20:53, 9 August 2008 (UTC)


It is NOT accurate! 8000 nmi = 14,816 km not 15000. Check google & ref64 ].
One of my main objections to "Follow the current literature" (a recent much-debated proposed addition to WP:MOSNUM) was that it would introduce industry/feild/etc.-specific terms and abbreviations like "Bcf". Writing for as broad an audience as Misplaced Pages's we should avoid the like. With respect to the above, I'd hesitate to introduce our own home-grown abbreviations and I wonder how ambiguous they really are: if 1&nbsp;Mft<sup>3</sup> is one million cubic feet, what's 1&nbsp;Mm<sup>3</sup>? ]<sub>&nbsp;]·]</sub> 09:17, 11 August 2008 (UTC)
The correct multiplier is 1.852 not 1.875 see ref 1 ] & for at least half a century (ref 5). ] (]) 04:18, 17 December 2024 (UTC)


:The template sees 3 zeroes at the end and assumes that is the amount of rounding desired. Ie 8000 nmi +/- 500 nmi. It is not assuming 8000 nmi +/- 0.5 nmi. Therefore it rounds the output to a similar amount.
:Bcf is the industry-standard abbreviation for ''billion cubic feet'' in the natural gas industry, but not necessarily any other industry. 1&nbsp;Mm<sup>3</sup> is one cubic megametre, and that's, like, really big. Under most circumstances you should use 1×10<sup>6</sup>m<sup>3</sup> for 1 million cubic metres. The situation regarding ''traditional'' units is basically insoluble because traditions vary from country to country and you will never get everyone to agree, especially not the Brits and Americans. It's like herding cats. My own preference, based on vast experience in herding cats, is to put all ''traditional'' units into a museum alongside cubits and leagues, and use SI units exclusively. However that gets all the traditionalists upset. There's no winning scenario. ] (]) 03:33, 13 August 2008 (UTC)
:However, you can control the rounding. Eg:
:*<code><nowiki>{{cvt|8000|nmi|km|0}}</nowiki></code> gives {{cvt|8000|nmi|km|0}} (probably not appropriate if the 8000 is a round number)
:*<code><nowiki>{{cvt|8000|nmi|km|-1}}</nowiki></code> gives {{cvt|8000|nmi|km|-1}}
:*<code><nowiki>{{cvt|8000|nmi|km|-2}}</nowiki></code> gives {{cvt|8000|nmi|km|-2}}
:*<code><nowiki>{{cvt|8000|nmi|km|-3}}</nowiki></code> gives {{cvt|8000|nmi|km|-3}} (probably the most appropriate if the 8000 is a round number)
:Choose whichever suits the situation best. Be careful of ].<span style="border:1px solid blue;border-radius:4px;color:blue;box-shadow: 3px 3px 4px grey;">]&nbsp;<span style="font-size:xx-small; vertical-align:top">]&nbsp;</span></span> 04:56, 17 December 2024 (UTC)
:@]: this is discussed in the first FAQ at the top of the page as well. <span style="background:#006B54; padding:2px;">''']&nbsp;]'''</span> 05:41, 17 December 2024 (UTC)


== Suffix parameters for first and second numbers ==
Our best bet I reckon is to stick to engineering notation. ]<sub>&nbsp;]·]</sub> 16:18, 13 August 2008 (UTC)


Can we please get suf1 and suff2 parameters added to this template, like done at ], so that we can add references or notes to the first and second numbers in the template, respectively? Cheers, ] (]) 20:10, 26 December 2024 (UTC)
:Engineering notation is a coherent solution. But I do prefer (1,400 m&sup3;) to (1.4 × 10&sup3; m&sup3;) which is what we get with <nowiki>{{convert|50|kcuft}}</nowiki>. In fact, values up to 6 digits seem fine to me. I am not proposing a change, just stating my preference. ] (]) 16:36, 13 August 2008 (UTC)


:The purpose of convert is to take a single number and convert it into the equivalent in different units of measurement. All numbers displayed come from that ''single'' input. So why would we need a second reference?
Reading some of the other sections on this page, I see that we can have:
:Likewise, why would we have different notes for each unit of measurement? Surely a single reference and/or note cover all the units used. Can you give an example? <span style="border:1px solid blue;border-radius:4px;color:blue;box-shadow: 3px 3px 4px grey;">]&nbsp;<span style="font-size:xx-small; vertical-align:top">]&nbsp;</span></span> 23:42, 26 December 2024 (UTC)
*<nowiki>{{convert|300|e3impgal|m3}}</nowiki> giving {{convert|300|e3impgal|m3}}
::Good point re: single input. Rather, a suffix parameter is desired just for after the first number because it is the one that can be sourced, whereas the second is a product of the template. Same with notes being based on the first number. See the Flin Flon and Lloydminster rows at ]. In those two cases, I want the notes to be displayed after the first number, not after the second (conversion) number as currently shown. Cheers, ] (]) 00:29, 27 December 2024 (UTC)
*<nowiki>{{convert|50|kcuft}}</nowiki> giving {{convert|50|kcuft}}
*<nowiki>{{convert|50|kcuft|m3}}</nowiki> giving {{convert|50|kcuft|m3}}
I am not sure what I would want, but it looks like we need to choose whether to use 'k' or 'e3' and choose whether the addition of 'm3' should make a difference. ] (]) 20:53, 13 August 2008 (UTC)


:::Fair enough, this only applies to tables. The {{para|pre}} option (with the ref as the next field) can be twisted into doing what you want. <code><nowiki>{{convert|2.01|km2|sqmi|disp=table|sortable=on|adj=pre|<ref group=SK>col1 note</ref>}}</nowiki></code> gives:
:We should probably reserve the SI prefixes for those units actually formed with them and otherwise have "e3", "e6", etc. Adding "m3" probably should not make a differemce until we're dealing with millions of cubic metres. ]<sub>&nbsp;]·]</sub> 09:08, 14 August 2008 (UTC)


{|class="wikitable"
That sounds like prefixes would not be used in the code unless the prefix is applied to the output. Thus 'kblah' would produce 'kiloblah', not 'thousand blah'. Instead, 'e3blah' would give 'thousand blah'. And 'e3kblah' would produce 'thousand kiloblah'. Good, that looks like a coherent solution. I agree with you about the effect of m3. ] (]) 09:20, 14 August 2008 (UTC)
!Column1 km<sup>2</sup>
!Column2 miles<sup>2</sup>


|-
::<nowiki>{{convert|250|e3U.S.gal|m3}}</nowiki>--->{{convert|250|e3U.S.gal|m3}}.
|{{convert|2.01|km2|sqmi|disp=table|sortable=on}}<ref group=SK>old style note</ref>


|-
::ahhhh....'''"e3"'''. Ya learn something new everyday. We should probably make a concentrated effort to update the doc page for this template. &mdash;<span style="border:1px solid black;padding:1px;">]</span> ] 16:29, 14 August 2008 (UTC)
|{{convert|2.01|km2|sqmi|disp=table|sortable=on|adj=pre|<ref group=SK>col1 note</ref>}}


|}
Too true. I've just got so little Wikitime these days ... y'know: life ... and this long list of things that need doing on this and other templates. ]<sub>&nbsp;]·]</sub> 01:46, 15 August 2008 (UTC)
''Notes:''
<references group=SK/>
:::How is that? <span style="border:1px solid blue;border-radius:4px;color:blue;box-shadow: 3px 3px 4px grey;">]&nbsp;<span style="font-size:xx-small; vertical-align:top">]&nbsp;</span></span> 02:35, 27 December 2024 (UTC)
:Don't sweat, convert is magic. Sorry, but no reference on the output which really should not need one.
:*<code><nowiki>{{convert|12.3<ref>A wise old man.</ref>|kg}}</nowiki></code> → {{convert|12.3<ref>A wise old man.</ref>|kg}}
{{reflist-talk}}
::Many thanks both of you. Both work well. Cheers, ] (]) 03:11, 27 December 2024 (UTC)


== Use in sortable tables == == Circular mil ==


It would be nice if the option "disp=table" also included coding to make the values sort correctly. It works fine when abbreviations are off, but when they are on it sorts as plain text (e.g., 1, 10, 2, 200, 3). --] (]) 01:47, 10 August 2008 (UTC) I was editing ] and I found there an instance of ]; is it possible to add this unit to the template?--- ] (]) 20:46, 28 December 2024 (UTC)
:I suppose so but after all these years without it, I wonder if a new unit would be much benefit. Would cmil be used in any other articles or would it only be used for the approximate values shown in this article? Any thoughts from watchers? ] (]) 00:23, 29 December 2024 (UTC)
:I'll look into it. ]<sub>&nbsp;]·]</sub> 13:11, 12 August 2008 (UTC)


== Some units not getting localized/translated ==
== Superscripts for square and cubic imperial/US units ==


Hello, new to this, but any idea why units might not be getting correctly transliterated? Didn't get any response on Bengali wikipedia so decided to ask here.
{{Template talk:Convert/list of units/area}}


]
:I've always been against unit&sup2; & unit&sup3; because it is not the most common way that cubic/square units in the U.S./imperial system are encountered and shows a '''huge inconsistency''' in the encyclopedia as a whole. Many pro-metric editors wanted/want unit&sup2;/unit&sup3; for English units because it is similar to what they always have seen with metric units. Some have argued to allow "sq&nbsp;km" (and the like) in the past. Those who have argued for such have lost because for metric units superscripted is the most commonly encountered abbreviations/symbols and SI units are regulated to be only be siunit&sup2;. English units are not regulated as tightly as SI units, therefore some inconsistencies can occur. Although, there are inconsistencies that do occur with metric units as well. However, there is a recent proposal to eliminate the lower case "l" for litres in favor of "L"; also ml vs. mL. So unless some industry has a specialized standard symbol that it <u>always</u> uses like CCF, MCF, CID, or maybe Tft&sup3; (I don't know about the last one), then we should always stick to the most commonly used symbols/abbreviations '''for the sake of consistency!''' Also, with two different styles, I could foresee someone going around and changing English units to suit their fancy. If anything, we should have a bot go through and change all of the code occurrences of mi2, ft2, yd3, mi3, and others to sqmi, sqft, cuyd, cumi, etc, in the same way that Lightmouse had to go through with his bot and change all of the old coding from sqkm, sqm, cum, cukm to km2, m2, m3, km3. &mdash;<span style="border:1px solid black;padding:1px;">]</span> ] 02:54, 13 August 2008 (UTC)


The issue is on the top of this page: ]. What I want is megaparsec and light-year to be correctly transliterated as মেগাপারসেক and আলোকবর্ষ, just like kilometer is being transliterated as কিলোমিটার. Those articles do exist on the BN wikipedia.
I tend to agree with you, MJCdetroit: I'd rather have things consistant in general. The thing is that when the change was made to MOSNUM maintaining the proscription of superscripts for square and cubic imperial/US units was rather low on my list of things to fight for/against. Shall we bring it up on '']''—for whilst this is permitted by the guideline it's no unreasonable request to have the template adjusted to produce it? ]<sub>&nbsp;]·]</sub> 08:54, 13 August 2008 (UTC)
Thanks! ] (]) 10:48, 1 January 2025 (UTC)

:I will fix the problem once I understand it. However, first I have to remind myself how units are created at bnwiki. I have asked a question at ]. ] (]) 04:29, 2 January 2025 (UTC)
:I would be happy for my bot to change all current code occurrences of '|blah2|' to '|sqblah|' where blah is non-metric. This would have no visible effect for readers. It could be done now because it does not conflict with any guidance that exists now or is likely to exist. My bot is currently blocked so I would appreciate support from you all to get it unblocked. ] (]) 09:02, 13 August 2008 (UTC)
::As discussed on Lightmouse's talk page, the bot has been unblocked by the blocking admin. Good luck. &mdash;<span style="border:1px solid black;padding:1px;">]</span> ] 16:22, 14 August 2008 (UTC)

== Temperature intervals ==

Is it possible to give temperature intervals rather than specific temperatures? I wan't to avoid sort of error. ] ] 19:44, 15 August 2008 (UTC)
:] ]<sub>&nbsp;]·]</sub> 07:24, 16 August 2008 (UTC)
::Thanks. I must have missed that when I checked back. ] ] 15:46, 16 August 2008 (UTC)

== Removal of convert template due to page load time ==

A user removed conversions and suggested that the template increases page load times. See ]. What is the answer to this suggestion? ] (]) 09:31, 16 August 2008 (UTC)

:In the overhaul of the template one of I my main objectives was to minimise the pre-expand include size (this was last year). I've gone to what could be called great lengths to achieve this—we've got over 2,000 subtemplates, it could've been far fewer if pre-expand include size had not been a concern. The template couldn't be much trimmer (I don't think) and do what it does. If the template is replaced with conversions in plain text, there's no cause for alarm. As you suggest, Lightmouse, the best way to prevent the insertion of {{tlf|convert}} is to type the conversion in as raw text. ]<sub>&nbsp;]·]</sub> 13:28, 16 August 2008 (UTC)

Agreed with Jimp. I can personally note that it used to be horrendous at some point last year, and there have been marked improvements in the time since (I sometimes muck around with substs etc in userspace for other reasons). ] 13:36, 16 August 2008 (UTC)

:Can anyone produce quotable statistics? ] (]) 15:59, 16 August 2008 (UTC)

Yes ... well, just about anyone who can use a computer. Go to an empty page, type a transclusion in, save it, look at the page's html code (on IE click on ''View'' then ''Source'') and find the NewPP limit report. Here's one I prepared earlier.

<pre>
{{convert|100|mi}}
NewPP limit report
Preprocessor node count: 226/1000000
Post-expand include size: 391/2048000 bytes
Template argument size: 447/2048000 bytes
Expensive parser function count: 0/500
</pre>

]<sub>&nbsp;]·]</sub> 10:55, 17 August 2008 (UTC)

:I do not understand that. Can you explain it in terms of the burden that the template causes? ] (]) 10:57, 17 August 2008 (UTC)

Isn't that page now cached on the servers? (WMF uses squid caching doesn't it?) So isn't the load "pushed forward" so that when you make a change to the template arguments, the cached article page gets invalidated and regenerated, just like any other page edit? And if you change the template itself, of course, many many article pages get invalidated and regenerated. I'm no expert, but templates and page edits don't really affect the average viewer looking up something on Misplaced Pages, do they? ] (]) 11:06, 17 August 2008 (UTC)

:I wish I could explain things better. What I do know is that these ] were put in place to keep pages from taking too long to load. So, I'm guessing that the higher the numbers the greater the burden. ]<sub>&nbsp;]·]</sub> 11:21, 17 August 2008 (UTC)

It is important that we find a way of explaining this to ordinary users. I do not want metric units removed from too many articles. See: ]. Regards ] (]) 17:23, 17 August 2008 (UTC)

:Didn't Marcia write that she'd cosider Option 2 (on your talk page)? Yet she seems simply to be reverting you outright. ]<sub>&nbsp;]·]</sub> 17:55, 17 August 2008 (UTC)

Marcia is now making the point that the template does not permit '1.1. million acres (xx km&sup2;)' and I had to change it to '1,100,000 acres (xx km&sup2;)'. This sounds like a case for 'e6acre'. Is this possible? ] (]) 15:42, 21 August 2008 (UTC)

== ]s ==

Why do we not abbreviate centimetres to the symbol cm? — ] (]) 16:18, 16 August 2008 (UTC)

:Who says we don't? ] (]) 16:35, 16 August 2008 (UTC)

Not I.

{{<code>convert|4|in|cm</code>}} → "{{convert|4|in|cm}}"

]<sub>&nbsp;]·]</sub> 10:48, 17 August 2008 (UTC)

== Superscripts ==

] says 'Avoid the unicode characters ² and ³' and use <nowiki><sup></sup></nowiki> instead. This template seems to use the unicode characters. Will changing it produce any problems? <span style="background:lightgrey;font-family:Courier;border:2px dashed #000;">]]</span> 16:21, 17 August 2008 (UTC)

:No, no problems. But the subtemplates are largely protected. ]<sub>&nbsp;]·]</sub> 17:47, 17 August 2008 (UTC)

::I temporarily lowered the protection on the subtemplates of m2, km2, m3, and km3. Some of the others like mm2, cm2, and cm3 were already unprotected. Edit them as needed. &mdash;<span style="border:1px solid black;padding:1px;">]</span> ] 02:11, 18 August 2008 (UTC)

:It seems somewhat obvious that acres are converted in m* rather than m<sup>3</sup>, no? Thus most readers can easily identify m2 for these. Adding superscript to all conversion just messes up the line spacing. -- User:Docu

This is not the forum for Unicode characters vs <nowiki><sup></sup></nowiki> since ] now recomends that the former not be used. I brought this change to ]. Consensus seemed generally in support. ]<sub>&nbsp;]·]</sub> 01:00, 19 August 2008 (UTC)

:Sure, but the MoS concedes " can produce irregular line spacing, that is usually a less serious problem", but as it is here, we are better off leaving in the unicode. -- User:Docu

::Are you sure that's still relevant? I thought the old line spacing problems were more or less fixed by a CSS change quite some time (months if not years) ago. —] <small>(])</small> 11:19, 19 August 2008 (UTC)

:::Indeed, <nowiki><sup></nowiki> no longer produces irregular spacing, which was very apparent to me as an old signature of mine used superscript and caused that spacing. Now those sigs look perfectly normal. Just for the sake of interest, the fix was implemented on 21 March 08 with . <span style="white-space:nowrap">— ] <small>(] • ] • ])</small></span> 16:47, 19 August 2008 (UTC)

I think the unicode to <nowiki><sup></nowiki> conversion still needs to be done for conversions to square kilometres ''and'' square miles etc. Eg {{<code>convert|6|ha|km2 sqmi</code>}} gives {{convert|6|ha|km2 sqmi}}.--] (]) 09:58, 20 August 2008 (UTC)

== converting '|ft2|' to '|sqft|' ==

As a result of other discussions on this page, I have made a start on converting '|ft2|' to '|sqft|' and other non-metric squares and cubes. So far I have tried to do: 'in2', 'in3', 'yd2' and 'yd3'. However, when I do 'what links to' the relevant templates, there are still lots of articles. I am sure that this is because of infoboxes or something but I can't work it out. Can anyone see where they are? ] (]) 21:52, 20 August 2008 (UTC)

:Thanks. The 'something' has to do with redirects and default unit outputs (as best that I can explain it). I think, I've taken care of the cubic inches' template redirects and default unit outputs (this thing: |o=cuin). I'll do more when I get a chance. &mdash;<span style="border:1px solid black;padding:1px;">]</span> ] 14:57, 21 August 2008 (UTC)

The 'what links here' will be a shorter list and more accurate when you have finished. This will be much easier for Lightbot. Let me know as you complete each unit. Incidentally, there is still something weird with cubic inches. If you run 'what links here for 'Template:Convert/in3', you get 55 articles and I still can't work out why. ] (]) 15:28, 21 August 2008 (UTC)

:I think it maybe a cache thing. Go to any article in the 'what links here' page. Then, click edit and go all the way to the bottom and you'll see 'Template:Convert/in3' in amongst the other templates. Next click, "Show preview". You'll notice that the 'Template:Convert/in3' is no longer there. That's the only explanation that I have. Good luck Light. &mdash;<span style="border:1px solid black;padding:1px;">]</span> ] 17:13, 21 August 2008 (UTC)

That 'preview' test is a neat trick. I have also seen delays of a few hours with infobox updates. Let us see what happens here. ] (]) 17:19, 21 August 2008 (UTC)

:Thanks for your work on that MJCdetroit. I was making progress but somebody stopped my bot questioning its approval for its edits, see ]. I am going back for approval again with a more generic wording. If anyone wants to view the wording and support it, please speak up at: ]. Regards ] (]) 23:30, 21 August 2008 (UTC)

The template:
* Template:Convert/list of units/area/SI
is still using in2, ft2, mi2. Can somebody fix that please? There are also several monobook scripts that are out of date. Some are adding '|ft2|' and '|knot|' etc. See . If these are still active, we need to ask them to update. ] (]) 10:17, 24 August 2008 (UTC)

== significant figures on input ==

Is it possible to specify that the input value be rounded (i.e. a higher precision value be used than displayed? For example: <nowiki>{{convert|1.070344|e6acre|km2|sigfig=2}}</nowiki>: {{convert|1.070344|e6acre|km2|sigfig=2}}; <nowiki>{{convert|1.1|e6acre|km2}}</nowiki>: {{convert|1.1|e6acre|km2}}; I would like "1.1 million acres (4,300 km<sup>2</sup>)". The problem arises when the mantissa of the converted value is greater than that of the original (i.e. 4.3 > 1.1) and when we don't want to display the source value to the highest precision known for aesthetic reasons --] (]) 14:30, 22 August 2008 (UTC)

:I don't believe it is possible to modify the source figure in output, however, why not simply use <nowiki>{{convert|1.07|e6acre|km2}}</nowiki> ({{convert|1.07|e6acre|km2}})? If the exact number is 1,070,344, and the output is giving an undesired precision, then 1.07 seems perfectly acceptable compared to 1.1. You don't ''have'' to reduce it to two significant digits...three or even four is okay, especially if the source number really is an exact figure. At least, that is my feeling on it, though to be honest, if the source is long but precise, I wouldn't round in any situation...I'd use that exact number. <span style="white-space:nowrap">— ] <small>(] • ] • ])</small></span> 19:00, 22 August 2008 (UTC)
:Well, the exact figure (well, not so much ''exact'' as a whole hell of a lot more precision than "1.1 million") does get used - but it's a bit verbose to put in the lead paragraph. --] (]) 05:34, 23 August 2008 (UTC)

== Inches to Centimetres ==

Take a look at the height of ]. I came across this before looking at footballers heights. Why is 5 foot 8 inches (5' 8") equal to 176cm (1.76m) on this Converter? When everybody knows when they look at a tape measure, that 5' 8" = 1.73m ?? and 5' 9" is 1.75m. So this converter is out by nearly 3cm !! - ] (]) 21:47, 22 August 2008 (UTC)

:How are you getting 176? <nowiki>{{convert|5|ft|8|in|cm|0}}</nowiki> comes out as {{convert|5|ft|8|in|cm|0}}. <span style="white-space:nowrap">— ] <small>(] • ] • ])</small></span> 00:25, 23 August 2008 (UTC)

::It's not 5' 8", it's 5.8 feet, i.e. 5 feet 9.6 inches, which is technically correct. The person who entered it claims to be a native speaker of ], so you're lucky he didn't convert the weight to ]...] (]) 00:58, 23 August 2008 (UTC)

:::Haha, nice catch. I've since change the page to convert into feet and inches, which is more usable for most people. <span style="white-space:nowrap">— ] <small>(] • ] • ])</small></span> 14:45, 25 August 2008 (UTC)

== converting a range of °C to °F on ] ==

Could someone either let me know if I'm doing something wrong, or implement converting a range of °C to °F?--] (]) 13:15, 25 August 2008 (UTC)

:I am guessing that range conversions aren't implemented for temperatures yet, as it is calling on the non-existent template {{tnull|Convert/Dual/LoffT}}. <span style="white-space:nowrap">— ] <small>(] • ] • ])</small></span> 15:03, 25 August 2008 (UTC)

Could someone please implement it?--] (]) 20:19, 27 August 2008 (UTC)
:Ditto. I would find it most useful right now. --] (]) 13:11, 29 August 2008 (UTC)

Will get to it but time is short these days ... or if anyone else can figure out how, be my guest ... ]<sub>&nbsp;]·]</sub> 19:07, 1 September 2008 (UTC)

== ]: help needed ==

Would a knowledgable person have a look at {{tl|Infobox Islands}} and see if he or she can figure out why the "elevation" parameter in the infobox, which makes use of the {{tl|convert}} template, is producing expression errors on the infobox's ]? You may wish to continue the conversation on the ]. Thanks. — Cheers, ] <sup>&ndash;]&ndash;</span></sup> 06:40, 29 August 2008 (UTC)

== Solar masses ==

Any chance of adding support for ]es (1.98892 x 10<sup>30</sup> kg)? —Alex (] &#124; ] &#124; ]) 21:59, 30 August 2008 (UTC)

:Every chance ... but ''exactly'' how big is the Sun? ... Okay {{val|1.98892|e=30|u=kg}} looks like a conventional value according to the article, let's take that. But how do we do the symbol? ]<sub>&nbsp;]·]</sub> 19:14, 1 September 2008 (UTC)

::The International Astronomical Union (dated 1989, but apparently still current) recommends {{val|1.9891|e=30|u=kg}}, so that's probably the number to use. (I don't think it much matters at that level of precision; quantities that are measured in solar masses are rarely known to as many as 3 significant figures.)
::''M''<sub>&#x2299;</sub> (<nowiki>''M''<sub>&amp;#x2299;</sub></nowiki>) should work for the abbr=on version of the symbol. (I italicized the symbol because it is sort of a variable, representing the mass of the Sun; a quick look finds that 2 leading journals (Astrophysical Journal and Astronomy & Astrophysics) do it this way, while Monthly Notices of the Royal Astronomical Society uses M<sub>&#x2299;</sub>.) —Alex (] &#124; ] &#124; ]) 20:01, 1 September 2008 (UTC)

Done: the code is <code>solar mass</code> e.g. {{<code>convert|4.5|solar mass</code>}} → "{{convert|4.5|solar mass}}". ]<sub>&nbsp;]·]</sub> 22:58, 1 September 2008 (UTC)

Though I'm not too certain of the italisation. Whilst it's based on an experimental value (which is slowly being reduced), it is still a unit with a conventional value attached. The Earth, Lunar & Jupiter masses mentioned on the article are not italised, should this be? ]<sub>&nbsp;]·]</sub> 23:43, 1 September 2008 (UTC)

:I don't care; I was trying to explain the pros and cons without taking a strong position. Again, there's no uniform convention in the field. We should pick italicized or not and go with it. —Alex (] &#124; ] &#124; ]) 00:16, 2 September 2008 (UTC)

Units are not italised. Though this could be used as a variable, it's used as a unit here. I'm going for nonitalisation unless there be objections. ]<sub>&nbsp;]·]</sub> 00:21, 2 September 2008 (UTC)

:I believe that there is a guideline or standard that says italics should not be used. It may be ISO or SI. If Gene Nygaard were here, he would tell us in no uncertain terms. ] (]) 08:39, 2 September 2008 (UTC)

== Lightbot: please support latest approval ==

Many of you will know of the activities of Lightbot. It has touched over 140,000 articles with edits relating to dates and units. I've made a new request for bot approval that is largely a clarification/extension of two previous approvals and has wording that should be easier to understand. The bot approvals group is not necessarily aware of what Lightbot does so I would be grateful if you could add a few words in support at ]. I would also be happy to answer any questions here or on my talk page. Regards ] (]) 08:55, 1 September 2008 (UTC)

== Plurals ==

Gun calibre measurements are usually quoted in the singular rather than the plural (eg, a 120 millimetre gun rather than a 120 millimetres gun). Is there a way to remove the plural from the units? I couldn't see this on the page anywhere. ]<sup>]</sup> 16:45, 1 September 2008 (UTC)

:Never mind: <tt>adj=on</tt>. :P ]<sup>]</sup> 16:55, 1 September 2008 (UTC)

Can somebody remind me of the difference between adj=on and sing=on? ] (]) 17:00, 1 September 2008 (UTC)

:They appear to do the same thing (I've just tried it out). Which is preferred? ]<sup>]</sup> 17:16, 1 September 2008 (UTC)

Lightmouse, nothing. <code>adj</code> is prefered ... or at least by me. ]<sub>&nbsp;]·]</sub> 19:11, 1 September 2008 (UTC)

:Thanks. Well, I think you know that I don't like conflating the 's' with a hyphen. My ideal would be two parameters: sing=on (makes it singular); and hyph=on (adds a hyphen). Then adj=on can be deprecated. My second best would be to keep adj=on as a shortcut for 'sing=on|hyph=on}}'. We have been through this before and I know I am a minority on this. ] (]) 19:22, 1 September 2008 (UTC)

Yeah ... hey ... ]<sub>&nbsp;]·]</sub> 19:30, 1 September 2008 (UTC)

::I've always used sing=on just out of habit and I am sure that there are others that do the same. &mdash;<span style="border:1px solid black;padding:1px;">]</span> ] 13:18, 2 September 2008 (UTC)

== Units of radioactivity ==

How about adding ] (Bq) and ] (Ci) to this template (including kBq, mBq, &micro;Ci, nCi and so on)? ––] (]) 08:18, 2 September 2008 (UTC)

Latest revision as of 04:29, 2 January 2025

? view · edit Frequently asked questions
Q: When using {{convert}} why does the answer sometimes seem a bit off?
A: This template takes into account the precision of the supplied value and generally rounds the output to the same level of precision. If you need to change from the default output precision, see rounding.
Note: This can cause whole numbers that end in one or more zeroes to be converted less accurately than expected.
Q: What are all the possible units (kg, lb, m, cm, ft, in, °C, °F, km, mi, nmi, mph, km/h, and so on)?
A: See Help:Convert units for an introduction and Module:Convert/documentation/conversion data for the complete list.
Q: I've been using Convert for some time and am pretty comfortable with its basic features. Does it have other features which it would be worth my while to learn about?
A: Almost certainly. Start with Help:Convert.
For more, see the FAQ.
Template:Convert is permanently protected from editing because it is a heavily used or highly visible template. Substantial changes should first be proposed and discussed here on this page. If the proposal is uncontroversial or has been discussed and is supported by consensus, editors may use {{edit template-protected}} to notify an administrator or template editor to make the requested edit. Usually, any contributor may edit the template's documentation to add usage notes or categories.

Any contributor may edit the template's sandbox. Functionality of the template can be checked using test cases.


Archiving icon
Archives
Archive 1Archive 2Archive 3


This page has archives. Sections older than 42 days may be automatically archived by Lowercase sigmabot III when more than 2 sections are present.
Related pages
Template:Convert... in conception... and in reality

Indian numbering system: lakhs and crores

Moved from Module talk:Convert. Johnuniq (talk) 01:45, 19 November 2024 (UTC)

I request that we enhance the module to include lakhs and crores.

The Indian numbering system is the main nomenclature used in South Asia to name large numbers. From the lead:

The terms lakh or 1,00,000 (one hundred thousand, written as 100,000 in Pakistan, and outside the Indian subcontinent) and crore or 1,00,00,000 (ten million, written as 10,000,000 outside the subcontinent) are the most commonly used terms in Indian English to express large numbers in the system.

This is a dimensionless unit, or if you wish, the units are integers. (Hence if implemented, the data item in 'all_units' at Module:Convert/data could be named for 'Indian numbering system'). Note also the main pattern of comma-separation into groups of two and three digits, not just three.

These terms should be converted to standard English terms, mostly with the term million, except for values up to 9 lakh, which could be 900,000. Sample usage in articles:

The plural sometimes has the -s, and sometimes doesn't; so both '2 lakhs' and '2 lahk' are seen; same for crore(s).

This arose at the Rfc at Misplaced Pages talk:Manual of Style/Dates and numbers, where in my !vote (diff) I called for using template {{Convert}}, only to realize after the fact that the template will not handle it. This conversion is badly needed, as it will resolve a sore point about usage of lakhs and crores in many articles. Thanks, Mathglot (talk) 23:46, 18 November 2024 (UTC)

Earlier discussions.
I have not yet examined the RfC at WT:Manual of Style/Dates and numbers#RfC Indian numbering conventions. The above discussions point out that lakh and crore are not units. They are like million which is also not a unit. However, if convert could do something useful that is not provided by {{lakh}} and {{crore}}, it could be investigated. Johnuniq (talk) 02:03, 19 November 2024 (UTC)
The {{lakh}} and {{crore}} templates make more sense than overloading {{convert}}.  Stepho  talk  23:07, 19 November 2024 (UTC)

Nautical miles to Kilometers

It is NOT accurate! 8000 nmi = 14,816 km not 15000. Check google & ref64 Bombardier Global 7500. The correct multiplier is 1.852 not 1.875 see ref 1 Nautical mile & for at least half a century (ref 5). Dave-okanagan (talk) 04:18, 17 December 2024 (UTC)

The template sees 3 zeroes at the end and assumes that is the amount of rounding desired. Ie 8000 nmi +/- 500 nmi. It is not assuming 8000 nmi +/- 0.5 nmi. Therefore it rounds the output to a similar amount.
However, you can control the rounding. Eg:
  • {{cvt|8000|nmi|km|0}} gives 8,000 nmi (14,816 km) (probably not appropriate if the 8000 is a round number)
  • {{cvt|8000|nmi|km|-1}} gives 8,000 nmi (14,820 km)
  • {{cvt|8000|nmi|km|-2}} gives 8,000 nmi (14,800 km)
  • {{cvt|8000|nmi|km|-3}} gives 8,000 nmi (15,000 km) (probably the most appropriate if the 8000 is a round number)
Choose whichever suits the situation best. Be careful of false precision. Stepho  talk  04:56, 17 December 2024 (UTC)
@Dave-okanagan: this is discussed in the first FAQ at the top of the page as well. Imzadi 1979  05:41, 17 December 2024 (UTC)

Suffix parameters for first and second numbers

Can we please get suf1 and suff2 parameters added to this template, like done at Template:Change, so that we can add references or notes to the first and second numbers in the template, respectively? Cheers, Hwy43 (talk) 20:10, 26 December 2024 (UTC)

The purpose of convert is to take a single number and convert it into the equivalent in different units of measurement. All numbers displayed come from that single input. So why would we need a second reference?
Likewise, why would we have different notes for each unit of measurement? Surely a single reference and/or note cover all the units used. Can you give an example?  Stepho  talk  23:42, 26 December 2024 (UTC)
Good point re: single input. Rather, a suffix parameter is desired just for after the first number because it is the one that can be sourced, whereas the second is a product of the template. Same with notes being based on the first number. See the Flin Flon and Lloydminster rows at List of cities in Saskatchewan#List. In those two cases, I want the notes to be displayed after the first number, not after the second (conversion) number as currently shown. Cheers, Hwy43 (talk) 00:29, 27 December 2024 (UTC)
Fair enough, this only applies to tables. The |pre= option (with the ref as the next field) can be twisted into doing what you want. {{convert|2.01|km2|sqmi|disp=table|sortable=on|adj=pre|<ref group=SK>col1 note</ref>}} gives:
Column1 km Column2 miles
2.01 0.78
2.01 0.78

Notes:

  1. old style note
  2. col1 note
How is that?  Stepho  talk  02:35, 27 December 2024 (UTC)
Don't sweat, convert is magic. Sorry, but no reference on the output which really should not need one.
  • {{convert|12.3<ref>A wise old man.</ref>|kg}} → 12.3 kilograms (27 lb)

References

  1. A wise old man.
Many thanks both of you. Both work well. Cheers, Hwy43 (talk) 03:11, 27 December 2024 (UTC)

Circular mil

I was editing Litz wire and I found there an instance of circular mil; is it possible to add this unit to the template?--- Carnby (talk) 20:46, 28 December 2024 (UTC)

I suppose so but after all these years without it, I wonder if a new unit would be much benefit. Would cmil be used in any other articles or would it only be used for the approximate values shown in this article? Any thoughts from watchers? Johnuniq (talk) 00:23, 29 December 2024 (UTC)

Some units not getting localized/translated

Hello, new to this, but any idea why units might not be getting correctly transliterated? Didn't get any response on Bengali wikipedia so decided to ask here.

bn:টেমপ্লেট_আলোচনা:রূপান্তর#Some_unit_names_not_getting_translated

The issue is on the top of this page: bn:স্থানীয়_গোষ্ঠী. What I want is megaparsec and light-year to be correctly transliterated as মেগাপারসেক and আলোকবর্ষ, just like kilometer is being transliterated as কিলোমিটার. Those articles do exist on the BN wikipedia. Thanks! Babaisarkar2 (talk) 10:48, 1 January 2025 (UTC)

I will fix the problem once I understand it. However, first I have to remind myself how units are created at bnwiki. I have asked a question at bn:User:Johnuniq/Translation#Units. Johnuniq (talk) 04:29, 2 January 2025 (UTC)