Wikidata:Contact the development team/Archive/2017/05

From Wikidata
Jump to navigation Jump to search
This page is an archive. Please do not modify it. Use the current page, even to continue an old discussion.

References: online sources

As I understand it I should use the title of a whole website (and not the title of a specific page or an article on that website) as title of my online source. When I use an article in a book as source, I'd use the title of the article as title and I would add a published in reference for the book. Since online sources in general are much more voluminous than books I'm not sure I really got it… Why shouldn't I create an item for the website? Thanks, --Stefan Nagy (talk) 18:33, 29 April 2017 (UTC)

I think you should ask at WD:Project chat or Help talk:Sources. Matěj Suchánek (talk) 11:44, 5 May 2017 (UTC)
OK, I'll try that. Thanks! --Stefan Nagy (talk) 12:58, 8 May 2017 (UTC)

Add more language codes

I'm working on history of religions and I (will) often need to tag assertions with an obscur (i.e. extinct or liturgic) language. For example, I want to add "Muani (kish) (Q203922) <nickname (P1449)> Mar Mani hayya <P2439 (P2439)> syc", but the Syriac (Q33538) language (an extinct dialect of aramaic) is not available. Can someone please add it to the list of available languages? And/or explain how to ask efficiently (I foresee several such queries in a near future)? — nojhan () 22:09, 4 May 2017 (UTC)

Someone on the IRC channel indicated the right page to me: Help:Monolingual_text_languages (which has all the necessary information).
This request is now on Phabricator: Add monolingual language code sycnojhan () 11:41, 5 May 2017 (UTC)

Infobox and Wikidata

Several infoboxes like en:Template:Infobox World Heritage Site are now directly linked to Wikidata. Is there any tutorial explaining how such linking can be achieved? Projects like Wikidata:WikiProject Informatics/Programming Language, Wikidata:WikiProject Informatics/Data Structure etc. have already achieved the mapping of various properties to infobox items. But currently direct linking has not been tested (as far as I know). Thanks Jsamwrites (talk) 09:44, 5 May 2017 (UTC)

@Jsamwrites: Is Template:Infobox World Heritage Site a lua infobox ? This is the first question to answer.
There is 2 ways to creates infoboxes using WD data:
  • you use current templates in wikitext and you insert special code to extract and display data from WD. In that case look at en:Template:Wikidata to know how to use the special code.
  • you create a new indobox using lua and you can program in the code the data extract from WD. For that case you have to find the instructions in your WP. Snipre (talk) 12:01, 5 May 2017 (UTC)
Mike Peel has done a lot of good work in this area; he may be able to point to documentation, or examples. Andy Mabbett (Pigsonthewing); Talk to Andy; Andy's edits 13:36, 5 May 2017 (UTC)
@Jsamwrites: It's still somewhat experimental, and I'm afraid there isn't a tutorial explaining how to do so yet, but Wikidata-driven infoboxes are now possible. :-) My canonical example is en:South Pole Telescope, where the entire infobox (en:Template:Infobox telescope) is filled out from Wikidata (as are a number of the articles on the telescope in different language Wikipedias). The code to do so varies quite a bit between the different Wikipedias, though. On the English Wikipedia, en:Module:WikidataIB does most of the heavy-lifting, but en:Module:Wikidata, en:Module:Wd, and templates like en:Template:Coord also are useful depending on the datatype. Calls to these modules are made in-situ within the normal infobox code; other projects use Lua code to create each infobox, which is rather more complex.
Most of the work isn't actually in enabling Wikidata in the infobox, thought: it's identifying the correct Wikidata properties to link against, making sure there's community consensus to implement Wikidata, and then working through each article that uses the infobox to migrate the data to Wikidata. So if you're interested in migrating an English Wikipedia infobox, then I would be happy to help migrate the infobox code, if you can identify the Wikidata properties to be linked to, and can work on the migration of the infobox information in the articles to Wikidata. Thanks. Mike Peel (talk) 23:34, 5 May 2017 (UTC)
Thanks Mike Peel for your reply. It's a very good approach and has the potential to help Wikipedia (infobox) in other languages. Jsamwrites (talk) 13:20, 6 May 2017 (UTC)

Tooltips

If I hover the mouse over an item on my watchlist a tooltip appears with the item/property description. However, if I do the same on an item page, then only the q-number is displayed. Is that expected behavior?--Micru (talk) 14:09, 5 May 2017 (UTC)

Hey Micru, thanks for noticing. It doesn't look like a bug, more like something we could improve :) Lea Lacroix (WMDE) (talk) 07:42, 10 May 2017 (UTC)
It would definitely be useful to be able to reveal the description, given that we are encouraged not to put disambiguation in the labels, only the descriptions. Jheald (talk) 22:15, 10 May 2017 (UTC)
It seems to me like the UI tries to show the description. Sometimes a description is shown sometimes it isn't. It feels like there's a request send to the server when a user hovers over the item and when the server answers fast enough the description is shown. ChristianKl (talk) 09:28, 26 May 2017 (UTC)

Make adding of aliases optional when merge

This does not make any sense in this specific case! -- Innocent bystander (talk) 07:20, 21 May 2017 (UTC)

