Page MenuHomePhabricator

Make Wikibase site link system more "interlanguage link" + "interproject link"
Open, Needs TriagePublic

Description

Current solutions:

What I proposed in T54971#3569663 takes another approach:

  • Add column ips_virtual_site to wb_items_per_site, and then drop ips_site_id
  • Create table wb_virtual_site, with columns:
  1. wbvs_id: primary key
  2. wbvs_site: reference (non-injection) to sites table
  3. wbvs_site_group: site group of the virtual site
  4. wbvs_language: language of the virtual site
  5. wbvs_display_id: (optional) the "display id" of the site (such as enwiki), used in API and data dump
  6. wbvs_prefix: the prefix of local page in a virtual site, such as Wy/hy/ or Wort:
  7. wbvs_prefix_type: How can prefix be applied in virtual site (0: prefix applies in all pages; 1: prefix applies in all pages that do not begin with a defined namespace prefix in target wiki; 2: the Incubator-style hosting of page, which is similar to 0 but use Template:Wy/hy/Example instead of Wy/hy/Template:Example)

(seems unsuitable one:)

  • Current table rows in data table wb_items_per_site : ips_row_id , ips_item_id , ips_site_id , ips_site_page
  • Add data rows ips_site_group, ips_site_group_page_language to data table wb_items_per_site
  • Create new data table wb_site_groups

References

Related Objects

StatusSubtypeAssignedTask
OpenNone
OpenNone
OpenNone
OpenNone
OpenNone
OpenNone
StalledNone
StalledNone
InvalidNone
StalledNone
StalledNone
StalledNone
StalledNone
StalledFeatureNone
StalledNone
StalledFeatureNone
StalledFeatureNone
StalledFeatureNone
StalledNone
StalledNone
OpenNone
OpenNone
OpenNone
OpenNone
OpenNone
OpenNone
StalledNone
ResolvedLadsgroup
OpenNone
ResolvedLadsgroup
ResolvedLadsgroup
ResolvedLadsgroup
ResolvedLadsgroup
OpenNone
OpenFeatureNone
OpenNone
OpenNone
OpenNone
OpenNone
OpenNone

Event Timeline

Currently Wikibase suppose an injective relationship between item and local page, and there are mechanism and usecase for conversion in both directions. Once we can have multiple sitelinks to same site

  • The page -> item is still a single map, though we need some code change to ensure this once we allow one item to be connected to multiple pages of the same site.
  • But item -> page will not. In this way, if we does not provide a "primary" language for a site, parser functions and formatValue will break, since there are no defined meaning for the page connected to an item in a site.

Note there are multiple issues for site-Wikidata relationship in Wikidata:

  • Sites with non-BCP Wikimedia language codes, such as be-x-oldwiki
  • Sites with multiple scripts, such as Hakka, Min Dong
  • Sites with multiple languages in one project, such as Beta Wikiversity; also include per-language pages in multilingual sites such as Commons
  • Non-Wikipedia site hosted in a Wikipedia, such as Alemannic projects
  • Sites with multiple languages in multiple projects, such as Incubator

The solution proposed in task description only solved point 1, 2 and potentially 3.

What I proposed in T54971#3569663 takes another approach:

  • Add column ips_virtual_site to wb_items_per_site, and then drop ips_site_id
  • Create table wb_virtual_site, with columns:
  1. wbvs_id: primary key
  2. wbvs_site: reference (non-injection) to sites table
  3. wbvs_site_group: site group of the virtual site
  4. wbvs_language: language of the virtual site
  5. wbvs_display_id: (optional) the "display id" of the site (such as enwiki), used in API and data dump
  6. wbvs_prefix: the prefix of local page in a virtual site, such as Wy/hy/ or Wort:
  7. wbvs_prefix_type: How can prefix be applied in virtual site (0: prefix applies in all pages; 1: prefix applies in all pages that do not begin with a defined namespace prefix in target wiki; 2: the Incubator-style hosting of page, which is similar to 0 but use Template:Wy/hy/Example instead of Wy/hy/Template:Example)
Lydia_Pintscher subscribed.

I'm sorry but this is not enough information t understand why this should be done. Can you please clarify what this is trying to achieve and why?

Winston_Sung renamed this task from Make Wikibase use "language code in group" and allow "multiple language codes for same site ID" to Make Wikibase site link system more "interlanguage link" + "interproject link".Oct 10 2023, 3:03 PM

This is to find a solution for the complex interlanguage link & interproject link structure.