Template talk:Wikidata Infobox

From Wikimedia Commons, the free media repository
Jump to: navigation, search

Monument numbers[edit]

Nice template! It is possible to add monumnet numbers (and links) as well ? Here is an inspiration.--Jklamo (talk) 17:12, 29 January 2018 (UTC)

@Jklamo: Thanks! National Heritage List for England number (P1216) is included at the moment (e.g., see Category:Manchester Central Library), and I can add more individual property numbers like that if you want - just let me know which. :-) Thanks. Mike Peel (talk) 19:59, 29 January 2018 (UTC)

Wishlist[edit]

  • ✓ Done Display interwiki links to Wikipedia/Wikivoyage/etc. Mike Peel (talk) 11:44, 3 February 2018 (UTC)
  • ✓ Done Handle cases like 'human settlement' better, e.g., at Category:Paranapiacaba. Mike Peel (talk) 11:44, 3 February 2018 (UTC)
  • ✓ Done heritage designation (P1435) --Atamari (talk) 16:26, 4 February 2018 (UTC)
  • ✓ Done located on street (P669) (+ street number (P670) +postal code (P281)) --Atamari (talk) 16:26, 4 February 2018 (UTC)
    I see, p669 is not that easy. The road has to be created separately as an item, which requires a few thousand more. Alternative Property is located at street address (P969). --Atamari (talk) 21:03, 4 February 2018 (UTC)
    @Atamari: I've added a switch to display P969 where available. Can you test the version in the sandbox to see if that works as expected, please, and/or let me know some example cases? Thanks. Mike Peel (talk) 10:06, 5 February 2018 (UTC)
    Category:St. Michael (Limburg an der Lahn) Wikidata with P969 ("Domplatz 1"). Q1590425 is another example with P969. --Atamari (talk) 10:50, 6 February 2018 (UTC)
    @Atamari: OK, this is mostly working (and live in the main version). If P969 is present, then that is displayed; then if any of P669, P670 or P281 are available then they will be shown instead, otherwise nothing will be shown for that line. The template does not handle cases where one of those properties is a qualifier to another of the properties, though - so in the case of St. Michael it will not show the number, but it will show the street. It's probably possible to improve that at some point, but it's a bit complicated to do so right now. Thanks. Mike Peel (talk) 22:02, 6 February 2018 (UTC)

Hi! Site-links to languages other than English don't work (Wikiquote & Wikisource, Wikipedia is OK though) since they redirect to the English version. Field "architect" could be interesting for building categories. Thanks! strakhov (talk) 22:22, 6 February 2018 (UTC)

@Strakhov: Architect should now be included. Can you point me to a case where Wikiquote and Wikisource aren't working, please? Thanks. Mike Peel (talk) 22:42, 6 February 2018 (UTC)
Great! Uhmmm: Category:Ángel Ganivet: wikisource & wikiquote (Spanish). strakhov (talk) 22:48, 6 February 2018 (UTC)
Ah, sorry, I'm browsing in English so I didn't notice those links (yay, the checking code works? ;-) ). Will look into it! Thanks. Mike Peel (talk) 22:52, 6 February 2018 (UTC)
@Strakhov: It should now be fixed - can you check again, please? You might need to purge your cache (add "?action=purge" onto the end of the URL). For some reason it bounces through the English version of the project, but it should end up at the right place. Thanks. Mike Peel (talk) 23:00, 6 February 2018 (UTC)
Yep, it's all right. Apparently it uses the English version, but the prefix es: redirects the click to the right place. Thanks! ~~
Great! Please ping me if you spot any other issues! Thanks. Mike Peel (talk) 23:19, 6 February 2018 (UTC)

Width issue[edit]

The infobox as currently seen on Category:Àlex Hinojo is too wide, apparently caused by the occupation cultural activist, Wikipedian in Residence row.

It would be better to display those occupations vertically, as a list, perhaps using {{Plainlist}}. Andy Mabbett (Pigsonthewing); Talk to Andy; Andy's edits 19:50, 3 February 2018 (UTC)

