Misplaced Pages

Template talk:Infobox Switzerland municipality

Article snapshot taken from Wikipedia with creative commons attribution-sharealike license. Give it a read and then ask your questions in the chat. We can research this topic together.

This is an old revision of this page, as edited by Jonesey95 (talk | contribs) at 19:34, 5 November 2020 (Template-protected edit request on 5 November 2020 – wording change to avoid awkward "Municipality of Switzerland": and more...). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

Revision as of 19:34, 5 November 2020 by Jonesey95 (talk | contribs) (Template-protected edit request on 5 November 2020 – wording change to avoid awkward "Municipality of Switzerland": and more...)(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)
This is the talk page for discussing improvements to the Infobox Switzerland municipality template.
This template does not require a rating on Misplaced Pages's content assessment scale.
It is of interest to the following WikiProjects:
WikiProject iconInfoboxes
WikiProject iconThis template is within the scope of WikiProject Infoboxes, a collaborative effort to improve the coverage of Infoboxes on Misplaced Pages. If you would like to participate, please visit the project page, where you can join the discussion and see a list of open tasks.InfoboxesWikipedia:WikiProject InfoboxesTemplate:WikiProject InfoboxesInfoboxes
WikiProject iconGeography
WikiProject iconThis template is within the scope of WikiProject Geography, a collaborative effort to improve the coverage of geography on Misplaced Pages. If you would like to participate, please visit the project page, where you can join the discussion and see a list of open tasks.GeographyWikipedia:WikiProject GeographyTemplate:WikiProject Geographygeography
WikiProject Geography To-do list:

Here are some tasks awaiting attention:
WikiProject iconSwitzerland
WikiProject iconThis template is within the scope of WikiProject Switzerland, a collaborative effort to improve the coverage of Switzerland on Misplaced Pages. If you would like to participate, please visit the project page, where you can join the discussion and see a list of open tasks.SwitzerlandWikipedia:WikiProject SwitzerlandTemplate:WikiProject SwitzerlandSwitzerland
This template was considered for deletion on September 5, 2009. The result of the discussion was "keep".
This template was considered for deletion on 29 June 2013. The result of the discussion was "no consensus".
Archiving icon
Archives
Archive 1Archive 2Archive 3
Archive 4


This page has archives. Sections older than 14 days may be automatically archived by Lowercase sigmabot III when more than 3 sections are present.

Edit Request-Add Canton Maps

This edit request has been answered. Set the |answered= or |ans= parameter to no to reactivate your request.

Please replace the template with the version found at Template:Infobox Swiss town/sandbox2. The sandbox2 version changes the location map from just showing Switzerland to showing 2 location maps, either the country or the canton or both. It uses the location = Switzerland#Canton of xxxx. Tobyc75 (talk) 15:04, 23 March 2017 (UTC)

