Template talk:Infobox settlement

Template-protected edit request on 20 December 2023

On Navajo Nation, the flag currently bears the alt/title text "Flag of {{{official_name}}}" because the flag alt/title does not use the page name by default. It seems this also happens with the seal, coat of arms, etc.

Please replace all instances (7 of them) of

{{#if:{{{name|}}}|{{{name}}}|{{{official_name}}}}}

to match the syntax used for this infobox's |above=:

{{if empty|{{{name|}}}|{{{official_name|}}}|{{PAGENAMEBASE}}}}

I've tested this change at Template:Infobox settlement/sandbox. There's no applicable test case for this since all of the ones in /testcases all have set |name= or |official_name= parameters (to avoid "Template:Infobox settlement/testcases" from being used). But you could go to Navajo Nation, edit the article, replace the use of "Infobox settlement" with the sandbox, and it should work properly in the preview. Chlod (say hi!) 03:50, 20 December 2023 (UTC)[reply]

 Done hi chlod SWinxy (talk) 01:38, 21 December 2023 (UTC)[reply]
thanks, @SWinxy! :D Chlod (say hi!) 01:49, 21 December 2023 (UTC)[reply]

"Show both" instead of "Show all"

When there's two maps that can be flipped between, instead of an option that says "Show all" it should say "Show both". Akeosnhaoe (talk) 10:02, 12 January 2024 (UTC)[reply]

Some articles contain more than two pushpin maps in the infobox (though I don't think I've seen more than three). Deor (talk) 12:03, 12 January 2024 (UTC)[reply]
I understand, and for those cases (3 or more) it should be "Show all". Akeosnhaoe (talk) 03:14, 20 January 2024 (UTC)[reply]
It's irrelevant - this is not the place to discuss the matter, as this infobox has no control over {{Location map}}. If you want the map to change as proposed, it should be discussed at Module talk:Location map. Primefac (talk) 13:53, 20 January 2024 (UTC)[reply]

Why is Hellersdorf in the "bad settlement type" category?

Can anyone explain why Hellersdorf in Category:Pages using infobox settlement with bad settlement type? – Jonesey95 (talk) 02:51, 14 January 2024 (UTC)[reply]

Looks like this gets rid of that error and creates another one? Nikkimaria (talk) 03:00, 14 January 2024 (UTC)[reply]
Confusingly, |City= is a valid parameter in {{Infobox German place}}, which is a wrapper for this template, which calls Module:Settlement short description, which generates the error category. I haven't been able to figure out why the module thinks that the value it is fed is a bad settlement type, though. – Jonesey95 (talk) 03:06, 14 January 2024 (UTC)[reply]

When I set the value of child parameter of the sub-template to Yes, why doesn't it appear as intended, especially within Infobox settlement? The border still exists. Natsuikomin (talk) 11:42, 23 January 2024 (UTC)[reply]

Can you give an example? E.g. at Marrakesh this seems to work as intended. Fram (talk) 12:09, 23 January 2024 (UTC)[reply]
In George Town, Penang infobox. Can you believe what I've been going thru?
The order of paramater matters. The sub-infobox should be right below the website parameter (so the website would be the last parameter in the infobox if the sub-parameter were removed). And the infobox I edited has its website parameter in the middle of the other parameters. Moreover, the value of child parameter inside the sub-infobox should be 'yes' (not capitalised) instead of 'Yes' (capitalised).

This is the first I met a case like this. I used to think that Wikipedia server machine will not take the order into account and just rearranges the parameters order for us when we want to render the page on our browser. Hereby, I have found the solution after it took me about 1 hour. Thanks. Natsuikomin (talk) 12:54, 23 January 2024 (UTC)[reply]
Okay, I lately noticed a new thing about the order. The order is the case if I don't use the module parameter. I originally just put the Infobox UNESCO World Heritage Site at the bottom of the parent infobox because I took the infobox on Hebron as an example. Hmm.. Natsuikomin (talk) 13:26, 23 January 2024 (UTC)[reply]
The documentation for this template explains: "module: To embed infoboxes at the bottom of the infobox". You figured it out on your own. The order of parameters does not matter if they are used correctly. I have fixed Hebron. – Jonesey95 (talk) 16:51, 23 January 2024 (UTC)[reply]
I know. At first I used the module parameter, but the sub-infobox had a border around and the width didn't occupy 100% as it looks now on George Town, Penang and Hebron. It likely happened because I set the value of child parameter of the sub-infobox to 'Yes' (capitalised) instead of 'yes' (not capitalised). That's why I use Hebron infobox as an example and, as you can see from my previous comments, the second problem came. Natsuikomin (talk) 22:41, 23 January 2024 (UTC)[reply]

Default image alt text duplicates caption

This code for this infobox when embedding an image contains |title={{if empty|{{{image_caption|}}}|{{{caption|}}}|{{{image_alt|}}}|{{{alt|}}}}}}}. When the alt= parameter is empty or missing, this results in the image's ALT text getting set to the text of the caption. (example) This is an improper ALT text: The alt text is intended to be read out by screen readers just before the caption, so avoid having the same details in both. (MOS:ALT) This behavior is also unhelpful for sighted readers in that it repeats the caption right below the image. Opencooper (talk) 16:19, 4 March 2024 (UTC)[reply]

