As an editor I want to be able to read the references shown in the Bridge.
Problem:
For anything but simple datatypes the formatting contains additional markup etc. We should remove it.
Screenshots/mockups:
How it looks on Wikipedia (formatting of Wikidata references)
BDD
GIVEN a statement with a reference
WHEN editing that statement in the Bridge
THEN the value is shown in a human-readable format
Acceptance criteria:
- reference is formatted in a human-readable way
- language of the client wiki's content is taken into account
Notes:
- There are a lot of properties that can be expected to be a part of a reference (https://www.wikidata.org/wiki/Wikidata:List_of_properties/Citing_sources). We can't cover all cases.
- For now we try to go with a format that is similar to this: "$title. $statedIn. $author. $publisher. $publicationdate. <everything else in the order it is on the repository>. Retrieved $retrieveddate." $title would be linked to the reference URL if available. If a reference URL exists but no title then we spell out the URL instead of the title.
- We will want to make the formatting a bit more sophisticated later but for now that probably suffices. We expect that others will want to be able to use the same reference formatting via the API and Lua in the future so wrapping this into a standard API would be useful.
- For any links to other entities (like author or publication) we output them as plain text and not links to the respective entities or their Wikipedia articles.