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` and `be-tarask` are the IDs presented to the user in the sitelink editing UI
[] `zh-classical`, `zh-min-nan` and `be-tarask` are the IDs presented in the JSON output provided by Wikibase APIs (including Special:EntityData)
[] 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