Page MenuHomePhabricator

Add Wikidata item search for adding depicts statements
Closed, ResolvedPublic

Description

This allows the participating user to select Wikidata items that will be values for the depicts statements added.

Note: The UI elements for this feature still need to be added to the mockups. They will be added here as soon as they are done

Search language:

  • The user should be able to select which language to search in, directly next to the search box and independent of their own language settings (this should be confirmed, for first version we should probably just use the users' default language setting)
  • The language selected is used as the main search language in the API call, as well as for the labels & descriptions of results returned.
  • The language chosen should remain as the default for the rest of the 'Participate session'.

Note: the search API call described below has some very good fallbacks built in. So any language selected will always have an English fallback, but it will also return matches from any language. E.g. a search for "Εμπάιρ Στέιτ Μπίλντινγκ" returns the Empire States Building even when searching in English.

API calls:
Use the wbsearchentities module to generate a list of dropdown search results for the user the choose from.
We pass the search term (entered by the user) and the selected language. The selected language should be used for both the language and uselang parameters

e.g. To search for "chat" in French use https://www.wikidata.org/w/api.php?action=wbsearchentities&search=chat&language=fr&uselang=fr

Event Timeline

NavinoEvans renamed this task from Wikidata item search for adding depicts statements to Add Wikidata item search for adding depicts statements.May 1 2019, 6:02 PM
NavinoEvans moved this task from In progress to Backlog on the ISA board.

Change 509424 had a related patch set uploaded (by Eugene233; owner: Eugene233):
[labs/tools/Isa@master] Add Wikidata item search for adding depicts statements

https://gerrit.wikimedia.org/r/509424

Change 509424 merged by jenkins-bot:
[labs/tools/Isa@master] Add Wikidata item search for adding depicts statements

https://gerrit.wikimedia.org/r/509424