In poking at the code for supporting wikivoyage, it looks to me that the site_identifiers table is populated incorrectly for non-wikipedias.
For wikipedia sites, it has interwiki keys such as 'en'. For wikivoyage, it is 'enwikivoyage'. These are used to construct interwiki links and 'enwikivoyage:Berlin' is not valid. Thus it's problematic to use the sites code for interwiki links.
Is there a good reason for populating the table in this way?
I think the table should have si_key = 'en' for English Wikivoyage. That means a database rows for enwiki and enwikivoyage would be:
4977 | interwiki | en | 4984 | interwiki | en |
****but**** the table defines a si_type and si_key as a unique key, so this does not work currently.
UNIQUE KEY `site_ids_type` (`si_type`,`si_key`),
Any insights on why things are the way they are?
Cheers, Katie
Hey,
I think the table should have si_key = 'en' for English Wikivoyage. That
means a database rows for enwiki and enwikivoyage would be:
4977 | interwiki | en | 4984 | interwiki | en |
****but**** the table defines a si_type and si_key as a unique key, so this does not work currently.
UNIQUE KEY `site_ids_type` (`si_type`,`si_key`),
Any insights on why things are the way they are?
Imagine it is like you say and you have two interwiki identifiers "en".
[[en:SomePage]]
Where does that link to? English Wikipedia? English Wikivoyage? Both? What?
IIRC this constrains was already there in the old system. Is that wrong?
Cheers
-- Jeroen De Dauw http://www.bn2vs.com Don't panic. Don't be evil. ~=[,,_,,]:3 --
On Tue, Jul 23, 2013 at 5:15 PM, Jeroen De Dauw jeroendedauw@gmail.comwrote:
Hey,
I think the table should have si_key = 'en' for English Wikivoyage. That
means a database rows for enwiki and enwikivoyage would be:
4977 | interwiki | en | 4984 | interwiki | en |
****but**** the table defines a si_type and si_key as a unique key, so this does not work currently.
UNIQUE KEY `site_ids_type` (`si_type`,`si_key`),
Any insights on why things are the way they are?
Imagine it is like you say and you have two interwiki identifiers "en".
[[en:SomePage]]
Where does that link to? English Wikipedia? English Wikivoyage? Both? What?
To distinguish, you do [[w:en]] for English Wikipedia and [[voy:en]] for English Wikivoyage. Without that prefix, then assume within the site group.
In Wikimedia's config, the interwiki code is same as language code and there can't be more than one language per site group.
Cheers, Katie
IIRC this constrains was already there in the old system. Is that wrong?
Cheers
-- Jeroen De Dauw http://www.bn2vs.com Don't panic. Don't be evil. ~=[,,_,,]:3 --
Wikidata-tech mailing list Wikidata-tech@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikidata-tech
Hey,
To distinguish, you do [[w:en]] for English Wikipedia and [[voy:en]] for
English Wikivoyage.
Interesting. Where do these "w" and "voy" come from?
In Wikimedia's config, the interwiki code is same as language code and
there can't be more than one language per site group.
Can you link to this config?
Cheers
-- Jeroen De Dauw http://www.bn2vs.com Don't panic. Don't be evil. ~=[,,_,,]:3 --
On Tue, Jul 23, 2013 at 6:17 PM, Jeroen De Dauw jeroendedauw@gmail.comwrote:
Hey,
To distinguish, you do [[w:en]] for English Wikipedia and [[voy:en]] for
English Wikivoyage.
Interesting. Where do these "w" and "voy" come from?
These are defined in one of the most wikimedia-specific scripts that exist :)
https://github.com/wikimedia/mediawiki-extensions-WikimediaMaintenance/blob/...
You can see that "voy" takes you to English Wikivoyage, and then if specified, the local interwiki id is used to redirect again to the specified "lang" / subdomain.
http://en.wikipedia.org/w/api.php?action=query&meta=siteinfo&siprop=...
And you can see that not *all* of the sites are in the interwiki map for enwiki. It only has *all* Wikipedias + the external iwprefix for sister projects and other external sites.
Cheers, Katie
In Wikimedia's config, the interwiki code is same as language code and
there can't be more than one language per site group.
Can you link to this config?
Cheers
-- Jeroen De Dauw http://www.bn2vs.com Don't panic. Don't be evil. ~=[,,_,,]:3 --
Wikidata-tech mailing list Wikidata-tech@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikidata-tech
wikidata-tech@lists.wikimedia.org