Template talk:Convert/Archive June 2019

Converting qualifier value from Wikidata
Hello. How do I convert a qualifier value from Wikidata? For example, what is the neatest way to convert length in this statement:. Reh man  15:48, 30 April 2019 (UTC)
 * An example would help understanding the issue. What text in what article would convert be operating on? What would the desired result be? Bear in mind that the enwiki community is not happy with the idea of getting values from Wikidata. For example, see Module:Cycling race which has been effectively removed from enwiki and might be deleted following WT:WikiProject Cycling. Johnuniq (talk) 23:36, 30 April 2019 (UTC)
 * Johnuniq, no live examples yet, but looking here, I feel things like  are better off as a qualifier to   (compared to how it is now). But I'm not sure if that can be done with the current functions of Convert. Fyi, the Wikidata structure was defined by myself a few days ago, so there should not be any issue in changing it. And hence, if there are any better alternatives, it could also be done.  Reh  man  01:30, 1 May 2019 (UTC)
 * Template:Infobox power station includes these converts in some complex wikitext for data38:

ft undefined m undefined
 * If more is wanted, I recommend asking who has done a lot of infobox with Wikidata work. Johnuniq (talk) 01:42, 1 May 2019 (UTC)

Thanks Johnuniq (sorry, I missed your reply earlier). Hi. May I ask for your thoughts on this please? Reh man  11:57, 20 May 2019 (UTC)
 * An example of what is wanted is needed: article; Wikidata item, properties; desired output. Johnuniq (talk) 00:30, 21 May 2019 (UTC)
 * Hey Johnuniq. As per my reply on May 1, there isn't a live example as yet. I need to know if this function could be imlemented so as to define the structure to store this data:
 * , with qualifier
 * As you can see, the above structure is for barrage length, for tidal power stations that uses tidal barrages. I need a way to convert the qualifier value in the infobox.
 * The function (or future function) of being able to convert the qualifier values also has a number of more uses, such as converting, with qualifier  , for wind farms.
 * -- Reh man  12:22, 21 May 2019 (UTC)
 * @Rehman: Are you saying that an article would have an infobox, and some syntax in the infobox would determine whether the Wikidata item for the article exists, and if so, if it has a tidal barrage part with property length, and if so, the unit provided for that length would be converted to some other default unit? I think that's a bit much for convert. Perhaps there could be a wrapper which checks each step and calls convert if a suitable value and unit can be determined. Johnuniq (talk) 23:15, 21 May 2019 (UTC)
 * Johnuniq, yes. I agree it is rather complex, especially when looked in the above perspective. I will also see if anything can be done from Module:WikidataIB. Cheers, Reh  man  06:39, 22 May 2019 (UTC)
 * Module:WikidataIB already has the ability to call cvt internally (lines 902-908, 1010-1015) on any output by specifying . Using the the :
 * It should handle ranges as well. I'm hoping that will do the trick. Cheers --RexxS (talk) 16:41, 22 May 2019 (UTC)
 * @RexxS: Thanks, that's stunning work. I'll know who to call next time. Johnuniq (talk) 04:07, 23 May 2019 (UTC)
 * @RexxS: Thanks, that's stunning work. I'll know who to call next time. Johnuniq (talk) 04:07, 23 May 2019 (UTC)

Hello RexxS. Running  on Sagasolar Power Station, generates this error. Is that a bug? Reh man  09:46, 8 June 2019 (UTC)
 * Hi The problem was that Wikidata stated that the  for  was "ac". Unfortunately, nobody uses that symbol and convert naturally doesn't recognise it:
 * → 45 ac
 * I've fixed it for now by removing the Wikidata entry. So for :
 * Note that if true is specified, it automatically sets  to true, so that it uses symbols preferentially where they exist. Also, if you set 1, then you're only getting one value returned, which makes true and "  " redundant. Cheers --RexxS (talk) 10:44, 8 June 2019 (UTC)
 * Thank you RexxS! Reh  man  10:50, 8 June 2019 (UTC)
 * Note that if true is specified, it automatically sets  to true, so that it uses symbols preferentially where they exist. Also, if you set 1, then you're only getting one value returned, which makes true and "  " redundant. Cheers --RexxS (talk) 10:44, 8 June 2019 (UTC)
 * Thank you RexxS! Reh  man  10:50, 8 June 2019 (UTC)

Template:Conv
While correcting an error, I noticed that it was due to a syntax problem in conv which I don't recall but which was discussed before. Template:Conv is a redirect to convert and was created in July 2014. It has 350 transclusions. If anyone feels like replacing these with convert, please go ahead! Saving three characters while introducing confusion (what is conv? is it different from convert?) does not seem useful to me. Johnuniq (talk) 08:16, 6 June 2019 (UTC)
 * Template:Conv actually dates back to 2007, but the earlier version was deleted. I agree that the present redirect has no real value. I'll see if I can make the changes using AWB. --RexxS (talk) 16:56, 6 June 2019 (UTC)
 * Great, I see you have finished already and conv is now not used in articles. That caused me to notice an RfD for Template:Con showing that con is also a redirect to convert with 63 transclusions. I wonder if TfD participants would support deletion of conv + con on the grounds that it is better to remove confusion and require convert given the tiny saving in typing. Johnuniq (talk) 00:49, 8 June 2019 (UTC)
 * I replaced con with convert so that is clean for the moment. Johnuniq (talk) 04:14, 8 June 2019 (UTC)
 * I suspect the folks over at WP:Redirects for discussion will prefer to keep redirects as they are cheap, but we could try it. Anyway, it's easy enough to clean up conv and con – in fact we might be able to persuade the folks at AWB to include those in their "general clean-up" in the same way as AWB changes cn to citation needed. That might be better than regularly explaining to folks what happened to their favourite short-cut if those were deleted. --RexxS (talk) 10:00, 8 June 2019 (UTC)
 * AWB general clean-up would be a good idea if achievable. OTOH maybe we could wait for a couple of months and see if much gets added. Articles using the templates are: conv + con (those links show nothing at the moment). Johnuniq (talk) 10:08, 8 June 2019 (UTC)
 * The editors at RfD have some strange fetish to keep almost absolutely any redirect that has ever been created. The editors at TfD seem to be much less sympathetic to bad redirects. Sadly, RfD handles this. While redirects might be cheap, they can, and do cause problems in actual module code, which can be (usually) fixed, but can require massive amount of work or a lot of extra lines, for very few, if any, benefit other than "redirects are cheap", which, is contradictory to the amount of work it takes to support them. --Gonnym (talk) 19:16, 13 June 2019 (UTC)
 * We could declare them both "Deprecated" and add Deprecated template. I think the code issues mentioned by Johnuniq and Gonnym are serious enough for this. When done formally here (by consensus), we can ask AWB people to replace instances in general cleanup, as with the example mentioned. -DePiep (talk) 10:12, 14 June 2019 (UTC)
 * We could declare them both "Deprecated" and add Deprecated template. I think the code issues mentioned by Johnuniq and Gonnym are serious enough for this. When done formally here (by consensus), we can ask AWB people to replace instances in general cleanup, as with the example mentioned. -DePiep (talk) 10:12, 14 June 2019 (UTC)

Template:Infobox unit/doc
Editors who understand units might like to consider recent edits at Template:Infobox unit/doc. Please add any thoughts at Template talk:Infobox unit. Johnuniq (talk) 08:06, 22 June 2019 (UTC)