Template talk:Infobox body of water

From Wikipedia, the free encyclopedia
Jump to: navigation, search
WikiProject Lakes (Rated Template-class)
WikiProject icon Template:Infobox body of water is within the scope of WikiProject Lakes, a collaborative effort to improve the coverage of lake-related articles on Wikipedia, using the tools on the project page. If you would like to participate, please visit the project page, where you can join the discussion and see a list of open tasks. WikiProject icon
 Template  This template does not require a rating on the project's quality scale.

Bodies of water defined by their narrowest point[edit]

The body of water info box is often used for straits and other bodies of water where the minimum width is notable, not the maximum width. The available width parameter produces a Max. Width field in the info box, which is wrong. How would this be corrected? Fengshui~enwiki (talk) 23:00, 28 July 2016 (UTC)

Fengshui~enwiki, since there were no objections, I have added this optional parameter, |min_width=. Frietjes (talk) 12:27, 26 August 2016 (UTC)

Template-protected edit request for link[edit]

Please change hash in hyperlink for Type title to #Waterbody types. Rtrust (talk) 03:26, 9 October 2016 (UTC)

Done Matt Fitzpatrick (talk) 04:56, 9 October 2016 (UTC)
Thanks, Matt Fitzpatick! Rtrust (talk) 02:13, 17 October 2016 (UTC)

Images size[edit]

Nice template! Would you mind adding functionality to change the image size, as on Template:Infobox river? Also, could you add functionality to allow the box to say "Cities/Towns/Ports" in addition to or instead of "Settlements"? For example, the river template uses subdivision_type for this. I'd like to expand the use of infoboxes on articles about bays, gulfs, sounds, straits, etc., because I think the quick organized overview of facts is useful for articles like that. Vejlenser (talk) 18:17, 8 November 2016 (UTC)

Hi Vejlenser, the documentation is loath to admit it, but |image_size= is supported. See Braddock Bay for an example. Can't help you with the rest of your concerns, although I sympathize. Antepenultimate (talk) 07:18, 3 December 2016 (UTC)
Thanks, Antepenultimate! Vejlenser (talk) 20:25, 3 December 2016 (UTC)

Deprecations of measurement params[edit]

So a couple of things I noticed. First, is there a reason that only metric params are accepted for distances? For example, there is a {{{depth_m}}} but not a {{{depth_ft}}}? I know that metric is used much more than standard and even as an american I wish the whole world would just use the metric system.... But sadly here in the US, "standard" measurements are still the standard... Ha.. Pun.... Anyway back to seriousness. Secondly, the convention seems to be going away from having transclusions of templates use the {{convert}} templates. That is to say that instead of having | depth = {{convert|123|m|ft}} we would go with | depth_m = 123 even though these produce the same result.

So that brings me to my proposal, which I am more than happy to implement 100% on my own. I just want to make sure there are no objections. The proposal has two parts:

  1. Add in "standard" equivalents for all measurements. {{{length_mi}}}, {{{depth_ft}}}, etc.
  2. Deprecate ALL instances of params without a specific unit of measurement. So {{{length}}}, {{{depth}}}, etc. would all be added to Category:Wikipedia infobox body of water articles using deprecated parameters regardless of whether they are using {{convert}} or not. This would also include an update to the documentation that I would handle. :-)

Hoping to hear any and all feedback! --Zackmann08 (Talk to me/What I been doing) 20:29, 2 December 2016 (UTC)

The {{{depth_m}}}, {{{depth_ft}}}, etc. parameters were introduced in 2009 but were reverted on account of there (supposedly) being too many parameters as per this discussion. Anyway, that was seven years ago. Now we have Lua and can therefore read input units. For example, we don't need |depth_ft=123 since, instead, we can have |depth=123 ft, which Lua can recognise as 123 feet and then we can convert. For a more detailed idea of what I'm on about, have a look at Template:Infobox_person (which uses Template:Infobox person/length, Template:Infobox person/weight, etc.). Jimp 08:32, 29 January 2017 (UTC)

Jimp, I would support replacing uses of |depth_m=10 with |depth=10 m and using a system similar to the system used with Template:Infobox_person to automatically convert the input. for elevation, depth, and max-depth we can basically expect either m or ft. for volume, things become much more complicated. I have seen km3, acre.ft, m3, L, ML, GL, impgal, USgal, e6m3, e6L, ... I can see how we could pattern match to pass this to {{convert}}, but it would be nice if we could track unusual cases to check to see if there were any problems. for example, people copy stuff between wikis and switch the comma and the decimal, or use km2 for volume, or other nonsense. for now, I am tracking and changing transclusions without any unit conversions to use {{convert}} and visually checking the results as I change them. Frietjes (talk) 14:10, 29 January 2017 (UTC)
That sounds like a good plan. I might try and see what kind of error checking I can come up with in the sandbox. Jimp 02:13, 30 January 2017 (UTC)

To begin with, we must get rid of the _kms, _m2s, etc. & the _refs. Jimp 16:13, 8 February 2017 (UTC)

Jimp, all the old _kms, _m2s, ... _refs have been removed and cleared from the articles. any new ones will pop up in Category:Pages using infobox body of water with unknown parameters, sorted by parameter name. in the process of cleaning up all the old syntax, I removed the new unit conversion code that you had added. sorry about that. please feel free to add it back. I am currently (partially) tracking any unconverted measurements in Category:Wikipedia infobox body of water articles using deprecated parameters. false positives could start popping up in there if we support stuff like |length=10 km without any explicit unit conversion. however, I can adjust the tracking code if/when this happens. the fact that the Category:Wikipedia infobox body of water articles using deprecated parameters is empty right now means that we should have nearly 100 percent of all articles using {{convert}} or a hard-coded version for the measured parameters. thank you. Frietjes (talk) 15:41, 9 March 2017 (UTC)
@Frietjes: That new unit conversion code was only ever meant to be temporary. The main purpose was to find the pages using _kms, _m2s, ... _refs so we could get rid of them ... but, if that job's been done, great. Jimp 02:18, 11 March 2017 (UTC)