Template talk:City

From Wikimedia Commons, the free media repository
Jump to: navigation, search
Info non-talk.svg Template:City has been protected indefinitely because it is a highly-used or visible template. Use {{Edit request}} on this page to request an edit.
Please test any changes in the template's /sandbox or /testcases subpages, or in a user subpage, and consider discussing changes at the talk page before implementing them.

name of countries[edit]

The langSwitch location templates don't show the name of the country the location is in. For New York or Moscow, it's not a problem, but for {{Otterlo}}, or {{Chantilly}}, it's not obvious that people know where it is. One solution is to put write : {{Chantilly}}, {{France}}, so that the country is displayed, but it has some minor inconvenience. For instance, I think some languages would rather have "Chantilly (France)" than "Chantilly, France". It seems to me that a (probably bot-friendly) is to nest them in a locality template, which is what I tried for Chantilly :
The default display is unchanged (Chantilly), but if we turn on the country option, it reads: Chantilly. (I don't know how to delete the space before the comma, is someone can tell me how to do, it would be useful in several other templates as well).

I had a bit of a hard time to make it work, but in fact it's pretty simple, once you know how to write it. Of course, we can add more options like US state or German Land. It it worth being extended to other cities ?--Zolo (talk) 11:21, 19 July 2010 (UTC)

If I understand correctly what you are trying to achieve, maybe {{RelativeLocation}} could work since it heavily uses i18n and thus is language-specific syntax ? Jean-Fred (talk) 12:10, 19 July 2010 (UTC)
I don't think it seves the same purpose. What I am trying to do is to provide an option that makes the location a bit more understandable, especially for small towns. For instance, here, we get Chantilly, but I think most non-French users don't know where Chantilly is. With the locality template, you can activate the country option so that it reads "Chantilly (France)" in French and "Chantilly, Frankreich" in German. And if you decide that for all works in the Musée Condé in Chantilly, you should have "Musée Condé, Chantilly, France" rather than just "Musée Condé, Chantilly" it can certainly be done by a bot. I had the painting locations in mind, but it can certainly be used elsewhere. The point is that you can decide in each case which level of explanation you want--Zolo (talk) 12:46, 19 July 2010 (UTC)
If it's not clear which one it is, you will need to add the country. Docu  at 12:49, 19 July 2010 (UTC)
There is a line on template Chantilly to tell which country it is. — Preceding unsigned comment added by Zolo (talk • contribs)
hmm ... interesting. I'm not sure if this is really compatible with this template. I was under the impression that all locations here are in just one country and would ideally link to a WP article.  Docu  at 13:06, 19 July 2010 (UTC)
I think the idea was that with interwiki links one can click on the city name and know all the details he/she can possibly need. That said I agree that sometimes in case of little known places and international authors it is convenient to mention country. To do so we use either "{{Chantilly}} ({{France}})" or "{{Chantilly}}, {{France}}" notation. I do not see much advantage of {{Chantilly|country=yes}} and it would be a big job to change all the location templates to follow this format. It might be easier to add it to the {{city}}. Finally the "{{Chantilly}} ({{France}})" or "{{Chantilly}}, {{France}}" notations are variants depending on language. I think comma notation works in most languages and originally many location templates used that notation. However that did not work well in the Workloc field of the creator template (where they were often used) producing lines like: "Italy, London, UK, Paris, France".--Jarekt (talk) 13:11, 19 July 2010 (UTC)
Couldn't {{city|Chantilly}} just output Chantilly -- or Chantilly (Oise) or Chantilly (France)?. If it's not clear which one it is, the input would be, e.g. {{city|Chantilly, Oise}}? This might need some tweaking for other languages.  Docu  at 13:18, 19 July 2010 (UTC)
I don't think it should take more than 30 seconds by template, and if some template are not changed, it just stays how it is now. The default display remains the same, so it doesn't imply make things more complicated for users. I agree however that this doesn't make much difference with "{{Chantilly}}, {{France}}". The main advantage is that it adjusts automatically to such variants as "{{Chantilly}} ({{France}})" or "{{Chantilly}}, {{France}}". Minor advantage, but not so much work to do either I think.
@docu: The template works with me (in French and English, I didn't try other languages) Chantilly

I get two links to Wikipedia: one to Chantilly and one to France. The only problem I get it that it gets to a new line, I don't know how to fix that but it's probably quite simple. There are plenty of other European locations here. We can certainly adjust for Chantilly Oise, that had not been done in the present template. Do we need to put Chantilly, Oise by default in English ?--Zolo (talk) 13:26, 19 July 2010 (UTC)

Really I think it would be nice to have the country name. It is certainly not essential but it makes for nicer code. For exampple creator:el Greco has | Deathloc = {{RelativeLocation|Toledo|,|Spain}} which does not look that good and implies a good acquaintance with Commons templates. It would be easier to have simply | Deathloc = Toledo with the template automatically adding the rest. Of course "New York City, United States" looks a bit silly but why not ?--Zolo (talk) 09:09, 10 February 2011 (UTC)

We could have a second parameter so {{City|Toledo}} would still give Toledo, but {{City|Toledo|,}} would give "Toledo, Spain" and {{City|Toledo|()}} would give "Toledo (Spain)". The format with "," can be used in places like Deathloc, where a single city is expected. --Jarekt (talk) 12:07, 10 February 2011 (UTC)
Yes but isn't it simpler to have {{Toledo|coutry}} for the former - and {{Toledo|disambiguated}} for the latter (if it is the use you have in mind) ? I think it would make it clearer what the template is supposed to do and it would look more logical if other languages have different formatting habits.--Zolo (talk) 12:38, 10 February 2011 (UTC)
If I would make changes to each city template than I would have to be working on about 200 templates in Category:Multilingual tags: Locations, I prefer to work on {{city}} template alone. But the more I think about it the more messy it gets. City names change much less frequently than countries do just look at Jerusalem depending on period different country name should be used. Same with Lviv It belonged to Poland (>500 years), Austria (>100 years), Soviet Union (>50 years) and Ukraine (20 years) and depending on the time period different country should be mentioned. It would be wrong to assign historical figures to countries based on current borders, and it would be mostly impossible to add years to each city template. --Jarekt (talk) 14:14, 10 February 2011 (UTC)
With the "," parameter we would still have to add the country to each template, wouldn't we ? But true border changes are a real problem.--Zolo (talk) 07:29, 11 February 2011 (UTC)

Add Perpignan[edit]

{{editprotected}} Please, add {{Perpignan}} in "Locations in France". --V.Riullop (talk) 23:00, 10 January 2011 (UTC)

✓ Done --Jarekt (talk) 02:03, 11 January 2011 (UTC)

Proposed Changes[edit]

This template changed a lot since its early versions, which did not rely as much on templates. With such a large number of locations maintenance become an issue and now that the template is protected - it is silly to be adding cities one by one with {{editprotected}} ( appologies to User:Vriullop - I am not picking on him/her). I would like to propose to use {{#ifexist:template:{{{1|}}}|{{{{{1}}}}} }} construct on the beginning of the template and eliminate all lines like: "name = {{name}}". --Jarekt (talk) 02:12, 11 January 2011 (UTC)

I agree, but ifexist is an expensive parser function, so a bot should replace existing city templates. --V.Riullop (talk) 08:26, 11 January 2011 (UTC)
Actually the limit is s500 expensive parser function calls, so I think that if we keep using the template the way we do, it would be fine to implement Jarekt's proposal. If we dramatically expand the use of the template we may need another solution, but Template:Departments of France uses 100 "ifexist" without any loading delay.--Zolo (talk) 08:38, 18 February 2011 (UTC)
All ifexist in {{city}}, {{Artwork}}, and {{book}} now check if the tested string is already in the correct format before trying ifexist. So in creator pages Deathloc={{Paris}} is more efficient than Deathloc=Paris which is more efficient than Deathloc=XXXX. this last one checks for existence of a template, gallery and category before giving up. I also decided to leave links like "name = {{name}}" in this template this way it is easier to add alternative names "name|name1|name2 = {{name}}". --Jarekt (talk) 14:06, 18 February 2011 (UTC)

The name of the template[edit]

The name of the template is pretty confusing, if it doesn't serve just for cities. I think it should be renamed. --Petrus Adamus (talk) 12:23, 31 May 2011 (UTC)

Most of use is for city names I can not think of other name which would be less confusing. {{Location}} might have been a good option but it is already taken. It seems to me that the other common use is for countries, so wh could have {{Country}} redirect to it, but that template name is used for something else as well. --Jarekt (talk) 12:34, 31 May 2011 (UTC)

Please add to at[edit]

Please add to at „Locations in Germany“:

 |Bonn={{Bonn}}
 |Greifswald={{Greifswald}}  
 |Potsdam={{Potsdam}}

Please add to at “Locations in France”:

 |Fontainebleau={{Fontainebleau}} 

thanks --Botaurus (talk) 15:00, 31 July 2011 (UTC)

✓ Done --Jarekt (talk) 01:31, 1 August 2011 (UTC)

Please add to at "Locations in Italy“:

 |Gorizia|Gorica={{Gorizia}}

--Sporti (talk) 12:34, 2 November 2011 (UTC)

✓ Done --Jarekt (talk) 03:48, 3 November 2011 (UTC)

Please add to at „Locations in Austria“:

 |Klagenfurt|Klagenfurt am Wörthersee|Celovec={{Klagenfurt}}
 |Villach|Beljak={{Villach}}
 |Graz|Gradec|Grác={{Graz}}

--Sporti (talk) 12:23, 7 November 2011 (UTC)

✓ Done--Zolo (talk) 13:19, 7 November 2011 (UTC)

Linking to categories[edit]

I don't like the fall-back behavior of linking to categories. In many cases, this will be confusing to the user. If I click on a link in a description, I never expect to go to a category (which may contain nothing but the image I was already looking at). I expect to go to a page giving me information about that location. Can we remove the category fallback behavior? Kaldari (talk) 19:23, 24 March 2012 (UTC)

This if usually the last fallback and the intent was that a link to a category is better than no link, since categories might have interwiki links, or parent categories would tell you about what country the city is in, etc. But I agree that this is the least desirable outcome and I would be fine with retiring it if others feel the same way. --Jarekt (talk) 02:17, 25 March 2012 (UTC)
I would rather keep it because of the links, and because there is often a short description in categories. But would be fine at removing it too. It is sometimes annoying that would never quite know in advance where the links will go.--Zolo (talk) 07:20, 25 March 2012 (UTC)
We could use different colors for different links. The colors do not have to vary much. --Jarekt (talk) 01:16, 26 March 2012 (UTC)
Perhaps. But I guess it would be even more confusing for occasional users. More experienced users can actually mouse over the link to see where it leads. It is just not the most intuitive option.--Zolo (talk) 09:26, 26 March 2012 (UTC)
Yes maybe the same kind of difference as Wikipedia link vs Commons link. But I must say I find those colors somewhat confusing: to me lighter link seems to mean less relevant link than darker link, but links to Wikipedia are both lighter and (in most cases) more relevant than Commons links. -Zolo (talk) 14:28, 26 March 2012 (UTC)

Please add[edit]

{{editprotected}} For "Locations in Iran":

|Persia={{Persia}}
|Tehran|Teheran={{Tehran}}
|Isfahan|Esfahan={{Isfahan}}
|Shiraz={{Shiraz}}
|Tabriz={{Tabriz}}

and "Locations in Tajikistan":

|Dushanbe={{Dushanbe}}

and for "Locations in Egypt":

|Cairo = {{Cairo}}
|Valley of the Kings = {{Valley of the Kings}}

Thanks! --Z 07:20, 2 May 2012 (UTC)

✓ Done and thanks for helping --Jarekt (talk) 11:21, 2 May 2012 (UTC)

sl[edit]

{{editprotected}} Please, add:

  • |sl=Grodno
  • |sl=[[:sl:Kirovska oblast|Vjatka]]
  • |sl=Čugujev for (Chuhuiv|Чугуїв|Чугуев)
  • |sl=[[:sl:Repino|Kuokala (Terioki)]]
  • ''|sl=[[Vlaanderen|Flandrija]]''
  • ''|sl=[[:sl:Bern|Bern (Švica)]]''
  • ''|sl=[[:sl:Torunj|Torunj]]'' for (Torun)
  • ''|sl=[[:sl:Riga|Riga]]''
  • ''|sl=[[:sl:Nežin|Nežin]]'' for (|Nezhin|Нежин|Ніжин)

Thanks a lot. --Eleassar (t/p) 13:31, 12 October 2012 (UTC)

Can you add your changes to template:City/sandbox? I just synchronised it with the current template:City. --Jarekt (talk) 15:15, 12 October 2012 (UTC)

Why not collaborate with wikidata?[edit]

The wikidata project recently collected almost all the wikipedia interwiki links centralizing them to one single node in wikidata.

I have taken a look at the location names in wikidata. Some very little towns like counties in China have been collected. So I think there is no need to add new location template like Template:Beijing. Just take advantage of wikidata.

--Lee凡其Fanchy 09:12, 1 January 2013 (UTC)

Wikidata will surely be very useful in the future, but it is not yet possible to transclude Wikidata content on Commons. --Zolo (talk) 11:25, 1 January 2013 (UTC)
Maybe WikiData should collaborate with Commons? --  Docu  at 11:55, 1 January 2013 (UTC)
Sorry, I don't know it is not yet possible to get the data stored in WikiData. I have thought it should be like getting a picture stored in Commons.--Lee凡其Fanchy 13:46, 1 January 2013 (UTC)
It will be a game changer, but for the time being it is business as usual. it is also unclear to me that we will be able to write templates like Template:Beijing exploring wikidata-stoded links, but I sure hope so. --Jarekt (talk) 03:28, 2 January 2013 (UTC)

Please add (Trieste)[edit]

{{editprotected}} To "Locations in Italy":

|Trieste|Trst={{Trieste}}

--Sporti (talk) 08:57, 18 January 2013 (UTC)

✓ Done --Jarekt (talk) 12:32, 18 January 2013 (UTC)

Please add {{Vinci}}[edit]

{{Editprotected}} In the paragraph Locations in Italy, please substitute the code |Vinci={{LangSwitch|en=[[Vinci]]|mk=[[:mk:Винчи|Винчи]]}} with |Vinci={{Vinci}}.
Thanks in advance, — TintoMeches, 17:11, 24 June 2013 (UTC)

One more thing: in Other Locations, the key European Union has three occurrences, I think one is enough.
Maybe we can add EU and UE as alternative abbreviations... — TintoMeches, 22:25, 24 June 2013 (UTC)
Done. Killiondude (talk) 00:53, 28 June 2013 (UTC)

Typo[edit]

{{Editprotected}} There is a typo on this line:

|uk=[[:ru:Вятская губерния||В'ятська Губернія]]

It should be replaced with:

|uk=[[:ru:Вятская губерния|В'ятська Губернія]]

Basilicofresco (msg) 10:26, 10 September 2013 (UTC)

These links are outdated/ I suppose uk should be [[Vyatka Governorate]] ? By the way, is there a difference between "Vyatka Province" and Vyatka Governorate ? --Zolo (talk) 10:51, 10 September 2013 (UTC)
✓ Doneebraminiotalk 15:28, 14 September 2013 (UTC)

Please disambiguate "Syracuse"[edit]

{{editprotected}} Please add the bold parts and remove the part stricken through!

 |Dieppe
 |Guadalajara
 |Laval
 |Syracuse =  {{tagged ambiguous}}
 |Syracuse, Sicily={{Syracuse}}{{tagged ambiguous}}

Thanks in advance, --Marsupium (talk) 13:11, 2 January 2014 (UTC)

Are you sure that all instances now refer to Syracure, Sicily unambiguously? Otherwise, we'd better to just add the new one and leave the old entry as well (and I did so). whym (talk) 01:45, 13 January 2014 (UTC)
Sorry for my late answer. I think you mix two things: I am not sure that all transclusions of {{Syracuse}} refer to Syracuse, Sicily, I did not even look it up. But all transclusions of {{city|Syracuse}} should be disambiguated. There are no cases at the moment, cf. Category:Tagged ambiguous. But I'd prefer that the template {{city|Syracuse}} does not transclude {{Syracuse}} to show the issue to an editor newly adding it. We could even remove the line |Syracuse={{Syracuse}}{{tagged ambiguous}}. But since it is not currently used it is not that important. Regards, --Marsupium (talk) 09:48, 31 January 2014 (UTC)
@Marsupium: Thank you, now I see what you mean. ✓ Done whym (talk) 10:00, 31 January 2014 (UTC)

German-speaking countries[edit]

{{editprotected}}

Please add "Österreich" to Austria and "Deutschland" to Germany. Thanks! --tacsipacsi (talk) 17:22, 22 April 2014 (UTC)

✓ Done --Jarekt (talk) 18:36, 22 April 2014 (UTC)
Thanks! --tacsipacsi (talk) 20:15, 22 April 2014 (UTC)

Please add[edit]

{{editprotected}} To "Locations in Germany":

|Bayreuth={{Bayreuth}}
|Magdeburg={{Magdeburg}}

--ACBahn (talk) 19:52, 5 September 2014 (UTC)