Extension:ArticlePlaceholder/Smart red links

Article Placeholder is supposed to show basic info from Wikidata on pages that don't exist yet.

The problem is how to know from which Wikidata item to pull the info, if a red link is not connected to any item; that is, how to connect red links to items.

This is a summary of a discussion about this between Frimelle, Amir E. Aharoni, Duesentrieb and Lydia Pintscher (WMDE) at the MediaWiki Developer Summit 2016.

Storage
Ideally, this should not change anything in the articles' text, and should be as transparent as possible for editors and readers. Therefore the connection should probably be stored as part of the data about the item. The existing sitelinks can be used for this - though they are perceived as links to pages that already exist, this is not strongly enforced. It is impossible to add a sitelink through an item page if it doesn't exist, and sitelinks for pages that are deleted are auto-removed, but they can be added before the page is created.

Adding, from the user perspective
If a user clicks on a red link, and the connection between that red link and an item was not yet made, the page cannot show Wikidata info. It can show a question: "Does an article about  exist in another language?", and show a language selector and an input field to fill the title. It can also automatically search for similar labels in other languages and let the user pick something matching. After that is done, the connection is made, and the next time any user clicks that red link in any article, the info will be shown.

Before actually storing the information, it should be verified to see that it's unique (it's supposed to be if the link is red, but there may be edge cases).

In the item page in Wikidata, the link may be shown with a different color to show that it's "pre-added", for example by showing the sitelink title as red.

If the red link is added by ContentTranslation, then the connection to the item can be made fully automatically because the link in the foreign language is already known.

Other possible scenarios for getting the connection info added:
 * Go over Special:WantedPages and add it to every red link (it may make sense to modify Special:WantedPages to show only links that don't have such a connection).
 * Ask a user who saves a revision with red links to make the connection (for example, have a bot to send a request to the user page, or show a bubble after saving).