Tobyc75, you may notice that the template request box above contains a bunch of tools, all geared to using sandbox, not sandbox2. You request that sandbox2 is made live, but the testcases page, even though nested under sandbox2, tests sandbox. For these reasons, Not done for now:. Cabayi (talk) 15:40, 23 March 2017 (UTC)
CabayiActually, the test cases to Sandbox2 all reference Sandbox2 not Sandbox. All the test cases start with: {{Infobox Swiss town/sandbox2 .Tobyc75 (talk) 15:54, 23 March 2017 (UTC)
Done @Cabayi: This was merely a matter of the headings/labels on the testcases page, not the actual examples transcluded on it. — Train2104 (t • c) 05:12, 24 March 2017 (UTC)
Train2104 So I saw after Tobyc75's comment. It's that type of discrepancy that shreds confidence in the testing. And a lack of response to the remainder of my comment which led me to let it sit. Also, it wasn't just a cut & paste replacement as requested.
Anybody object to getting rid of sandbox2 to ensure the proper sandbox is used in future? Cabayi (talk) 07:25, 24 March 2017 (UTC)
I've requested deletion of sandbox2 G6 as redundant to sandbox & not working with TE tools & templates. Cabayi (talk) 16:57, 22 May 2017 (UTC)

Including a wrong link to a coat of arms of ... page

Hi, the template sometimes includes a wrong link to a coat of arms of ... page. It will include such a link automatically if it exists (through the #ifexist:Coat of arms of {{{subject_name}}} fragment, but there is no guarantee that that is actually the correct page. On Saint-Barthélemy, Switzerland, subject_name is set to Saint-Barthélemy, and the template automatically includes a link to Coat of arms of Saint-Barthélemy (another Saint-Barthélemy unfortunately). Should I change subject_name on the target page to Saint-Barthélemy, Switzerland, or should this template be changed to allow the configuration of the correct value (e.g. link_coa = Coat of arms of Saint-Barthélemy, Switzerland)?

Thanks in advance for your response! Den Hieperboree (talk) 22:05, 22 September 2018 (UTC).

20 August 2020 edit request

This edit request has been answered. Set the |answered= or |ans= parameter to no to reactivate your request.

Greetings and felicitations. Would someone please be so kind as to add a plural option for the postal_code field? I checked both the documentation and the talk page archives and can't find one, nor does making the field plural ("postal_codes") currently work. (Please be so kind as to {{ping}} me when you respond.) —05:30, 20 August 2020 (UTC)

 Done Use |postal_code= as usual. You can see the new code in action at Geneva. Not pinging because you did not sign with your user name. Please fix your signature. – Jonesey95 (talk) 13:22, 20 August 2020 (UTC)

Edit request - Settlement type

This edit request has been answered. Set the |answered= or |ans= parameter to no to reactivate your request.

No type shown for most of the items.

| settlement_type = {{#ifeq:{{{municipality_type|}}} | former | ] of ] }}

please change to

| settlement_type = {{#ifeq:{{{municipality_type|}}} | former | ] of ] }}{{#ifeq:{{{municipality_type|}}} | municipality | ] of ] }}

TerraCyprus (talk) 19:25, 17 September 2020 (UTC)

What about city, or municipality and city? I think this might benefit from a switch statement that accounts for acceptable values that are used in actual articles. Also the note in the documentation starting with "Used to add the categories..." does not appear to be correct. Was that functionality removed? If so, was the removal intentional? – Jonesey95 (talk) 20:31, 17 September 2020 (UTC)
User:Jonesey95, AFAICS |municipality_type= does not allow for anything else than "municipality" and "former", because "municipality" is the type and "former municipality" some fake type denoting that the municipality was abolished. TerraCyprus (talk) 20:47, 17 September 2020 (UTC)
The documentation footnote #1, while apparently wrong about categorization, makes it clear that "former" and "everything else" are the two expected options. Based on that logic, I suggest the following (not yet tested):

| settlement_type = {{#ifeq:{{{municipality_type|}}} | former | ] of ] | ] of ] }}

Comments? – Jonesey95 (talk) 20:51, 17 September 2020 (UTC)
Didn't see that note before. It says "*1: Used to add the categories Category:Villages in Switzerland, Category:Former municipalities of Switzerland and ] if the field contains 'former' or Category:Municipalities of Switzerland and ] in any other case" - why would "while apparently wrong about categorization" be true? Maybe any former is a village? What are the boxes about for the former municipalities if the article mixes village and former municipality? Population data for the village or for when it last was a municipality? TerraCyprus (talk) 21:42, 17 September 2020 (UTC)
The note is was wrong (edited to add: I have modified note #1 to explain what 'former' actually does) about categorization because this infobox template does not assign any of those categories to articles that transclude it. I am unable to parse your other questions. Let me know if you have a comment on my modification to your proposed code. – Jonesey95 (talk) 23:26, 17 September 2020 (UTC)
Now it says "*1: When the parameter value is 'former', population and website information are not shown." - so in all other cases the box is about the municipalities? A lot of the functionality depends on a correct |municipality_code= and |municipality_type= != "former". Jonesey95, I cannot find a mistake with your code. Maybe in the future the box could be substituted for the former municipalities, then allways type=municipality. TerraCyprus (talk) 00:55, 18 September 2020 (UTC)
I have updated the code based on my snippet of code above. – Jonesey95 (talk) 02:00, 18 September 2020 (UTC)

Edit request - timezone

This edit request has been answered. Set the |answered= or |ans= parameter to no to reactivate your request.
| timezone_link           = Time in Switzerland
| timezone1               = Central European Time
| utc_offset1             = UTC+01:00
| timezone1_DST           = Central European Summer Time
| utc_offset1_DST         = UTC+02:00

TerraCyprus (talk) 21:51, 17 September 2020 (UTC)

 Done with modifications. ProcrastinatingReader (talk) 23:14, 17 September 2020 (UTC)
ProcrastinatingReader, thank you for modifying away my mistakes! TerraCyprus (talk) 00:40, 18 September 2020 (UTC)

Is municipality_name= being handled correctly?

I am unable to follow the confusing history of this template and its wrappers, but it appears that |municipality_name= may have been a valid parameter with some function in the past. It is being marked as an unsupported parameter. – Jonesey95 (talk) 15:55, 29 October 2020 (UTC)

Also |website= has a lot of uses; was it valid at some point in the past? – Jonesey95 (talk) 15:57, 29 October 2020 (UTC)
And |languages=. – Jonesey95 (talk) 16:03, 29 October 2020 (UTC)
They were in the template when it was converted to an IS wrapper, in Special:Diff/638774298. _name was moved in Special:Diff/648203653 to a sub-template and fully removed in Special:Diff/871263951. Website is still a valid param. ProcrastinatingReader (talk) 16:14, 29 October 2020 (UTC)

Population handling

Copied from Template_talk:Infobox_Swiss_town:

This request is done, but the target template needs some work. For example: the population handling w.r.t. Wikidata is totally bust. It is forcing Zürich to show 2018 years when 2020 ones are being explicitly provided on the page on enwiki (see source). |popofyear= is widely used as a year param, but it's not even supported by the template itself it seems? Looks like only the month/year combo param is. Parameter deprecation runs would also be helpful (by bot); looks like a few editors attempted some by hand yesterday. Lots of very old deprecated params here causing confusion it looks like. ProcrastinatingReader (talk) 01:49, 30 October 2020 (UTC)

@ProcrastinatingReader:The use of Wikidata for population and area has been an issue since it was unilaterally changed a couple years ago. The template used to use Template:Swiss populations which pulled population from a local en wiki list which I maintained and updated. In the articles, the population data is from that template, rather than Wikidata. There were a lot of technical issues with pulling wikidata for articles that have a title different than the article name in Wikidata. That, plus the ease of vandalism and the lack of eyes on Wikidata made transitioning the Swiss populations template not make sense. It would be great if we could get the infobox template to agree with the template in the article. — Preceding unsigned comment added by Tobyc75 (talkcontribs)

I've setup Category:Pages using infobox Switzerland municipality with manual population for tracking. This is all the articles where we (a) have a Wikidata population and (b) have a manual population parameter, hence the Wikidata data is overriding and the local data is not being shown(!). On some, like Zürich, Wikidata is outdated. On others, our local articles have 2004 dates or so. People, naturally, probably didn't want to maintain it if it doesn't show up anyway. But this is really something we should fix, one way or another, I think. Forced Wikidata values seems controversial. ProcrastinatingReader (talk) 16:30, 2 November 2020 (UTC)

My current thought is doing a bot run to delete parameters with pre-2018 values, or replace with call where a location can be determined. Then, we prioritise the enwiki parameter (usually a call to {{Swiss populations YM}}), making Wikidata into the fallback. The bot run will ensure doing step 2 won't cause articles to show very old population numbers instead. Any better ideas? ProcrastinatingReader (talk) 16:34, 2 November 2020 (UTC)
Using Module:WikidataIB instead of {{wikidata}} is recommended, and it usually allows local values to override Wikidata values, which is typically what we want. – Jonesey95 (talk) 17:15, 2 November 2020 (UTC)
Hmm. That's an improvement, but. what can we do about the old outdated years being used as params currently? Is there a neat way to deal with those without bot run, or overly complex / strange template logic? ProcrastinatingReader (talk) 00:26, 3 November 2020 (UTC)
ifexpr should be able to find dates that are older than desired and categorize them. – Jonesey95 (talk) 01:23, 3 November 2020 (UTC)
Hmm, I guess. Some kind of logic where if the Wikidata has a newer year than the local parameter, we use Wikidata instead. However, it needs to be year-based not date I think, because if locally we have year as "2020", and Wikidata is "12-10-2020", it should still use local. Which complicates things slightly more. I'm not too familiar with Wikidata integrations, is this something you could implement? ProcrastinatingReader (talk) 12:54, 3 November 2020 (UTC)
Right now it's set to first look for 12-31-2018 in wikidata, then to look for any other wikidata date, then finally to look for the value in the infobox. It never looks at the template {{Swiss populations}} or the year template {{Swiss populations Y}}, which are updated every year when new numbers are published and is used in the article text. By having a date hard coded in the template, we'd have to rewrite that part of the infobox every year. Additionally, since if it doesn't find the 12-31-2018 date (which we'd have to manually change every year) the infobox currently just defaults to the first population data entry it finds in wikidata, regardless of year. For example, this means that if we change the 12-31-2018 to 12-31-2019 in the template and wikidata hasn't been updated then for the capital city of Bern, it defaults to 2013 data. For Zurich it looks like it might default to 1408! Using wikidata for things like population, which change often, has created a number of issues like this.Tobyc75 (talk) 15:03, 3 November 2020 (UTC)

Script errors related to population handling parameters

@Frietjes: This change is causing script errors on any pages that pass popofyear but not populationof, such as Neunkirch. What's supposed to happen in that case? Jackmcbarn (talk) 01:46, 5 November 2020 (UTC)

Jackmcbarn, the template does not support |popofyear=, but in most cases the year is already in |populationof=, so the check is supposed to disable tracking of |popofyear= when the value is a substring of the value in |populationof=. if there is no |populationof= then the string replacement would act on a blank string, so this would also result in no tracking. Frietjes (talk) 16:39, 5 November 2020 (UTC)

Template-protected edit request on 5 November 2020 – wording change to avoid awkward "Municipality of Switzerland"

This edit request has been answered. Set the |answered= or |ans= parameter to no to reactivate your request.

This template currently produces the text Municipality of Switzerland under the subject name in the resulting infobox. That is not how we express such a term in English. It should read Swiss municipality or maybe Municipality in Switzerland. "Municipality of Switzerland" is how you would refer to a municipality named Switzerland. Eric 18:25, 5 November 2020 (UTC)

 Done. This might be controversial. The article is called "Municipalities of Switzerland", but it seems like more of a formal term. In English, we definitely say "X is a city/town/municipality/county in Y". If the in/of distinction is controversial, it would probably be best to simply write "Municipality", since the country name appears in the first line of data (after the images and maps).
For comparison, see {{Infobox Portugal place}}, {{Infobox French commune}}, and the documentation for Infobox settlement, which suggests using only the place type in this location. – Jonesey95 (talk) 19:27, 5 November 2020 (UTC)
Categories: