Currently, Wikibase accepts only one way for sitelinks. their canonical database name (their id in MW sites table).
It is a convention on Wikimedia wikis that site ID use hyphens as a delimiter, whereas canonical database names use underscores.
Wikibase currently does take this convention into account.
Example: zh-classicalwiki ("Chinese Classical Wikipedia") is used to refer to wiki, which canonical site ID is zh_classicalwiki (note - vs _)
Change requested: Site IDs containing hyphens are accepted and mapped to Site IDs with underscores for storage (and mapped back to hyphens for display)
Acceptance criteria
- The canonical site ids are still used for storage in JSON and other indexes.
- zh-classical, zh-min-nan are allowed to be used in the input in the sitelink editing UI
- zh-classical, zh-min-nan are the IDs presented to the user in the sitelink editing UI (not the case currently)
- zh-classical, zh-min-nan are the IDs presented in the JSON output provided by Wikibase APIs (including Special:EntityData) (not the case currently)
- The change in the the JSON output should be configurable, so it could be enabled on demand, to allow WMDE to follow the Stable Interface possible
- zh-classical, zh-min-nan are allowed to be used in the input to Wikibase APIs (eg. wbeditentity)
- Special:GoToLinkedPage, Special:ItemByTitle accept all alias Site IDs, as well as the canonical site ID
- Wikibase (including but not limited to WMF production) should work as follows: identifiers containing hyphens, e,g, zh-classicalwiki are accepted as an site identifier, and add a sitelinks to a Wikipedia(s) with a canonical site ID containing underscores instead of hyphens, e.g. "Chinese classical" Wikipedia (canonical site ID zh_classicalwiki) both in UI and API
Originally part of T114772