Page MenuHomePhabricator

Add Wikidata entities as type parameters
Open, Needs TriagePublic

Description

https://www.mediawiki.org/wiki/Help:TemplateData#Type_parameter lists values like "wiki-page-name", "wiki-file-name" and "wiki-user-name" for looking up pages, files and users, respectively.

There should be something similar for Wikidata entities (items, properties, lexemes, forms and senses). This is particularly important because the page names for Wikidata entities are unguessable identifiers like Q5 and P31.

This would not only be useful on Wikidata - any wiki which wants to fetch data from Wikidata could have a template where a parameter is the ID of a Wikidata entity, e.g. the "item" parameter on https://commons.wikimedia.org/wiki/Template:Navigation_by

Event Timeline

It will be usefull. I support that.

I support this wholeheartedly! It is very useful when people are filling in data manually using VE. I am happy this exists already but sad that there's no progress.

I’m not sure a new type is the best solution; a "wikidata" field referencing the property (e.g., "p50") would suffice.

For the UI I’m thinking of a mockup like this (for p50 property in https://it.wikipedia.org/wiki/Divina_Commedia )

image.png (1,148×324 px, 49 KB)

I’m not sure a new type is the best solution; a "wikidata" field referencing the property (e.g., "p50") would suffice.

What do you mean by "a wikidata field" though? How is it designated as such? It can't just be the parameter name or label because it should be able to be translated, and there might be multiple fields that need to reference Wikidata items.

I think a new type called wikibase-item would be great. There would be a config variable to set the Wikibase site that gets used.