Module talk:Wd/Archive 1: Difference between revisions

Content deleted Content added
m Archiving 1 discussion(s) from Module talk:Wd) (bot
m Archiving 1 discussion(s) from Module talk:Wd) (bot
Line 967:
 
:I don't know of any way to do that currently, but I can see it could be useful. Complications: there could be several values which are valid in a certain date, would need to filter results by language. I can't see any way it could be linked because these are text labels and so not linked to any articles. &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 08:12, 1 November 2022 (UTC)
 
== Area ==
 
I have been using the template to create lists of suburbs in LGA articles (see [[Shire of Serpentine-Jarrahdale]] as an example). It was pointed out to me that the statement drawn from Wikidata, "3.5 square kilometre", is actually incorrect and it should be the plural "square kilometres". The way around this is just to use the "raw" parameter and add square kilometres at the end of the template. Apart from this, it would also be handy to be able to convert the value to the US square mile. I achived this with the convert template, resulting in the rather complicated <nowiki>{{convert|{{wikidata|property|raw|Q5004080|P2046}}|km2|sqmi|abbr=unit}}</nowiki>. Is there currently any either way with the template to achieve the following two:
:Substitute the Wikidata unit with an abbreviated unit (like km2)
:Convert the unit from SI to Imperial and vice-versa
Thanks for any advice. [[User:Calistemon|Calistemon]] ([[User talk:Calistemon|talk]]) 04:40, 28 November 2022 (UTC)
:When I look at the Wikidata entry for [https://www.wikidata.org/wiki/Q5004080 Byford], I see "19.6 square kilometre" under "area" and "64 metre" under "elevation above sea level", which appear to be wrong. That is not a valid way to write distance or area in SI. The table at [[MOS:UNITNAMES]] even makes this explicit for those who need to hear it: "SI unit names are pluralized by adding the appropriate -s or -es suffix". I think that strange way of writing units is where the problem lies, so fixing it at Wikidata is probably best. – [[User:Jonesey95|Jonesey95]] ([[User talk:Jonesey95|talk]]) 06:29, 28 November 2022 (UTC)
:@[[User:Calistemon|Calistemon]]: please use <code><nowiki>{{convert|input=P2046|qid=Q5004080|abbr=on}}</nowiki></code> which produces {{convert|input=P2046|qid=Q5004080|abbr=on}} &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 07:24, 28 November 2022 (UTC)
 
:{{replyTo |Calistemon}} Or just <code><nowiki>{{cvt |input=P2046 |qid=Q5004080}}</nowiki></code> to produce {{cvt |input=P2046 |qid=Q5004080}}. [[User:Betterkeks|Betterkeks]] ([[User talk:Betterkeks|talk]]) 09:00, 28 November 2022 (UTC)
::Thank you {{replyTo|Betterkeks|MSGJ}}, this is such a simpler way to achieve this instead of the clumsy way I produced! Much appreciated. [[User:Calistemon|Calistemon]] ([[User talk:Calistemon|talk]]) 06:58, 29 November 2022 (UTC)