Last modified: 2013-02-08 21:42:16 UTC
Currently Parsoid does not recognize interwiki / language links and just treats them as regular wiki links. The most important part of this for the December release is the recognition of language links, which are normally rendered as 'Languages' in the sidebar. To this end, the prefix of a wiki link processed in the LinkHandler (js/lib/ext.core.LinkHandler.js) needs to be matched against a regexp of interwiki prefixes. We already have such a regexp available in the environment as env.interwikiRegexp, which should be reachable as this.manager.env.interwikiRegexp inside the link handler. For recognized interwiki links ([[de:Foo]] for example), no link should be rendered and something like <link rel="mw:WikiLink/Language" href="de:Foo"> should be produced instead. This also needs to be round-tripped, which will require a small tweak in the serializer. Please ask in #mediawiki-parsoid when you get to this stage.
https://gerrit.wikimedia.org/r/37517
Now merged, so language links are supported. Interwiki links left to do.
We still need to separate interwiki from language links. Language links are like interwiki prefixes ([[en:Foo]] for example), but are listed in the 'this article in other languages' section on the left. Plain interwiki links on the other hand always render inline, but link to an external resource with the base HTTP URL corresponding to the interwiki prefix.
Interwiki prefixes and languages are returned separately from the API: https://en.wikipedia.org/wiki/Special:ApiSandbox#action=query&meta=siteinfo&format=json&siprop=interwikimap|languages So, steps to implement this would be: * Add support for interwiki prefixes and languages in WikiConfig (lib/mediawiki.WikiConfig.js). * Use it in the link handler to detect interwiki / language links and render them differently, using the RDFa in http://www.mediawiki.org/wiki/Parsoid/RDFa_vocabulary#Language_links and http://www.mediawiki.org/wiki/Parsoid/RDFa_vocabulary#Interwiki_non-language_links. * Add support for these types in the WikitextSerializer and make sure that these links round-trip properly.
Work in progress by Jan Christiansen on language and interwiki links in https://gerrit.wikimedia.org/r/#/c/46027/ and https://gerrit.wikimedia.org/r/#/c/46028/.
https://gerrit.wikimedia.org/r/#/c/46027/ is merged, fixing this bug. Basic editing support is there too, but needs testing and possibly tweaks. Thanks Jan for implementing this!!