Template talk:Convert/Archive July 2019

Latest comment: 4 years ago by EEng in topic kp·m

Problem with English variants when converting kilograms

For some reason {{convert|340|kg|lb|0}} is yielding 340 kilograms (750 lb), which is AmEng, not BrEng. I'm used to seeing kilogramme in BrEng. What's going on here?--Sturmvogel 66 (talk) 15:35, 19 July 2019 (UTC)

Could you provide some citations from some widely-used British dictionaries to confirm that the British spelling? Also, before Lua, it wasn't possible for templates to be aware of any other templates in the article, such as {{Use British English}}. I think it is now possible with Lua, but I don't know if it has been attempted for this template. Since you don't mention which article the template occurs in, it isn't clear why you would expect a British spelling. Jc3s5h (talk) 16:04, 19 July 2019 (UTC)
  • Like Sturm asked before. We'd like to see kilogramme back. Here are some dictionaries who say that kilogramme British is [1], [2], [3], [4] and [5]. The problem accrued at the French battleship Iéna article which is an A-class nomination Cheers. CPA-5 (talk) 18:33, 19 July 2019 (UTC)
  • I expected it because the default is BrEng. You need to add a command to get it to output in AmEng. See section 7.1.--Sturmvogel 66 (talk) 19:08, 19 July 2019 (UTC)
  • Here's a reference that states either is fine, and the kilogram is more common. [6] and also on the UK Gov website. -- WOSlinker (talk) 19:42, 19 July 2019 (UTC)
"Kilogramme" may be one British spelling, but "kilogram" is also common (possibly more common) in British English. I'd say "kilogram" should be the spelling for "sp=en-UK" and that perhaps a new option be added for "kilogramme" - "sp=en-UK2*, or whatever, for articles using that variety, and that "sp=en-uk" should stay as the default. -- DeFacto (talk). 19:40, 19 July 2019 (UTC)
I didn't think that kilogram was an accepted spelling in BritEng. Since it is, I don't think that anything needs to be done.--Sturmvogel 66 (talk) 19:47, 19 July 2019 (UTC)
But surely we need "kilogramme" to an option, for articles where that spelling is the established consensus. -- DeFacto (talk). 19:50, 19 July 2019 (UTC)
Honestly, I doubt that that spelling is actually an established consensus anywhere. I only worried about it because I'm prepping an article for WP:FAC and my reviewer questioned the spelling.--Sturmvogel 66 (talk) 19:56, 19 July 2019 (UTC)
There's less than 200 articles containing the word kilogramme and 6450 with kilogram at the moment. -- WOSlinker (talk) 20:02, 19 July 2019 (UTC)
Huh, that's a lot less than I expected, but I'd that it's usually abbreviated.--Sturmvogel 66 (talk) 20:07, 19 July 2019 (UTC)
This is a clear case of when following the letter of MOS is trumping common sense. MOS:UNITNAMES says "In prose, unit names should be given in full if used only a few times, but symbols may be used when a unit (especially one with a long name) is used repeatedly, after spelling out the first use (e.g. Up to 15 kilograms of filler is used for a batch of 250 kg)" (my underscore). But nobody takes the time to ask why. I simply cannot believe that there exists a reader of the English Wikipedia who would not understand 340 kg (750 lb). Why would anyone spell out "kilogramme/kilogram" in any normal conversion? Who does it benefit? Frankly, if FAC is insisting on blindly following that piece of MOS advice, you might want to consider whether taking your article to FAC actually improves it. --RexxS (talk) 20:39, 19 July 2019 (UTC)
You misconstrue the situation entirely. I like to spell out the unit when it forms part of a compound adjective like 15-inch shell, other than that I mix spelled out and abbreviated units at whim. And no reviewer at FAC has ever complained about that habit. My reviewer was as unaware as I was that kilogram was a legitimate spelling in British English.--Sturmvogel 66 (talk) 21:00, 19 July 2019 (UTC)
I'm sorry, but I don't believe I misconstrue the underlying issue at all. As I thought I'd made clear, we were discussing the spelling out of very common unit names – after all this is the talk page for Template:Convert. Of course we would often spell out a "15-inch shell" in prose to match our sources, but I'm really not so sure we'd want to call it a "15-inch (38 cm) shell", and even if we did, wouldn't a "15 in (38 cm) shell" be just as comprehensible? My contention remains that for conversions, there is never any good reason to spell out the commonest unit names at all.
I'm pleased that nobody at FAC has expressed concerns about not following MOS:UNITNAMES. If you therefore use kg consistently in conversions (i.e set |abbr=on), you'll never have to worry about whether 'kilogram' is acceptable as an en-gb spelling. That then avoids inventing non-iso codes such as "en-UK2" and making further complications for Johnuniq to sort out. --RexxS (talk) 21:44, 19 July 2019 (UTC)
As I said above, I see no reason to code a variant spelling into the template. Adj=on doesn't produce the hyphen if you're abbreviating the units, which I why I prefer to spell out the units in those cases because your abbreviated formulation looks bizarre to my eyes. Not incomprehensible, though, which makes it a stylistic preference. And thank you for pointing out the obvious about the benefits of abbreviating the units. You see no reason to ever spell out the units, obviously I disagree, and we are each free to do as we see fit.--Sturmvogel 66 (talk) 22:05, 19 July 2019 (UTC)
  • This looks like the same with "released v. realized, connection v. connexion and gaol v. jail" all of them are accepted in British English. Yes maybe kilogram is more common than a kilogramme but that doesn't mean we should only use kilogram. If the reviewer wants to write British English with kilogramme than it's fine. It's the editor who decides the style of English. However, it should be possible to use both "kilogrammes" in a separate template. Cheers. CPA-5 (talk) 22:54, 19 July 2019 (UTC)

I have some scripts for searching local files, including an April 2019 dump of all articles. Here are some numbers:

  • "kilogramme" is mentioned six times in all the convert talk archives (January 2007 to present). Each mention was merely someone's spelling of kilogram—the archives show no one has asked for kilogramme in over 12 years.
  • Due to {{convert}}, "kilogram" occurs 14,784 times in articles (and "kg" over 128,000 times).
  • In addition, there are 11,786 "kilogram" (without convert); total 14,784 + 11,786 = 26,570 of "kilogram".
  • "kilogramme" occurs 286 times in articles (including those that discuss the word, such as Kilogram and New Zealand English#Spelling).

I don't see a need for "kilogramme"—every option adds complexity for editors. By the way, in {{convert}}, the only available spelling option is |sp=us. Using anything else (such as |sp=en-uk) gives an error. Johnuniq (talk) 03:48, 20 July 2019 (UTC)

  • As long dictionaries say that kilogramme is typical British then we've to accept that. Even if the numbers (without convert) of kilogram are higher than kilogramme. So think the user should choose to wither it should use. But I think there should be a convert template for the kilogramme. Because why shouldn't have one? Cheers. CPA-5 (talk) 10:49, 20 July 2019 (UTC)
    Okay, if you insist. I've made a quick demo of a template that calls an extra function that I've added to Module:Convert/sandbox. You can wrap it around a conversion template. This gives:
    • {{sandbox/Gramme |The weight is in grams.}}{{sandbox/Gramme|The weight is in grams.}}
    • {{sandbox/Gramme |{{convert|12|kg}}}}{{sandbox/Gramme|12 kilograms (26 lb)}}
    • {{sandbox/Gramme |{{convert|30|lb|abbr=off}}}}{{sandbox/Gramme|30 pounds (14 kilograms)}}
    • {{sandbox/Gramme |{{convert|4|oz|abbr=off}}}}{{sandbox/Gramme|4 ounces (110 grams)}}
    • {{sandbox/Gramme |a {{convert|20|kg|adj=on}} shell}}{{sandbox/Gramme|a 20-kilogram (44 lb) shell}}
    If you can get consensus for implementation, the Lua code can either be moved to its own module or you might persuade Johnuniq to clean up my 'dirty' code and append it to Module:Convert. The template itself could move from sandbox to Template: space proper. Cheers --RexxS (talk) 13:59, 20 July 2019 (UTC)
Not all dictionaries say that kilogramme is typical British and most places in the UK use kilogram including UK Gov, so I don't think there is a need for the alternative spelling. -- WOSlinker (talk) 14:36, 20 July 2019 (UTC)
  • So, "kilogramme" is used in BrEng ok. Now this: is "kilogram" NOT BrEng? -DePiep (talk) 22:23, 20 July 2019 (UTC)
  • Both kilogramme and kilogram are used in British English, which means that there is no need for adding an additional kilogramme to the template. However, I would welcome it. --Johannes (Talk) (Contribs) (Articles) 00:04, 21 July 2019 (UTC)
I think that as both are used, we need the option to use either to preserve spelling consistency in a specific article. -- DeFacto (talk). 09:08, 21 July 2019 (UTC)

@RexxS: That's a solution but I think a more direct approach would be to define gramme as a unit, making it a copy of g except for the name. Then gramme and kgramme and Mgramme and so on would be valid unit codes. However, WOSlinker points out the UG Gov is happy with kilogram, so that should be sufficient for Wikipedia. Making editors happy is good but how many editors actually see a need to use kilogramme in a conversion in an article? Note 2 at the kilogram article lists standards bodies (International Bureau of Weights and Measures, US, UK, Canada and Australia) which use kilogram. Variations in the spelling of an internationally standardized unit somehow seems less supportable than agreeing to accept variations like color/colour. It's not exactly a MOS issue (they would say to argue it out on the article talk page) but I would be happier if opinions were sought at WT:Manual of Style/Dates and numbers before blessing another unit here. Johnuniq (talk) 01:53, 21 July 2019 (UTC)

@Johnuniq: the English language is not regulated, and you'll probably find both spellings are used by the UK government, dependent on the preference of the document author - as with several other words which have more than one common UK spelling. -- DeFacto (talk). 09:14, 21 July 2019 (UTC)
I would have no problem if we were talking about variations in the spelling of a unit such as pound. However, kilogram is one of the seven SI base units and the note 2 link I gave points out that: "The spelling kilogram is the modern spelling used by the International Bureau of Weights and Measures (BIPM), the US National Institute of Standards and Technology (NIST), the UK's National Measurement Office, National Research Council of Canada, and the National Measurement Institute, Australia." As I mentioned, this is the first time anyone has requested kilogramme in the twelve years that {{convert}} has operated, so the number of editors wanting the variation is very small. I don't have a core objection to the proposal but would like to see a slightly wider discussion involving MOS to confirm that varying the spelling of one of the seven SI base units is desirable per WP:ENGVAR. If there is a need for a conversion in a particular article which this discussion is holding up, a workaround would be:
  • 12.3 kilogrammes ({{convert|12.3|kg|disp=out}}) → 12.3 kilogrammes (27 lb)
Johnuniq (talk) 10:38, 21 July 2019 (UTC)
Since it was my idea, I thought I should start the MOS discussion, see WT:Manual of Style/Dates and numbers#Kilogram vs. kilogramme. Johnuniq (talk) 10:59, 21 July 2019 (UTC)

kp·m

Apparently, the template:convert does not support kp's derived units. {{convert|10|kp|N|2|abbr=on}} works as expected (10 kp (98.07 N)), but {{convert|10|kpm|Nm|2|abbr=on}} fails (10 kp⋅m (98.07 N⋅m)). A fix would be appreciated. Best, --Johannes (Talk) (Contribs) (Articles) 10:07, 25 July 2019 (UTC)

According to Kilogram-force (which is where Kilopond redirects to): "The term "kilopond" has been declared obsolete and should no longer be used." Some data from April 2019 shows that 12 converts use kp out of the nearly 3 million converts in articles. How confident are you that kpm should be defined as a new unit? What articles would use the unit?
Alternative units follow. This shows unit code, symbol (abbr=on) and name (abbr=off).
  • kg-f : kgf : kilogram-force
  • kgf : kgf : kilogram-force
  • kg.m : kg⋅m : kilogram metre
  • kgf.m : kgf⋅m : kilogram force-metre
Johnuniq (talk) 10:51, 25 July 2019 (UTC)
Kilopond is an obsolete unit, which is why I believe that the article states that the term should no longer be used. kg·m does not equal kp·m. It would require an additional multiplication with m·s−2·9.80665−1 to equal kp·m. With kgf·m, f would mean m·s−2·9.80665−1 which does not seem very convincing; f·x−1 is usually used for aperture (f-number). kp·m (and m·kp) can be found in dozens of books, and tech specs, especially from the 1970s and 1980s, for example: page 77, page 4, page 21, Bosch (ed.): Krafahrtechnisches Taschenbuch, 25th editione, Springer, Wiesbaden 2003, ISBN 978-3-528-23876-6. page 26, etc. kp·m (or m·kp) could be used in virtually every article on (especially European) motor vehicles older than 40 years. Best, --Johannes (Talk) (Contribs) (Articles) 14:25, 25 July 2019 (UTC)
Re "kg·m does not equal kp·m", the unit codes kg.m and kgf.m will give identical numbers and should both work correctly in torque conversions because convert knows that the "kg" in kg.m is referring to a force.
Please provide a couple of specific examples of text in existing articles (and link to the articles) so people here can see what convert might do. We agree that kp is obsolete, so displaying it in conversions seems unnecessarily confusing. With specific examples it might be possible to decide that a unit was desirable, or that either kg.m and kgf.m should be used instead even if the source says kp. I'm busy elsewhere and hope that others can assess what should occur. Johnuniq (talk) 05:24, 26 July 2019 (UTC)
Well, as I have said, kg and kp are not the same − kg lacks the acceleration; therefore, kg is not a force, and it cannot be used as force, so neither kg·m nor m·kg may be used when describing torque. I don't know what exactly kg·m is supposed to be, but I reckon it solely exists because of ignorance or a lack of a force unit. Displaying kp may become necessary if a source gives a kp figure; currently, all I can do is convert manually (I have given some examples for sources that use kp; I own several printed books that give kp figures, but listing all of them would possibly render my reply unreadable). Examples for articles that could use kp·m: Virtually any articles on European pre-1978 vehicles. There are some articles that already exist (and they can be found easily), but I list some: Ikarus 256, Ikarus 250, Ikarus 55, IFA W50, Unimog, Dacia 1300, Mercedes-Benz 450SEL 6.9, Porsche 935, Ford Taunus P1. As far as I can tell, adding the option to use kp·m would not be a big deal, but actually make it possible to use kp·m figures (only if they appear in sources; converting to kp·m seams unreasonable, I would like to convert from it). Best, --Johannes (Talk) (Contribs) (Articles) 18:06, 26 July 2019 (UTC)

Regardless of dimensional analysis, many people like "kilogram metre" rather than "kilogram force-metre" although they intend that the two have equivalent meanings. That's many people (and sources) which is why convert supports kgm. I should write a subpage setting out what is meant here by "example of proposed usage" but meanwhile I added kpm as a temporary unit. We can review the situation in a couple of months to see whether it is useful. Some examples follow.

  • {{convert|12.3|kpm}} → 12.3 kilopond metres (121 N⋅m; 89 lb⋅ft)
  • {{convert|12.3|kpm|lk=on}} → 12.3 kilopond metres (121 N⋅m; 89 lb⋅ft)
  • {{convert|12.3|kpm|abbr=on}} → 12.3 kp⋅m (121 N⋅m; 89 lb⋅ft)
  • {{convert|12.3|kpm|kgm}} → 12.3 kilopond metres (12.3 kg⋅m)

Please let me know if there are any problems with how kpm works. Johnuniq (talk) 00:39, 27 July 2019 (UTC)

I for one am glad someone like Johnuniq is keeping the convert machinery well-oiled and humming. EEng 04:34, 27 July 2019 (UTC)
Thanks but where's the image? Johnuniq (talk) 04:54, 27 July 2019 (UTC)
For you I did two. Top of this page. EEng 05:15, 27 July 2019 (UTC)
That's pretty accurate! Johnuniq (talk) 05:29, 27 July 2019 (UTC)
Though I've never actually seen the code. But after 40 years as a computer engineer, I don't have to see it to know what it must look like. EEng 17:22, 27 July 2019 (UTC)