Template talk:Infobox Italian comune/Archive 1
This is an archive of past discussions about Template:Infobox Italian comune. Do not edit the contents of this page. If you wish to start a new discussion or revive an old one, please do so on the current talk page. |
Archive 1 |
Fractions?
Perhaps a better English translation for this heading is needed - though I am not sure myself what this would be - AKeen 05:02, 30 March 2006 (UTC)
- I used the original name frazioni because already existed an article with this name, and I hadn't any idea on how to exactly translate this word in English. As written in the article, a frazione, italian for fraction, is the lowest subdivision of an italian municipality.--Dani 7C3 13:26, 31 March 2006 (UTC)
- I have decided to italicize the original Italian, i.e. frazioni because fractions is clearly inappropriate. "Subdivision" is probably the best term, although in some cases, a frazione is not really formal subdivision as such, but nothing more than an outlying hamlet. Given that we have a link to frazione, I think that covers it reasonably well. ρ¡ρρµ δ→θ∑ - (waarom? jus'b'coz!) 07:26, 4 May 2006 (UTC)
Improvement
Hi people of Wikipedia, I've made a new version of this template, clearly inspired to the Portuguese and French ones, which looks better than the current one (in my opinion). You can find it here, and here's also an example of how it would look. Tell me your opinion and your possible suggestions to improve it. Thanks. --Angelo 16:00, 9 July 2006 (UTC)
- Yeah, I like it. Cmdrbond 02:03, 10 July 2006 (UTC)
I also had a go at this a while back. I even got as far as plugging it into a few pages but I had to leave it for a few weeks and when I returned people had reverted to the current template. My version can be found here. I think part of the problem is that this is very subjective. I like the fonts on your version. It looks a lot cleaner than many of these templates but personally, I don't like the gridlines as I think they add to the clutter. As you can see, I also prefer the narrower boxes (the box on the current Milan page for example is much too wide). I also like to have a map that shows where a city is located. It would be good to have some standards for some of these boxes as they can make a real difference to the look of a page, but it's probably worth mentioning that in addition to our two versions there are at least four other templates for this box (Template:Infobox CityIT, Template:Infobox CityIT2, Template:Infobox CityIT3, Template:Infobox Italy town) and those are just the ones I found on this page without even looking hard. Meddlin' Pedant 20:21, 10 July 2006 (UTC)
- Alright, I've followed your suggestions. I've removed the gridlines, and added an optional map feature. The new template is shown here. On suggestion of Attilios, I've also added a "img_coa_small" option for coat of arms smaller than 140 pixels. I also agree about the opportunity to make a unique city infobox rather than four (five?) different ones. The differences, by the way, are actually negligible, and could be provided as optional features for this new template. --Angelo 01:30, 11 July 2006 (UTC)
- OK, I like that and now I know where to find Mazara del Vallo. ;-)
- Just a couple more points. The first is minor, but the grey around the map looks a bit strange. That's not important though. The second is more important. It looks good when viewed in Firefox, but when viewed in IE, the background shows through and the appearance of gridlines remains. I've tried fixing this on my own page but I'm too tired and I can't get it right.
- It looks as though two of those templates aren't used but two are used extensively. I'd say update Infobox CityIT with your version and start converting the other pages to use Infobox CityIT instead of the other templates.
- The grey around the map is the same grey in all the table, you can be sure of this. The second issue has been fixed (it needed a cellspacing="0" parameter to be set for the table). About the unused templates, we can submit them for deletion, shouldn't we? --Angelo 20:01, 11 July 2006 (UTC)
- Yeah, I know the grey is the same. Problem traced to monitor cable that is dying. ;-)
- I don't know what to think about the other templates. Nothing links to "Template:Infobox Italy town", but apparently that doesn't mean it is unused. I think it is unneccessary as the content (mayor, patron saint etc) probably applies to any Italian comune regardless of size. Similarly, nothing I can see links to "Template:Infobox CityIT2" and a number of the pages that link to "Template:Infobox CityIT3" are new stubs that Attilios created recently. I think we could submit all of these 3 for deletion, but I don't completely understand how templates are used.
- I've orphaned Infobox CityIT3, as it is now equivalent to use this template with the "img_coa_small = yes" option. I am submitting all of these three templates for deletion. --Angelo 23:50, 11 July 2006 (UTC)
Image Size
It seems there is a provision for resizing too-small images, but maybe all images should be sized uniformly. On some pages, Sulmona for example, the Coat of Arms is huge. - AKeen 16:42, 13 July 2006 (UTC)
- Fixed. --Angelo 16:49, 13 July 2006 (UTC)
Box
Hello again. I've looked at this in use on a page (Pescara) now. Because the background is mostly white, it might be better to put the lines back - but only around the edge of the whole template, not around each individual cell.Meddlin' Pedant 21:27, 13 July 2006 (UTC)
- This new design works nicely for images with a transparent background (Careggine)- however, many crests have a white box around them (Montorio_al_Vomano). This was masked before by the white cell box for the crest (like on the Italian infobox [1]). Just a heads up.- AKeen 17:41, 16 July 2006 (UTC)
- It's the crests who are wrong, not the template, since they all should have a transparent background too. How many these images are? --Angelo 17:46, 16 July 2006 (UTC)
- There are many - and many are on Commons, as well - AKeen 17:48, 16 July 2006 (UTC)
Flags
I like how the Italian and French versions use flags for the province and region. The way they acheive this is by creating a template for each province and region and calling them with the command fr:Modèle:IT-TOS. Is there a beter way to do this because I think it would look good to have all the flags.Cmdrbond 07:02, 15 July 2006 (UTC)
Map
I've improved the map system inside the template, applying the Template:Location map issues into this infobox. Now "mapx" and "mapy" are equivalent respectively to latitude and longitude for the associated city, rather than meaningless numbers. In addition, I've uploaded a new version of the Italian map in order to include the Pelagie Islands, which were not the part of the old one. --Angelo 03:28, 16 July 2006 (UTC)
- It doesn't seem quite right. The co-ordinates in the template look correct (at least compared to the extreme points of Italy page on the French Wiki) and the co-ordinates on the Pescara page match up with those quoted on Multimap but the dot for Pescara now appears on the border with Marche. i.e. a little too far north.
- I've had a look to the possible causes, and I discovered the Italian map is definitely wrong in some of its parts. I've created a map of Italy from Google Maps, and now I'm involved in an attempt to convert it to SVG. I don't know when I would finish this job, I hope in a couple of days at most. --Angelo 13:45, 17 July 2006 (UTC)
- It doesn't seem quite right. The co-ordinates in the template look correct (at least compared to the extreme points of Italy page on the French Wiki) and the co-ordinates on the Pescara page match up with those quoted on Multimap but the dot for Pescara now appears on the border with Marche. i.e. a little too far north.
UTC
IMO the timezone does not need to be a variable. It's the same for all IT-cities, right? Then we could also easy switch the link to go to UTC+1. Tobias Conradi (Talk) 13:58, 14 September 2006 (UTC)
- Actually, it's not a variable. It's "CET, UTC +1" by default. --Angelo 15:42, 14 September 2006 (UTC)
Implementation
Is the humangous space in Cortina d'Ampezzo due to this box and its templates? I think so - please fix. Thanks, Scriberius 02:21, 19 October 2006 (UTC)
Complement EU
On December 16, 2004, The World Factbook, a publication of the United States' Central Intelligence Agency (CIA) added an entry for the European Union. [2] According to the CIA, the European Union was added because the EU "continues to accrue more nation-like characteristics for itself". Their reasoning was explained in this small statement in the introduction:
The evolution of the European Union (EU) from a regional economic agreement among six neighboring states in 1951 to today's supranational organization of 25 countries across the European continent stands as an unprecedented phenomenon in the annals of history... ... for such a large number of nation-states to cede some of their sovereignty to an overarching entity is truly unique... ... the EU ... has many of the attributes associated with independent nations: its own flag, anthem, founding date, and currency, as well as an incipient common foreign and security policy in its dealings with other nations. In the future, many of these nation-like characteristics are likely to be expanded. Thus, inclusion of basic intelligence on the EU has been deemed appropriate as a new, separate entity in The World Factbook. However, because of the EU's special status, this description is placed after the regular country entries.
I might add that EU citizens have EU- numberplates, -passports, drivinglicense, the EU institutions, and regular election. I hope you support the small extension I made... all the best Lear 21 18:31, 24 October 2006 (UTC)
- Strong Oppose. The EU is neither a country or a soverign state, so its inclusion in the line describing the country is misplaced, therefore it should be removed. --Bob 22:27, 24 October 2006 (UTC)
coor
we need a way of placing the coordinates in a "coor title" template as well. Otherwise the articles will not show up on google earth. dab (𒁳) 07:55, 17 July 2007 (UTC)
- Could you give us a practical example? --Angelo 18:49, 17 July 2007 (UTC)
- see {{Infobox German Location}} where that was also the issue. Agathoclea 20:00, 23 July 2007 (UTC)
- No need. Google are parsing {{coord}}. Andy Mabbett | Talk to Andy Mabbett 20:15, 23 July 2007 (UTC)
General images
I have just noticed on Völs am Schlern that someone misused the COA by putting a picture of the area in there. Wanting to move it to th right spot I could not find a parameter for it though. Would anybody mind adding one - or if I added one? Agathoclea 20:00, 23 July 2007 (UTC)
- Common photos different than coats of arms should be put outside this infobox. I am going to fix it. --Angelo 21:13, 23 July 2007 (UTC)
Imperial Area, Density etc
I know this template is for Italian cities, but as it is on the english wiki, it is likely to be often used by English and American users. Measurements in kilometres mean nothing to many Americans and Britons. For the sake of convenience and fairness, can I suggest this template includes space for figures in feet for altitude and square miles for area, in addition to the metric measures? Tom walker 21:33, 25 August 2007 (UTC)
- Good idea. But someone maybe did it by including a nasty conversion template within the infobox which doesn't always work right.
- 800/1,500 m (Expression error: Unrecognised punctuation character "," ft)
- Gene Nygaard 00:06, 15 November 2007 (UTC)
- That's why the explanation table on the template page says to use only RAW formated numbers. —MJCdetroit 03:12, 15 November 2007 (UTC)
- I’ve just spotted this thread, after changing the template so that it calculates density directly from the population and area figures. As long as both of these are present and are given as RAW numbers, there should be no problem. Otherwise it will display ‘[n/a]’. —Ian Spackman 08:35, 15 November 2007 (UTC)
- That's why the explanation table on the template page says to use only RAW formated numbers. —MJCdetroit 03:12, 15 November 2007 (UTC)
- I'm now getting the error "(Expression error: Unexpected * operator sq mi)" - AKeen (talk) 23:48, 19 November 2007 (UTC)
- I used the code block from elevation and it looks like the error is not returned now if the area field is blank. Awotter (talk) 10:08, 14 December 2007 (UTC)
- Good idea. But someone maybe did it by including a nasty conversion template within the infobox which doesn't always work right.
Website field
I think that having the city website in a small font and centered (as opposed to the format used for the other fields) looks odd. It should be left-aligned, like the others. I am not familiar with template syntax, or I would make this change myself. --Wormcast (talk) 11:27, 13 July 2009 (UTC)
Infobox CityIT -> Infobox settlement
{{editprotected}}
For me, Template:Infobox CityIT is redundant (like Template:Infobox frazione). See Assisi with Template:Infobox settlement :) --Francesco Betti Sorbelli (talk) 16:54, 4 September 2009 (UTC)
- I agree, and have nominated it for deletion. Someone needs to add
{{TFD}}
, please. Andy Mabbett (User:Pigsonthewing); Andy's talk; Andy's edits 22:59, 6 September 2009 (UTC)- Done by Trevor MacInnis (talk · contribs). Fvasconcellos (t·c) 01:53, 7 September 2009 (UTC)
Font size in Area field causes line truncation
You can see the problem in the San Remo example on this page. The superscript "2" in "km2" causes the data "54 km2 (21 sq m)" in the line
Area 54 km2 (21 sq m)
to be truncated in the vertical axis. Maybe 3 or 4 pixels at the bottom of the line are lost, but this is enough to make the line illegible. I had to look at the density line to see that "sq m" was intended, and not "sq.m.".
The solution to the problem is to either make this line's allowed line height greater, or to reduce the font size of the data (but not of the word "Area"). Piedmont (talk) 16:41, 28 October 2008 (UTC)
- The code uses {{convert}} to do the calculating and formatting. The superscript 2 is generated from that template. Please point this problem out over at that talk page. Also, I think that you meant 21 sq mi.—MJCdetroit (yak) 23:19, 28 October 2008 (UTC)
Thanks for the reply, MJCdetroit. I had a look at the {{convert}} template. Here's the way it's used in Infobox CityIT, stripped down to its essentials (conditional clauses removed, etc.):
{{convert|54|km2|sqmi|0|abbr=on}}
The output this gives is as follows:
54 km2 (21 sq mi)
As you can see, the line above is displayed correctly: the problem is not in {{convert}}. Also, {{convert}} is format-neutral: it doesn't specifiy fonts and line heights, these are specified in the place it is used. The problem, I think, lies in the font sizes and line heights that are set in the Infobox CityIT template. Piedmont (talk) 11:07, 29 October 2008 (UTC)
- Hey, I've found the solution. Replace {{convert|54|km2|sqmi|0|abbr=on}} with {{km2 to mi2|54|abbr=yes}}, and it's fixed. The output now becomes:
{{km2 to mi2|54}}
- Which is just what we want. Note the lower "2" superscript, which will prevent the bottom of the line from being truncated. (Note: this problem is browser dependent. It occurs in IE6 and IE7, which together account for 50% of the browser market, but not in Firefox 2. I haven't checked with other browsers). Could somebody please change this Infobox CityIT template? Piedmont (talk) 12:18, 29 October 2008 (UTC)
- Here's the old discussion about changing the superscript in
{{convert}}
's Archives:Template_talk:Convert/Archive_August_2008#Superscripts
- Here's the old discussion about changing the superscript in
- For now, I changed the conversion template, however I think that
{{convert}}
is better constructed and uses less "Post-expand include size". —MJCdetroit (yak) 18:31, 30 October 2008 (UTC)
- For now, I changed the conversion template, however I think that
- Thanks for that, MJCdetroit - this problem had bugged me ever since I saw my first Italian locality page, and now it's fixed. Piedmont (talk) 10:52, 31 October 2008 (UTC)
O dear, this problem has returned. Either this template has reverted to using {{convert}} for area conversions, or the {{km2 to mi2}} template is now using <sup> for the superscripts instead of the unicode characters it was using before. The MOS (manual of style) says <sup> is to be used in preference to unicode superscripts, so we now conform: only problem is, it now displays incorrectly (again) in IE6 and IE7. My issue here is this: since the density template uses unicode superscripts, why can't the area conversion template do the same? To put it another way: if unicode superscripts are acceptable in the density template, why aren't they acceptable in the area conversion template? Whoever is modifying these templates is not considering the way they appear when used inside the Infobox CityIT template. Piedmont (talk) 20:33, 4 September 2009 (UTC)
- Check out the source for {{km2 to mi2}}. It has been edited so that it uses {{convert}} internally. I don't think your going to have much luck getting the edit reversed. –droll [chat] 04:19, 7 September 2009 (UTC)
- OK. Here's a suggestion. This template uses (population_total)/(area_total_km2) to calculate population density. We should change this and use {{Pop density}}.
- {{Pop density}} also uses {{convert}}, so both conversions will be displayed consistently.
- Perhaps then someone will then address the issue, which is this: the use of <sup> in {{convert}} causes line truncation in Infobox CityIT when displayed in IE6 and IE7 (50% of users).Piedmont (talk) 13:17, 16 September 2009 (UTC)
Proposed change
I would like to propose changing the backend of this template to use {{infobox settlement}}
. This would require no change to the uses of the template, but would change its outward appearance, and make it more uniform with say cities like Rome (which uses the settlement infobox). I have put the necessary code in the sandbox, and created a sample of a few test cases here. Let me know what you think. Thanks! Plastikspork ―Œ(talk) 00:10, 19 September 2009 (UTC)
- Much better; please do. Andy Mabbett (User:Pigsonthewing); Andy's talk; Andy's edits 00:17, 19 September 2009 (UTC)
- Your tests are very nice, congrats for your job! Only two question...
- add an item for twin country, like Assisi;
- Done increase the pushin map to default (no "pushpin_mapsize = 200", but "pushpin_mapsize = ").
- After this, {{Infobox comune}} is perfect :) --Francesco Betti Sorbelli (talk) 08:14, 19 September 2009 (UTC)
The proposed example looks much better. Himalayan 10:55, 19 September 2009 (UTC)
Rename
Is there any reason why this shouldn't be renamed to {{Infobox comune}}
? I will move it if there is no reason not to. Thanks! Plastikspork ―Œ(talk) 00:14, 19 September 2009 (UTC)
- Or Infobox Italian comune? I was thinking Infobox Italian city; but either would be better than the current name. Andy Mabbett (User:Pigsonthewing); Andy's talk; Andy's edits 00:19, 19 September 2009 (UTC)
{{Infobox comune}}
is good because there is a similar template called{{Infobox frazione}}
. --Francesco Betti Sorbelli (talk) 08:16, 19 September 2009 (UTC)- That could be
{{Infobox Italian frazione}}
Andy Mabbett (User:Pigsonthewing); Andy's talk; Andy's edits 11:03, 19 September 2009 (UTC)
- That could be
{{Infobox Italian comune}}
would seem appropriate. As long as it is converted like frazione I don't mind. Assisi BTW looks 10 times better than before. Himalayan 10:12, 19 September 2009 (UTC)
This should be converted asap as part of a drive to improve these comune articles in my view. Himalayan 13:32, 20 September 2009 (UTC)
- Sure, there is a minor amount of preprocessing necessary to add the latd/longd to each transclusion, which will allow both the coordinates and the pushpin location to be determined from one set of coordinates (rather than the current redundant specification). This could take a few days due to the fact that there are over 7000 transclusions, but I have AWB working on it right now. We will see how long it takes to finish. Plastikspork ―Œ(talk) 18:40, 20 September 2009 (UTC)
Urgh, definately a reason to then if they use x and y cooridnates. I'm workin on Italian comunes at the moment and have added infobox settlement to several alreadyand added text and they look much better.The infoboxes should be the start of working towards cleaning them all up. Himalayan 19:35, 20 September 2009 (UTC)
- The script has finished adding the latd/longd to 3500 transclusions, so only another 3500 more to go. Plastikspork ―Œ(talk) 05:26, 21 September 2009 (UTC)
Problem with this template
{{Editprotected}}
This template contains a call for coat of arms/shields for Italian communities. The problem is the template indiscriminately looks for such images when none is provided as a parameter to the template. This results in sometimes non-free imagery being displayed in templates. This is a violation of WP:NFCC #9, which prohibits such use. Case example: File:Sanremo-Stemma.png. I have modified Template:Infobox Italian comune/doc, but can not modify Template:Infobox Italian comune because it is protected. This problem needs to be fixed. Only an administrator can fix it. Help please. --Hammersoft (talk) 15:52, 16 November 2009 (UTC)
- I removed the search for {{{name}}}-stemma.png, and updated the documentation accordingly. Plastikspork ―Œ(talk) 19:57, 16 November 2009 (UTC)
New pushpin map
Template:Infobox French commune has a second pushpin map that pinpoints the location of a settlement within its region, and it's also conveniently collapsable. The location maps of the regions of Italy are available here as well - such a feature would work out fine with this template. -- Lerox-Donut (talk) 05:29, 1 June 2014 (UTC)
Metropolitan Cities
Since Italy has switched some provinces into Metropolitan Cities, we should change the caption (i.e. what actually appears in the infobox when displayed) of the "province" field into something such as "province/metropolitan city". Thanks. '''Attilios''' (talk) 10:46, 1 February 2016 (UTC)
- Echoed, and we are 15 months behind for this template; I was unable to edit Civitavecchia in Lazio for this reason. CaradhrasAiguo (talk) 17:55, 27 April 2016 (UTC)
- I have modified the template to display "Province / Metropolitan city", and I updated the documentation. The parameter is still
|province=
, for simplicity. Will that meet your needs? Did I break anything? Do the metropolitan cities have two-letter codes? – Jonesey95 (talk) 18:43, 27 April 2016 (UTC)- @Jonesey95: Thanks for that. I think "Province / Metropolitan city" might be semantically awkward, but I'm at work so will have to think about 'simplicity' et al later. Looked at Città metropolitana di Roma Capitale, and it lists an ISTAT number / code, but not sure if they have the same two-letter codes as the previous province (Italian plural) or if they even have two-letter codes at all. CaradhrasAiguo (talk) 19:01, 27 April 2016 (UTC)
- I have modified the template to display "Province / Metropolitan city", and I updated the documentation. The parameter is still
New field for filmed civil records
Would it be possible to add an extra field to link to free filmed civil records for each of the Italian towns? eg: https://familysearch.org/search/catalog/778874 which is for "Registri dello stato civile di Albano di Lucania (Potenza), 1809-1910" or Civile records for the town in question?
Update to include comune maps
Working on Oliveto Citra. I would like to see this template updated to display the communal maps, but perhaps hidden by default with a "click to view comune locator" option? Rather like the French commune infobox. They're a pretty ugly yellow that's all, but useful. All of the comunes of Italy ought to have a shrinkable locator built in now, but might be time consuming to do unless you can programme it into the template coding to display it, not sure if the file names are consistant enough to do that. From what I saw most provinces have these files in the commons and a lot look consistent, so might be possible.♦ Dr. Blofeld 14:34, 4 January 2017 (UTC)
TfD request
This edit request has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
Could an administrator or template editor please add the following notice to this template:
{{subst:tfm|Infobox frazione}}
per WP:TFD. Ergo Sum 20:08, 12 January 2018 (UTC)
- Done — Martin (MSGJ · talk) 21:07, 14 January 2018 (UTC)
Proposed aesthetic change
This edit request has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
The current parameter label 'Province / Metropolitan city' for the parameter {{{province}}}
is awkward, since it spills over onto three lines and produces a blank space beneath whatever is entered into the parameter. Moreover, a comune can only be in one or the other, not both. Therefore, I propose making a binary parameter option by creating two different parameters {{{province}}}
and {{{metropolitan_city}}}
, so that an editor can choose one or the other and they will be mutually exclusive parameters. For example, for 'Florence', the parameter would be {{{metropolitan_city}}}
and the label in the infobox would be 'Metropolitan city' and the entry would be 'Florence (FI)'. For 'Como', the parameter would be {{{province}}}
and the label would be 'Province' and the entry would be 'Como (CO)'. The code to achieve this would be:
| subdivision_type2 = {{#if:{{{metropolitan_city|}}}|[[Metropolitan cities of Italy|Metropolitan city]]|[[Provinces of Italy|Province]]}}
| subdivision_name2 = {{#if:{{{metropolitan_city|}}}|{{{metropolitan_city}}}|{{{province}}} }}
And then metropolitan_city
would have to be added to the unknown parameter check at the bottom of the template. Ergo Sum 17:41, 28 December 2017 (UTC)
- Not done: please establish a consensus for this alteration before using the
{{edit template-protected}}
template. This change would require a review of all 8113 transclusions to ensure they were using the correct parameter. Cabayi (talk) 09:20, 2 January 2018 (UTC)- By my calculation, 1,281 articles of comuni of metropolitan cities would require their parameter to be changed to "metropolitan_city" after this change goes into effect, which I am prepared to do manually. Ergo Sum 18:46, 2 January 2018 (UTC)
- I would have thought that the
subdivision_name2
would output an erroneous "{{{province}}}" if neither|metropolitan_city=
nor|province=
were present (presumably a condition that shouldn't occur, but not one we want the readers to see if it does). I believe that could be circumvented by using{{{province|}}}
and making a tracking category for both parameters missing if you want to trap that. Otherwise, I'm in favour of the intention to make the parameters mutually exclusive, and to simplify the appearance. --RexxS (talk) 00:16, 7 January 2018 (UTC)- @RexxS: I'm sorry, I'm not following what you're saying. Could you please clarify? Ergo Sum 20:34, 15 January 2018 (UTC)
- I would have thought that the
- By my calculation, 1,281 articles of comuni of metropolitan cities would require their parameter to be changed to "metropolitan_city" after this change goes into effect, which I am prepared to do manually. Ergo Sum 18:46, 2 January 2018 (UTC)
Reopened request after allowing time for comments; RfCs were placed on the talk pages of the relevant wikiprojects. The full code that would be required for this proposal is currently in this template's sandbox. Ergo Sum 19:07, 12 January 2018 (UTC)
- @Ergo Sum: in your request above you wrote:
| subdivision_name2 = {{#if:{{{metropolitan_city|}}}|{{{metropolitan_city}}}|{{{province}}} }}
- I suggested there might be a problem if you use the
{{{province}}}
version of the parameter which produces "{{{province}}}" (literally) rather than "" if the parameter is missing. However in the sandbox – which I had not previously seen – Martin has amended it to:| subdivision_name2 = {{#if:{{{metropolitan_city|}}}|{{{metropolitan_city}}}|{{{province|}}}}}
- which addresses the problem. Do you see the difference between what you requested and what is now sandboxed? Are you now following what I was saying? --RexxS (talk) 21:04, 15 January 2018 (UTC)
- @RexxS: Yes, I'm with you now. That was an oversight of mine; your proposal is what I had intended, but I accidentally left out the pipe. Thanks for pointing that out. And thanks Martin for fixing it in the sandbox. I believe this should now put an article in Category:Italian commune articles with missing parameters if neither
province
normetropolitan_city
are used. Unless there are any further suggestions, I will renew the edit request. Ergo Sum 21:25, 15 January 2018 (UTC)
- @RexxS: Yes, I'm with you now. That was an oversight of mine; your proposal is what I had intended, but I accidentally left out the pipe. Thanks for pointing that out. And thanks Martin for fixing it in the sandbox. I believe this should now put an article in Category:Italian commune articles with missing parameters if neither
- @Ergo Sum: in your request above you wrote:
- Not done for now: you haven't addressed comments by RexxS which I believe are well made. I have added a pipe to the sandbox, which you might like to review. — Martin (MSGJ · talk) 09:34, 15 January 2018 (UTC)
- @RexxS: I've also added a new tracking category and preview warning in the vein of your suggestion, which I think could be quite useful. It's in the sandbox, but here's the further addition:
{{Main other|{{#if:{{{province|}}}{{{metropolitan_city|}}}||[[Category:Pages using Infobox Italian comune and missing administrative divisions]] }} {{#if:{{{region|}}}||[[Category:Pages using Infobox Italian comune and missing administrative divisions]] }} {{if preview|{{#if:{{{region|}}}||<div class="hatnote" style="color:red"><strong>Warning:</strong> Page using [[Template:Infobox Italian comune]] and missing region (this message is shown only in preview).</div>}} {{#if:{{{province|}}}{{{metropolitan_city|}}}||<div class="hatnote" style="color:red"><strong>Warning:</strong> Page using [[Template:Infobox Italian comune]] and missing province or metropolitan city (this message is shown only in preview).</div>}} }} }}
- What do you think? If everyone's happy, I'll go ahead and reopen the edit request. Ergo Sum 02:00, 17 January 2018 (UTC)
- @Ergo Sum: You may find that some conditions are only worth tracking short-term until a bot run or an AWB run cleans up the category. You probably need to check with regular users of the template what conditions are most worth tracking, as they will know better than I. In any case, your coding looks good to me. Cheers --RexxS (talk) 02:14, 17 January 2018 (UTC)
- @RexxS: I've also added a new tracking category and preview warning in the vein of your suggestion, which I think could be quite useful. It's in the sandbox, but here's the further addition:
Reopening edit request, as it appears a consensus has been established. Could an administrator or template editor please execute the request, which is contained in this version of the sandbox (at the time of writing, the current version)? Ergo Sum 02:19, 17 January 2018 (UTC)
- Done — Martin (MSGJ · talk) 12:03, 17 January 2018 (UTC)
This edit request has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
@RexxS: and @MSGJ: One more request, which I don't think should prove controversial and complements the previous one. I've edited the sandbox to reflect the additional proposal. This would add a preview warning for when both province
and metropolitan_city
are used, as that should not occur. When they are used together, the article is also placed into the same tracking category as before, which I have renamed to reflect the new use. Ergo Sum 18:43, 17 January 2018 (UTC)
- Done. — SMcCandlish ☏ ¢ >ʌⱷ҅ᴥⱷʌ< 04:55, 18 January 2018 (UTC)
Proposal for necessary exception
@RexxS and MSGJ: It was brought to my attention that the region of Aosta Valley contains no provinces or metropolitan cities. Therefore, Category:Pages using Infobox Italian comune with administrative division issues is capturing articles of comuni in the Aosta Valley as well as displaying the preview warning when this should not occur. I have worked out a fix in the sandbox that will make an exception for when the term "Aosta" is entered in the region
parameter (including when {{RegioneIT|sigla=VAO}}
is entered using {{RegioneIT}}), in which the preview warning and category placement is suppressed. This seems like a common sense fix, so if there are no objections, I will go ahead and implement the fix. Ergo Sum 18:15, 22 January 2018 (UTC)
- Thanks for the heads-up, Ergo Sum. The code looks OK. I expect you already do something like this, but I suggest you pick a handful of articles that use the template, some of which should be unaffected by the change in the sandbox, others which should be affected, and preview the sandbox version in each of them. If you drop a note somewhere central (like here) to other editors who can also check those, naming your test articles, you'll stand a better chance of getting them to cross-check for you. Obviously, give some time for consensus to develop (days not hours! - I'm the worst for being impatient), and keep an eye out for any snags that are found. Cheers --RexxS (talk) 20:32, 22 January 2018 (UTC)
- RexxS Thanks for the tip. I do preview it on mainspace articles as it is, so I might as well mentioned them in the edit request. I've tested the sandbox version on Chambave (affected) and Guardia Lombardi (unaffected) and it all seems to check out. Ergo Sum 20:40, 22 January 2018 (UTC)
- Done After allowing adequate time for commenting, I've gone ahead and added the fix to the live template. Ergo Sum 21:55, 28 January 2018 (UTC)
- RexxS Thanks for the tip. I do preview it on mainspace articles as it is, so I might as well mentioned them in the edit request. I've tested the sandbox version on Chambave (affected) and Guardia Lombardi (unaffected) and it all seems to check out. Ergo Sum 20:40, 22 January 2018 (UTC)
Proposed addition of parameter
I propose adding a parameter called istat
, whose label would be "ISTAT code". Every Italian region, province, and comune (and perhaps frazione) is assigned an ISTAT code, which is analogous to the FIPS code in the United States. Inclusion of this number is standard for {{Infobox settlement}}, as it is useful and important, and should be included in this template. Moreover, it is included in Template:Divisione amministrativa on the Italian Wikipedia. I have added the code to effectuate this proposal to the sandbox. Ergo Sum 21:58, 18 January 2018 (UTC)
- I would like to reiterate this proposal. If there are no further comments, I will go ahead and implement it. Ergo Sum 03:08, 6 February 2018 (UTC)
- Good idea. I created template {{ISTAT}} analogous to {{FIPS}}. See Province of Pescara for an example. As the provinces just use {{Infobox settlement}} the ISTAT code is just being put into blank name/info parameters. This template does not currently have blank parameters currently so something needs to be changed. Either just echoing the blank parameters or a dedicated istat parameter seems fine by me. Batternut (talk) 14:11, 8 February 2018 (UTC)
- @Batternut: That's a great template, which I think will be very useful. I've just put in the sandbox the new proposal, which automatically feeds the parameter input into the ISTAT template. The
istat
parameter makes use ofblank_name_sec1
andblank_info_sec1
from {{Infobox settlement}}. I modifiedsaint
andday
to useblank_name_sec2
(and blank_2) andblank_info_sec2
(and blank_2) in order to keep the numerical parameters together, i.e. ISTAT is grouped with postal code and dialing code. Ergo Sum 18:58, 8 February 2018 (UTC)- Done After allowing time for input, and no objections, I have implemented the proposal. Ergo Sum 19:30, 12 February 2018 (UTC)
- @Batternut: That's a great template, which I think will be very useful. I've just put in the sandbox the new proposal, which automatically feeds the parameter input into the ISTAT template. The
Code enhancement
I have a version on the /sandbox with the following features:
- Given the province code (e.g. LT for Latina) it will lookup the name of the province and link it, followed by the code in brackets
- If the region is omitted, it will lookup the correct region of the province and add the flag
No changes will happen to articles which have these parameters filled in. Any opinions please? — Martin (MSGJ · talk) 10:22, 26 April 2018 (UTC)
- @MSGJ: I like the idea. The only comment I have is that most articles use a piped link for the province, which would not render if an editor only entered the province code. Is there a way you could tinker with the province module to support this capacity. Ergo Sum 18:05, 26 April 2018 (UTC)
- Hi Ergo Sum, yes that is certainly possible and now implemented in the sandbox. Test 1 on Template:Infobox Italian comune/testcases shows the effect of
|province=TP
— Martin (MSGJ · talk) 12:05, 30 April 2018 (UTC)
- Hi Ergo Sum, yes that is certainly possible and now implemented in the sandbox. Test 1 on Template:Infobox Italian comune/testcases shows the effect of
pop_density_footnotes
This parameter appears in the documentation of the template, but is not implemented (cf. Mirano). 01:23, 31 May 2018 (UTC) — Preceding unsigned comment added by Nadav S. (talk • contribs)
Short Description is truncated?
I have no idea how the Short Description is generated from this template, but several comune that I've visited have a SD of just "in Tuscany, Italy" (or whichever is the right province). IMO the word "Comune" should come before "in". I see the SD's because I have the element highlighted with a custom css. Can it be fixed, or does it depend on code at a deeper level? David Brooks (talk) 16:27, 10 October 2018 (UTC)
- Looking at the code, which calls Template:Infobox settlement, I suspect there's something about the "settlement_type" parameter that the called template doesn't like. David Brooks (talk) 19:07, 10 October 2018 (UTC)
- The code sets settlement_type to
{{{settlement_type|{{lang|it|[[Comune]]}}}}}
. This is doubly wrong: the embedded lang template causes the word not to appear at all, and wikilinks should not appear in short descriptions. I propose replacing it with simply''Comune''
unless someone has an objection in the next few days. David Brooks (talk) 15:46, 23 October 2018 (UTC)- After getting advice from an actual expert, this probably needs to be fixed in {{Infobox settlement}} itself. The current coding is needed for the proper contents of this box itself. It's a problem of having one parameter do double duty. I'll try to get the issue raised over there. David Brooks (talk) 17:12, 23 October 2018 (UTC)
Apparently {{Infobox settlement}} (probably) can't handle this case. I've added an explicit default short description to {{Infobox Italian comune}}, in the sandbox. I'll give it a day or so for review. David Brooks (talk) 18:12, 26 October 2018 (UTC)
Template-protected edit request on 30 October 2018
This edit request to Template:Infobox Italian comune has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
As described above, currently the default short description generated by this infobox is "in <region>, Italy". I have identified the reason for the missing word "Comune" (it's wrapped in a lang template) and also discussed it on the infobox settlement talk page. The fix is in the sandbox, and the testcases check out. Please promote. David Brooks (talk) 02:09, 30 October 2018 (UTC)
- Done — JJMC89 (T·C) 04:43, 30 October 2018 (UTC)
Template-protected edit request on 13 November 2018
This edit request to Template:Infobox Italian comune has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
See the previous comment for the bug I fixed 2 weeks ago. After further discussion with short description experts, I understand that there is nothing to be gained by inventing a new "short_description" parameter for this template (which I added to the current version but did not document). No article has used that new parameter. If any articles set a short description locally, it will correctly override the description provided by {{Infobox settlement}}. The version in the sandbox is the simplified version; please promote. David Brooks (talk) 20:27, 13 November 2018 (UTC)
Script errors
@Underlying lk: A lot of articles are in the script errors category. For example, Cassano delle Murge is displaying:
- Lua error in Module:Location_map at line 502: "Italy Apulia" is not a valid name for a location map definition.
Probably the best thing to do is to revert changes to the template until this is sorted out. I have to disappear now but might get a chance to investigate later. Johnuniq (talk) 04:42, 2 December 2018 (UTC)
- I attempted to fix the issue but I'll keep an eye on the error category. Thanks,--eh bien mon prince (talk) 04:49, 2 December 2018 (UTC)
- Thanks, it looks like the error category is emptying. Johnuniq (talk) 06:17, 2 December 2018 (UTC)
- I attempted to fix the issue but I'll keep an eye on the error category. Thanks,--eh bien mon prince (talk) 04:49, 2 December 2018 (UTC)
Parameters/whitelist inconsistencies
The whitelist of parameters at the end of the template code does not include the image_size parameter, which is implemented as a synonym of imagesize. This results in errors during edit of the two articles that use image_size: Venice and Giardini Naxos (imagesize is much more common). Question - should the parameter be taken out, or at least deprecated, and those two articles edited, or should it be added to the whitelist?
While doing one or the other edit, | short_description should be removed from the whitelist. It got left there after a series of miscommunications. David Brooks (talk) 19:13, 6 December 2018 (UTC)
- I am taking a good look at the parameters & whitelist(s). -DePiep (talk) 21:21, 8 January 2019 (UTC)
- OK. First I am working to get all parameter lists to represent what the template code actually knows and uses. Oncwe we have the documentation right this way (including TemplateData, maintenance categories, etc.), we can clean up the articles. Then we can talk about improving the code. -DePiep (talk) 23:05, 8 January 2019 (UTC)
Differences
Infobox CityIT | settlement version | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
— Preceding unsigned comment added by Francesco Betti Sorbelli (talk • contribs) 16:35, 17 September 2009 (UTC)
Parameter checks
I have checked and updated parameters in the documentation. Infobox code is leading (exisiting parameters form infobox code to documentation, no more no less). First goal is to have documentation reflect template code correctly, then clean up bad instances. Improvement of infobox code can follow after this cleanup (change parameter behaviour, deprecation, ...).
- TemplateData
- I have rebuild /doc#TemplateData from scratch. It now has all parameters that are actually used in template code. 51 parameters plus 11 aliases = 62 parameter names.
- Aliases (parameter synonyms): listed as such in TemplateData (=listed with their paired parameter). Includes plurals (
|motto=
equals|mottoes=
). - Required: kept as was in TD (8x; includes their aliases): name, region, area_total_km2, pop_total, pop_as_of, postal_code, areacode, istat.
- Ordering: TD order is roughly the order as presented in the infobox (
|name=
first,|footnotes=
last).
- Todo: other parameter properties. Parameter data in TD is not complete. To add or check: TD-label, data type, descriptions, examples, defaults.
- Template documentation page
- #Blank_template: now has complete list + aliases, same order
- #Parameters (overview in table): complete list, same order
- #Example (Sanremo): updated
-DePiep (talk) 13:00, 9 January 2019 (UTC)
Proposed changes re tracking
In the sandbox, I have prepared changes. See /testcases. With one exception, Infobox input code itself is not changed now. Only error handling (the code below the {{Infobox}}). Changes:
- Code change (the one exception):
|map_size=
added, as an alias for|mapsize=
[3].
- Parameters use _ (underscore) to separate words (list), possible through an alias (
|postalcode = postal_code=
). But so far, existing|mapsize=
does not have that option. Adding this one makes the parameter list systematically easy for the editor's eye.
- Parameters use _ (underscore) to separate words (list), possible through an alias (
- Removed old tracking code: unused [4]. This is code that checks outdated Italian and other parameters that are not even used nowadays. The check was already pushed aside in 2016 [5]. It populated this category:
- Category:Italian commune articles with missing parameters (0) -- that is ~all transclusions in articles! In other words, the check is not relevant, and not useful. After removal from the infobox, the category will be depopulated and can be deleted.
- Parameter whitelist for Module:Check for unknown parameters: Add exact and correct whitelist, 51 parameters + 12 aliases = 63. Same list as TemplateData and blank-tempalte documentation (those actually used in template code). [6]
- This new whitelist will repopulate Category:Pages using infobox Italian comune with unknown parameters (202), making it meaningful to cleanup (remove true unknown parameters from articles).
- Admistration parameters check
|region, province, metropolitan_city=
: rewote code, same check. new code added, removal of old code. Categorised in Category:Pages using Infobox Italian comune with administrative division issues (66)
- They are cat-sorted by error type:
- 0 - no province, metropolitan_city at all
- B - both province, metropolitan_city have input
- R - no region input
- A - Aosta input incorrect (Aosta is an exceptional situation)
None of these changes the rendered infobox, only maintenance is changed (made more useful). Documentation, maintenance and code will be consistent. No prejudgement is made for future code changes (deprecation of parameters, change of behaviour, ...). Sure future changes will be easier to make.
Comments? DavidBrooks. -DePiep (talk) 23:42, 9 January 2019 (UTC)
- Looks good as far as I am able to judge (I'm no expert). I can confirm that the spurious whitelist entry is gone and the parameter list and whitelist line up. Thanks! David Brooks (talk) 16:44, 10 January 2019 (UTC)
Template-protected edit request on 10 January 2019
This edit request to Template:Infobox Italian comune has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
Please replace all template code with all sandbox code (Template:Infobox Italian comune/sandbox → Template:Infobox Italian comune, diff).
Changes One parameter added, parameter checks updated (Check unknown parameter - whitelist; special input check) to use parameters actually used in template code. Effect: maintenance categories will be meaningful. Documentation already updated. One tracking will be job abandoned.
Test & demo: see /testcases.
Discuss & consensus: Original request: #Parameters/whitelist inconsistencies, logbook & proposal: #Parameter_checks. DePiep (talk) 23:57, 10 January 2019 (UTC)
Aosta province handling
Aosta does not have a |province=
nor a |metropolitan_city=
. Category:Pages using Infobox Italian comune with administrative division issues (66) lists articles that do have input for those parameters. However, it appears to be |province=none
}, which shows in the infobox. Should we support this? (if yes, we will prevent them appearing in the category). -DePiep (talk) 15:22, 12 January 2019 (UTC)
Template-protected edit request on 2 August 2019
This edit request to Template:Infobox Italian comune has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
In call Add alias #invoke:Check for unknown parameters
change population_total
to population
, which is actually used as parameter to {{Infobox settlement}} (in case there is no Wikidata property). See, for example, this fix of an issue reported at Wikipedia talk:WikiProject Templates#Problem with a template.population_total
to parameter population
to be consistent with {{Infobox settlement}} and to avoid confusion. Please also add population
(current name of the parameter) to the call #invoke:Check for unknown parameters
. —andrybak (talk) 19:42, 2 August 2019 (UTC)
- Partly done:
|population=
is not passed to {{infobox settlement}} so there's no need to add it to the unknown parameter check. I've added in|population_total=
as an alternate name for|population=
. Primefac (talk) 19:51, 2 August 2019 (UTC)
Some issues with this template
Please see Template talk:Infobox settlement#Frustrating our editors for a discussion about some issues with this template. Fram (talk) 07:04, 10 October 2019 (UTC)