While we are at the topic of merging, it would be nice if the automatically generated summary would hotlink the merged item. When it currently says "(‎Merged item from Q28421936: merge.js)" it could say "(‎Merged item from James O'Neill (Q28421936): merge.js)" ChristianKl (talk) 10:50, 23 May 2017 (UTC)
Thanks for your suggestions, I'll have a look. @Innocent bystander: can you describe me what is the behaviour that you would expect? Lea Lacroix (WMDE) (talk) 11:02, 23 May 2017 (UTC)
In this case, I merged lists like "List of X/A-C" with "List of X/D-F" etc into an article with the simple label "List of X".
"List of X/D-F" and the others are probably not valid as aliases in the merged item, and it would probably be helpful if there were a box with the description "add the labels and aliases of this item into the target item" next to the other boxes. That box should already be marked with an X, since that would be the most common way to do most merges. The removal of this X from this new box, should result in that labels and aliases of the merged item isn't edited. The labels and aliases in the item that has been turned into an redirect is simply lost into the large empty void of lost data. -- Innocent bystander (talk) 11:46, 23 May 2017 (UTC)
So we have T69281 (linked right) for linking the edit summary. The API module already supports ignoring conflicts with descriptions statements and sitelinks as document @ https://www.wikidata.org/w/api.php?action=help&recursivesubmodules=1#wbmergeitems. I think we make a conscious decision when creating it to not do anything fancy for aliases. ·addshore· talk to me! 07:45, 24 May 2017 (UTC)

Beobachtungsliste de:wp

Hallo,
ist erneut fehlerhaft:

(Unterschied | Versionen) . . D Wikipedia:Lua/Modul/Wikidata/de (Q64); 20:38 . . Maxlath (Diskussion | Beiträge) (‎Aussage erstellt: Property:P3984: /r/berlin)

Zuordnung Q64 und Wikipedia:Lua/Modul/Wikidata/de in Beo ist falsch.

Grüße, Conny (talk) 19:21, 24 May 2017 (UTC).

@hoo_man, Thiemo Mättig (WMDE): Lea Lacroix (WMDE) (talk) 11:43, 25 May 2017 (UTC)
Ich verstehe, dass die Zeile überraschend ist, aber sie ist korrekt. Ich gehe davon aus, dass du die Seite de:Wikipedia:Lua/Modul/Wikidata/de beobachtest. Auf der Infoseite ist zu erkennen, dass die Seite Informationen aus Q64 ("Berlin") benutzt, allerdings auf eine Art und Weise, bei der nicht unterscheidbar ist, was genau benutzt wird. Deshalb wird diese Verknüpfung als "Alle Objektdaten" verwaltet, und die Software geht davon aus, dass alle Änderungen an Q64 Auswirkungen auf die Seite de:Wikipedia:Lua/Modul/Wikidata/de haben könnten. Deshalb wirst du sicherheitshalber über alle Änderungen informiert. Wir arbeiten bereits daran, das klüger zu gestalten. --Thiemo Mättig (WMDE) 11:16, 29 May 2017 (UTC)

Invalid stored dates

There are items with invalid stored dates, which prevent edits through the API (at least when using the PHP library). The error message is: Malformed input: +2006-05-04T04:00:00Z. When fixing this, you can't see any difference through the gui (not even in diff mode). See Special:Diff/491012570 for example. Can these either be fixed or a list generated so a bot could fix these? Mbch331 (talk) 07:48, 27 May 2017 (UTC)

It appears the behavior is exactly as expected in this case. I do see the change in the diff: it was 04:00:00 before the change, and set to 00:00:00 with the edit. This is fine and exactly what should be done. An edit that contains a disallowed time value as part of the edit is blocked by the validators. This is intended. If you do not want this, you have to do a smaller edit that does not contain the problematic value. This will work. Cases that need fixing can be found with the Query Service. There is no code that blocks time values other than 00:00:00 being exported to RDF and the Query Service. Pinging Lucas as he might have a query at hand. --Thiemo Mättig (WMDE) 11:04, 29 May 2017 (UTC)
Well, I have a query, but it’s extremely inefficient – it takes about thirty seconds to find a single result:
SELECT ?x ?y ?val WHERE {
  ?x ?y ?val.
  FILTER(DATATYPE(?val) = xsd:dateTime).
  FILTER((HOURS(?val) + MINUTES(?val) + SECONDS(?val)) != 0).
}
OFFSET 1 # first result is wikibase:Dump schema:dateModified
LIMIT 1
Try it!
--Lucas Werkmeister (WMDE) (talk) 16:03, 29 May 2017 (UTC)
Let's make it efficient, then:
SELECT ?item ?p ?pred ?val WHERE {
  ?node wikibase:timeValue ?val .
  FILTER( HOURS( ?val ) + MINUTES( ?val ) + SECONDS( ?val ) != 0 ) .
  ?st prov:wasDerivedFrom? [ ?pred ?node ]; wikibase:rank [] .
  ?item ?p ?st .
}
Try it!
Matěj Suchánek (talk) 16:26, 29 May 2017 (UTC)