Background
We would like to explore adding the link to add interwiki links to Wikidata back into the sidebar as a temporary solution until the release of the new version of the ULS. See T282026: Discussion: Unable to quickly add interwiki links via Wikidata’s "Add link" interface for more context.
Acceptance Criteria
- Explore options for adding interwiki links to bottom of sidebar
- potential copy: "Add links to other languages"
- Link behavior:
- if page has wikidata ID, navigate to the corresponding section in wikidata
- if page does not have a wikidata ID, display the "Link with page" modal
Developer notes
The link is added here:
https://gerrit.wikimedia.org/g/mediawiki/extensions/Wikibase/+/35c9b0291754aeb246207735650e4079b51005d8/client/includes/RepoItemLinkGenerator.php#146
via this hook: https://gerrit.wikimedia.org/g/mediawiki/extensions/Wikibase/+/35c9b0291754aeb246207735650e4079b51005d8/client/includes/Hooks/SkinAfterPortletHandler.php#74
Presumably, we'd only want to do this for modern Vector (e.g. not legacy Vector). This makes this a challenge as Wikibase has no way of distinguishing between the two Vectors without using some internal Vector classes which are not marked as stable.
We can do this, but this will result in product and technical debt that we will need to pay off later. It will means later in the project we will have to come back and do this task again and handle any caching implications.
The Wikibase extension is quite complicated to set up and the team is not familiar with their extension so there's a non-trivial cost there for doing that.
Option: Apply to both legacy and modern
We could add the new link in legacy and modern. While this would lead to a duplicate item, it would arguably help with learning the new location and would drastically simplify things (no tech or product debt)
Counter proposal
I think it will actually be a lot easier to make a change in UniversalLanguageSelector extension. This would also be more future proof and allow us not to have to revisit this at a later date.
With a few modifications we could do the following to surface the add language link:
Note, this doesn't help the situation where there is no language button. We'd need to revisit T276950. Perhaps we can reconsider showing the language button on pages with no languages, given there would now be an action?
Thoughts?