@Pigsonthewing: Now fixed at {{Wikidata Infobox/sandbox}}, which I'll deploy later today (hopefully once I've finished figuring out the sitelinks). Thanks for the feedback! Thanks. Mike Peel (talk) 20:57, 3 February 2018 (UTC)
✓ Done Now deployed. Thanks. Mike Peel (talk) 21:40, 3 February 2018 (UTC)
Thank you; that worked. May I suggest {{Plainlist}} for other multi-value entries, including the authority control data? Andy Mabbett (Pigsonthewing); Talk to Andy; Andy's edits 15:27, 4 February 2018 (UTC)
I added "list=ubl" (unbulleted list) to most parameters. Authority control currently uses {{Br separated entries}}. Switching to plainlist might be a bit tricky, since it requires bullet points (which means lots of #if statements to check if something is going to be put after the bullet point). Thanks. Mike Peel (talk) 18:11, 4 February 2018 (UTC)

[edit]

If there is no P18 value available in wikidata but P154, would it be OK showing the logo instead? strakhov (talk) 19:57, 10 February 2018 (UTC)

@Strakhov: The logo should now be displayed below the image, where available. Does that look OK to you? Thanks. Mike Peel (talk) 15:15, 14 February 2018 (UTC)
It's OK. Rewording my previous suggestion, I'd avoid P18 if there's a P154 value. Example: Category:McDonald's -> IMHO the pic taken in Saugus, Massachusetts is kinda disposable in that infobox. But it's no big deal. Thanks. strakhov (talk) 15:26, 14 February 2018 (UTC)
@Strakhov: I've been thinking about this, and I'm a bit reluctant to hide one if the other is present as I suspect there are cases where we want to display both, e.g., for a company with a logo here that is based in a notable building. It's easy to make the change at any point in time, though - it's just an if statement that needs to be added. So shall we see how displaying both goes for now, and if there is an issue or if others express opinions here then we can reconsider, if that's OK? Thanks. Mike Peel (talk) 22:22, 16 February 2018 (UTC)
It's OK for me. :) strakhov (talk) 15:33, 17 February 2018 (UTC)

Languages of dates[edit]

Sorry if this has already been discussed, but: I use my native Polish as my Commons interface language and I've noticed that while Template:Wikidata person displays dates of birth and death using the language of the user (Polish in my case), this template always shows me dates in English. I hope this can be fixed at some point in future (@Mike Peel:). Thank you in advance! Powerek38 (talk) 12:27, 14 February 2018 (UTC)

@Powerek38: That's a good catch, thanks for pointing it out. This template uses Module:WikidataIB, while the other one uses Module:Creator, which in turn uses Module:Wikidata date, so has more complex data formatting. @RexxS: is there a way that code from those two could be used in WikidataIB to handle dates multilingually at all? Thanks. 15:19, 14 February 2018 (UTC)

ISSN[edit]

Hi. It'd be nice having such a basic identifier as ISSN displayed in the infobox. We have many categories on periodicals and ISSN is not even shown in the {{authority control}} template. Thanks! strakhov (talk) 22:11, 15 February 2018 (UTC)

@Strakhov: done. I would have added BNE at the same time, but there's a problem - in that example there are two BNE IDs on Wikidata, and it's supposed to be a unique ID. I've seen this happen elsewhere with other IDs too. I'm thinking about applying a maximum number of values of 1 for each ID, do you think that would be an issue anywhere? Thanks. Mike Peel (talk) 10:02, 16 February 2018 (UTC)
Thanks. I think it's a great solution for now, prioritizing the one added first. Wrt BNE's ID, I added several times two ID's: edition and work. The first one is more generous with regard to data. I'm very careful with that stuff in book-items, but when it comes to periodicals ..splitting items into "edition" and "work" seems (most of the time) just wrong to me. With this approach we would potentially give a single ISSN instead of two (paper, online) in some periodical-items (online and printed edition usually share the same item in Wikidata) ...but IMHO it's mostly OK. strakhov (talk) 13:26, 16 February 2018 (UTC)
@Strakhov: OK, maxvals=1 is now implemented (by a considerable rewrite of {{Wikidata ID line}}), and I've added BNF to the infobox too. How does that look - any problems you can spot? Thanks. Mike Peel (talk) 22:16, 16 February 2018 (UTC)
It's OK ..so far. Thanks! strakhov (talk) 15:32, 17 February 2018 (UTC)

P281 in infobox[edit]

I think I've found another issue: Wikidata property P281 is obviously postal code, but the description of the infobox field, which uses values from this property, says "located on street" in English and the same in Polish. For example Category:Milanówek. Powerek38 (talk) 15:17, 16 February 2018 (UTC)

@Powerek38: That line (added due to @Atamari:'s request in the wishlist section above) actually shows located at street address (P969) if that is present, and then falls back to displaying located on street (P669), street number (P670) and postal code (P281) if one or more of those is available. In this case, it looks like only P281 is available. I think there's two options here: either we change the label we use from P669 to another one, perhaps "address" (d:Q319608), or we change the logic so that the line is only shown if either P969 or P669 are available (i.e., if P670 and/or P281 is available, but the others aren't, then nothing's shown). Thoughts? Thanks. Mike Peel (talk) 15:55, 16 February 2018 (UTC)
Well, I would opt for the second option. Otherwise it will look quite strange whenever the template is used for any larger geographic or administrative unit, which for obvious reasons will never have any P669 or P670 values, like in my example (Milanówek is a town in the Warsaw metropolis). Powerek38 (talk) 16:02, 16 February 2018 (UTC)
@Powerek38: OK, I've updated the logic accordingly. How does that look now? Thanks. Mike Peel (talk) 21:52, 16 February 2018 (UTC)
@Mike Peel: Much better, thank you! Powerek38 (talk) 07:37, 17 February 2018 (UTC)

P217[edit]

What about inventory number (P217)? I think it should be there, but not sure in what section.--Jklamo (talk) 12:43, 17 February 2018 (UTC)

P856: Website display[edit]

It would be cool avoiding this situation, which happens when too-lenghty-links are added in Wikidata. strakhov (talk) 17:16, 17 February 2018 (UTC)

@Strakhov: There are two options. The first is demo'd at [1] - but note that the formatting of the whole block changes, and there are also some oddities when you view the category on mobile that I need to look into. The other option is, rather than "Official URL: <URL>", they could instead be displayed as "[Official URL]", i.e. with the label as the link rather than showing the URL. Or we go with URLs that look like [2]. What do you think? Thanks. Mike Peel (talk) 13:14, 18 February 2018 (UTC)
@Mike Peel: Hi! Well, I do not have a strong opinion, but I'd probably say I'm with the second one. I mean, people add some pretty weird official websites in Wikidata. Seing that displayed in three, four lines... not OK, specially if it puts a heavier workload on you. strakhov (talk) 21:56, 18 February 2018 (UTC)