Jump to content

Template talk:Convinfobox

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

More duals

[edit]

For British Rail Class 139 2.3 litres (4.0 imperial pints; 4.9 US pints) like 2.3 litres (0.51 imperial gallons; 0.61 US gallons) Peter Horn User talk 15:27, 22 October 2012 (UTC)[reply]

Is this meant to be the engine displacement or the fuel capacity? Peter Horn User talk 16:44, 22 October 2012 (UTC)[reply]
The former I'd guess. JIMp talk·cont 08:46, 23 October 2012 (UTC)[reply]
Thanks. 2.3 litres (140 cubic inches). I never heard of the engine displacement given in inperial quarts. Peter Horn User talk 21:06, 23 October 2012 (UTC) Peter Horn User talk 21:07, 23 October 2012 (UTC)[reply]
Nor have I but I'm not up with train lingo. JIMp talk·cont 23:26, 23 October 2012 (UTC)[reply]
Such a small quantity like 2.3 litres cannot be a fuel capacity, unless it's a lawnmower - even a very small motor car has a somewhat larger tank capacity (for example, the 2012 Nissan Micra with its 1198 cc engine has a 41-litre tank), so a railway train, being somewhat heavier (even one with just one carriage), is likely to have a significantly larger tank. Therefore 2.3 litres must be an engine displacement. Internal-combustion engine displacements are invariably quoted using just two units: cubic centimetres and cubic inches. This brings me to my next point: where are quarts mentioned? I don't see this unit above, nor in the page history for British Rail Class 139. What I do see are several attempts to use other inappropriate units such as gallons and pints. The cc figure is sometimes given as an approximation in litres; but the cubic inches figure is never given a pints/quarts/gallons equivalent, even approximately. --Redrose64 (talk) 08:40, 24 October 2012 (UTC)[reply]
Perhaps the fuel is liquid deuterium and it's a nuclear fusion engine. Pints, quarts, gallons, all must be the result of some confusion somehere along the track. JIMp talk·cont 01:13, 25 October 2012 (UTC)[reply]

Stones and pounds separately?

[edit]

How can I make this template give this format for a result: 112 kg (17.6 st; 247 lb)? I tried using {{convinfobox|112|kg||st||lb}}, but it gives 112 kg (247 lb; 17 st 9 lb) I don't see a need for this to work this way, because {{convinfobox|112|kg||lb||stlb}} gives the same thing (112 kg (247 lb; 17 st 9 lb)). Jackmcbarn (talk) 16:50, 23 August 2013 (UTC)[reply]

Also, why does {{convinfobox|112|kg||lb||stlb}} work (112 kg (247 lb; 17 st 9 lb)) and {{convinfobox|112|kg||stlb||lb}} not (112 kg (17 st 9 lb; 247 lb))? Jackmcbarn (talk) 16:56, 23 August 2013 (UTC)[reply]

Deprecated?

[edit]

Is this edit a good or bad idea? Andy Dingley (talk) 10:01, 21 December 2013 (UTC)[reply]

@Andy Dingley: a very good idea. the entire purpose of this template is for use within infobox code. there is no need for the additional overhead in articles. Frietjes (talk) 18:02, 22 December 2013 (UTC)[reply]
Sorry, I'm not seeing your point. These uses were in parameters supplied to an infobox. Are you saying that this is an inappropriate use, and that these specialised templates are only for use within the code of infoboxes, where an infobox takes a parameter as a dimensioned value (i.e. with implied units) and the scaling is then done entirely within the infobox template? I admit I wasn't aware that we had any such infoboxes - all those I've used have taken parameters as simple untyped text (very commonly the results of a call to {{convert}}) and have just presented it, as is.
Also what is an "infobox" in this sense? There are a few templates, like {{pistonspecs}}, that I would expect to be treated as infoboxes in this sense (and are perhaps more likely to use typed parameters), yet they are displayed within the body of an article, rather than pulled as a separately displayed box. Andy Dingley (talk) 19:51, 22 December 2013 (UTC)[reply]
@Andy Dingley: sorry for not being more clear. this template is a frontend for {{convert}}. it takes the values passed to it and passes them to {{convert}}. there is no reason to add the additional overhead if the inputs are known. the perfect usage of this is (as you identified) within the code for templates. for example, in the code for {{infobox hiking trail}}, you will see {{convinfobox|{{{highest_m|}}}|m|{{{highest_ft|}}}|ft}}. this is a simplification of, but equivalent to, {{#if:{{{highest_m|}}}|{{convert|{{{highest_m}}}|m|ft|abbr=on}}|{{#if:{{{highest_ft|}}}|{{convert|{{{highest_ft}}}|ft|m|abbr=on}}}}}} an even better use of this template is in {{infobox rugby union biography}}, where the weight may be specified in kg, lb, st, or st and lb. you can find other in-template uses by checking here, although many of those are frontends for other templates like {{infobox sportsperson}} and {{infobox station}}. hopefully that's more clear? Frietjes (talk) 15:57, 23 December 2013 (UTC)[reply]

Convert accepting MOS-formed fractional input

[edit]

Some developments in {{Convert}} (talk) that might be interesting for this template (& its usage in infobox code, i.e. for template editors).

1. From this talk: {{convert}} returns (will return, it's sandbox only now) class=error in each case of error. Before, some errors had a [maintenance tag] or error categorisation only. In the new situation, one can check for any error:

{{#iferror:{{convert|ca. 24+1/2|in|cm}}|bad|good}}

2. From this talk:

When input can have a fraction (in any MOS-format input code), Module:Convert/helper can preprocess the input into a {{Convert}}-fit input: |1=24 2/3|1=24+2/3 (the "+" is required in {{Convert}}).

3. Also, input processing {{convert|input=6 ft 2 in|m}} is added.

Demo's are in Template:NFL predraft/testcases (not using {{Convinfobox}}, not using |input=). -DePiep (talk) 11:18, 12 August 2017 (UTC)[reply]