When I expand the infobox at Algiers using Special:ExpandTemplates, I do not see any |alt= attributes in the code for any of the images, but there is a lot of code. Can you please create a minimal example showing the problem? – Jonesey95 (talk) 18:42, 4 March 2024 (UTC)[reply]
Sorry, I should have been more clear. The alt attribute I am referring to is in the final generated HTML on the article's page. If you right click the image and use your browser's inspect element feature, you'll see <img […] alt="Clockwise, top left[…]. Opencooper (talk) 00:00, 5 March 2024 (UTC)[reply]
What would be your proposed resolution? Nikkimaria (talk) 04:07, 5 March 2024 (UTC)[reply]
Many other Infobox templates set the image title to the alt text, if there is any. So one solution would be to stop using the caption: |title={{if empty|{{{image_alt|}}}|{{{alt|}}}}}}}. Opencooper (talk) 05:34, 5 March 2024 (UTC)[reply]
Feel free to make that change in the sandbox to see if it makes a difference. When I expand the infobox at Algiers, the File call in wikitext looks like [[File:Algiers Montage.png|275px|'''Clockwise, top left''': Coast of Algiers, [[Maqam Echahid|Maqam Echahid (Martyrs' Memorial)]], [[Notre-Dame d'Afrique|Basilique Notre Dame d'Afrique]], [[Ketchaoua Mosque]], [[Kasbah of Algiers]], [[Grande Poste d'Alger|Algiers Central Post Office]], [[Ministry of Finance (Algeria)|Ministry of Finance building]]]]. I don't see an alt tag in there, which makes me think that changing this infobox will not change the rendered HTML. Something in the MediaWiki code may be generating the alt text in the rendered HTML. – Jonesey95 (talk) 19:30, 5 March 2024 (UTC)[reply]
I was operating under the assumption that these templates did not use the image linking syntax, but this proves otherwise. Therefore, your comment over at Infobox writer seems to apply: when thumb […] is not specified [and] no alt text is specifically requested, use the requested caption as alt text. So technically this is expected behavior of the image linking syntax. (though confusingly, is not seen on all Infobox templates) But this behavior is against the MoS and results in unhelpful duplication. However, I'm not sure where to get this changed and would probably need an RfC. Opencooper (talk) 16:49, 15 March 2024 (UTC)[reply]

Move some items from left side to right side

I think some items, like elevation_max_point and elevation_min_point, should be moved from the left to the right side. When there is too much text on any row on the left side (like these two parameters), the left column automatically becomes wider and the right column becomes narrower, which isn't great, because the right column generally has more text overall.

An example is Montgomery (village), New York, where you can see the wider left column and narrower right column. I prefer names, areas, and population density on a single line when possible.

I will also note that the "desktop" and mobile views look different. There is much more whitespace on the "desktop" version, and on the page I mentioned, the ratio between left and right column widths is better on the mobile version. Kk.urban (talk) 20:28, 11 March 2024 (UTC)[reply]

That page looks normal to me in both the desktop and mobile versions. I use the default Vector 2022 skin for desktop. That said, I also think those two parameters should be moved to the right side; they are values, not labels. I have modified the sandbox, and you can see a test case in my sandbox. – Jonesey95 (talk) 21:32, 11 March 2024 (UTC)[reply]
@Jonesey95 It looks different from "normal" because on most settlement articles, the right column is wider than the left. Your sandbox looks good. Kk.urban (talk) 22:20, 11 March 2024 (UTC)[reply]
Retrieved from "https://en.wikipedia.org/w/index.php?title=Template_talk:Infobox_settlement&oldid=1213872053"