Template talk:Institution

From Wikimedia Commons, the free media repository
Jump to: navigation, search
Info non-talk.svg Template:Institution 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.

Rewrite based on Module:Institution/sandbox and Wikidata[edit]

Hi, lately I was working on Module:Institution/sandbox which is based on Module:Creator and rewrites the template using Lua code. New template would also be able to access Wikidata and pull all the data from there if the data is not provided. For example compare:


Louvre Museum  Blue pencil.svg wikidata:Q19675  (Inventory)
Louvre Museum
Native name Musée du Louvre
Parent institution Établissement public du musée du Louvre
Location Paris
Coordinates 48° 51′ 37″ N, 2° 20′ 15″ E Link to OpenStreetMap Link to Google Maps
Established 1793
Web page www.louvre.fr
Authority control

{{Institution/sandbox | Wikidata = Q19675 | inventory = Musée du Louvre:Inventory}}

The first one is the current institution template and the second one shows the data pulled from Wikidata. New template will also create maintenance categories that would allow us to compare data on Commons with data on Wikidata. Please check templates that currently use the new code and see if there are any issues with it. I will do more testing but, if there are no issues I will deploy it. --Jarekt (talk) 18:37, 9 February 2018 (UTC)

@Jarekt: very nice. Tried it for a couple of institutions and only found a minor thing: Can you please make the image a bit bigger? Multichill (talk) 20:55, 9 February 2018 (UTC)
Will do--Jarekt (talk) 21:04, 9 February 2018 (UTC)
@Jarekt: Thanks, looks better. Commons:WikiProject sum of all paintings/Institutions contains some quite interesting edge cases. Multichill (talk) 11:53, 10 February 2018 (UTC)

Module:Institution version of the template is live now[edit]

Module:Institution version of the template is live now. Please report all the issues below. Please ping me. --Jarekt (talk) 15:31, 12 February 2018 (UTC)

Category:Institution template maintenance[edit]

In case, someone is wondering about new maintenance categories in Category:Institution template maintenance. If the Wikidata values are known, than the new template compares Institution template data with Wikidata info and looks for issues. As in case of Category:Creator template maintenance, there are several types of categories:

At the moment the template prefers Commons content and displays Wikidata content only if info is missing on Commons. As a result, filled name field on Commons with no or few translations or links might be blocking creation of label based on Wikidata which might or might not be better. Same with other fields, badly filled fields might block better info from Wikidata. On the other hand, hand-crafted Commons data might be more informative than data from Wikidata and those fields should not be removed. --Jarekt (talk) 19:02, 13 February 2018 (UTC)

I think it would be preferable to actually compare local and Wikidata data for the website and have Category:Institution templates with Wikidata link: mismatching website. I can imagine that comparing isn't all that easy, but then I'd prefer to get them sorted to the mismatch rather than the redundant category so that we do not delete valuable data inadvertently.
(BTW: It would also be nice if language of work or name (P407) qualifiers to official website (P856) would be used for i18n so that we can delete this data e.g. from Institution:Musée de l'Armée.) --Marsupium (talk) 13:35, 15 February 2018 (UTC), 13:39, 15 February 2018 (UTC)
Ok, I guess you are right. I just heave higher confidence that wikidata websites are still alive. My random sampling of some of websites in Category:Institution templates with Wikidata link: item missing website reviled many dead links. The current version of Module:Institution/sandbox tags fields as "redundant" if:
I will work on using language of work or name (P407) qualifiers to official website (P856). Any other improvements that could be made. BTW, I am introducing a new option field which, similar to option in {{Creator}} could be used to add text after the name string. For example {{Institution:SUD Salon Urbain de Douala|2007 (or any other string)}} would show up as
SUD Salon Urbain de Douala  2007 (or any other string) Blue pencil.svg wikidata:Q3943968
SUD Salon Urbain de Douala
Native name SUD Salon Urbain de Douala
Location Douala, Cameroon
Established 2007
Web page http://www.doualart.org/spip.php?rubrique3
Authority control


I would use it for templates in Category:Institution templates with mismatching linkback. --Jarekt (talk) 14:47, 16 February 2018 (UTC)
Thank you for all improvements!
I've also already stumbled upon the pages in Category:Institution templates with mismatching linkback. I'm not sure if a new option parameter is the way to go. The established way for that use case at least for the {{Artwork}} template family is the |department= parameter. I'd prefer to migrate the four cases of Category:Institution templates with mismatching linkback to that established way. --Marsupium (talk) 19:16, 16 February 2018 (UTC)
I agree those 4 cases would be solved better by the use of |department= parameter. Maybe indeed that is the way to go. Adding department name after the template will show in exactly the same way as adding |department= parameter, but as we will be switching to using Wikidata with Artwork templates, it might be better to have fewer special cases. The still undocumented option field allows greater flexibility with templates like Institution:SUD Salon Urbain de Douala 2013 (which shares item with Institution:SUD Salon Urbain de Douala and 2 other templates). Although I many of it's issues are still not resolved and the best option might be to just use single Institution:SUD Salon Urbain de Douala + department or to have 4 wikidata items. So in the end we might not need option field. --Jarekt (talk) 03:44, 20 February 2018 (UTC)

Evaluate located at street address (P969)![edit]

For the location field we should evaluate located at street address (P969) (and possibly located on street (P669), street number (P670) and postal code (P281) though this requires a lot of reasoning, but has i18n and links) I think. Then we can remove this information from for instance Institution:ModeMuseum Provincie Antwerpen. Template:Wikidata Infobox also uses located at street address (P969) (and does a bad job in using postal code (P281)). Cheers, --Marsupium (talk) 10:40, 26 March 2018 (UTC)

Evaluate end time (P528) qualifiers[edit]

… to located in the administrative territorial entity (P131) statements. This is necessary e.g. for d:Q6581530#P131. The qualifier should perhaps be used to filter values of parent organization (P749), official name (P1448) and location (P276) as well. Cheers, --Marsupium (talk) 12:16, 26 March 2018 (UTC)


Even though this parameter is listed as valid, I found a case where its use caused the Institution to be included in Category:Institution templates with unknown parameter. The geopoly data seems to be properly formatted. I had a look inside the module and couldn't find any reason for this behaviour; maybe the different spelling "GeoPoly" in line 295? Capmo (talk) 15:46, 24 April 2018 (UTC)

Pictogram voting keep.svg Fixed "GeoPoly" was mistyped in line 295 as all arguments are lowercase at this stage. Unfortunately GeoPoly no nonger show up as the server no longer works, see {{GeoPolygon}}. --Jarekt (talk) 20:53, 24 April 2018 (UTC)
Thanks! Capmo (talk) 12:16, 25 April 2018 (UTC)