Patches item #1992057, was opened at 2008-06-12 16:26 Message generated for change (Comment added) made by nicdumz You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=603140&aid=1992057...
Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None
Status: Closed Resolution: Accepted Priority: 6
Private: No Submitted By: Stig Meireles Johansen (stigmj) Assigned to: Nobody/Anonymous (nobody) Summary: Add support for cross-namespace interwiki
Initial Comment: This patch will add support for a mapping of allowed interwikis between namespaces. I have done a quick mapping, but it may very well need some more tuning. The diff is done against r5562.
----------------------------------------------------------------------
Comment By: NicDumZ Nicolas Dumazet (nicdumz)
Date: 2008-06-23 10:31
Message: Logged In: YES user_id=1963242 Originator: NO
Thanks for your lengthy answer, it helps :)
Reviewed and applied it in r5614, with some documentation, and minor rewrites in interwiki.py.
Thanks for the original patch :)
----------------------------------------------------------------------
Comment By: Stig Meireles Johansen (stigmj) Date: 2008-06-17 23:39
Message: Logged In: YES user_id=2116333 Originator: YES
Well, generally there should not be interwiki-links between namespaces, but as a rule goes, there are exceptions. The spanish wikipedia uses namespace 104 for lists and other addendum which lives in regular namespace 0 on the other wikipedias. The portuguese has chosen to use namespace 102 for the same use. These namespaces on the selected wikipedias should be allowed to have interwikis without questions asked.
My patch makes a cross-namespace dictionary/list which allows for mapping which namespaces on which languages can link other namespace/language-combinations.
What is does is as follows: * originPage has namespace 0 and language-code en. * linkedPage has namespace 104 and language-code es. 1) Lookup in the crossnamespace-dictionary (using the namespace of the originPage as the index) for the language-code of the originPage. 2) If this does not exist, Lookup in the crossnamespace-dictionary (using the namespace of the originPage as the index) for the default-code 3) If this does not exist, there is no mapping defined for this namespace/language-code pair, and we skip further checking 4) If it *does* exist, we now have a link to a new dictionary, and we make a lookup for the language-code of the linkedPage. 5) If this does not exist, make a lookup for the default-code. 6) If any of the lookups in 4) and 5) gives a value, we have a list of allowed namespaces in the linkedPage-language we can link to the originPage. 7) Check if there are any occurences of the namespace of the linkedPage in the list we obtained in 6). 8) If there is a match, we have a valid interwiki between namespaces, and don't need to do any more processing in the namespaceMismatch-function.
I see there are several entries for this functionality in the bug-system as well: https://sourceforge.net/tracker/index.php?func=detail&aid=1970896&gr... https://sourceforge.net/tracker/index.php?func=detail&aid=1892742&gr...
Here are some good edits (with the patch): http://en.wikipedia.org/w/index.php?title=Sailing_at_the_2000_Summer_Olympic... http://en.wikipedia.org/w/index.php?title=Elvis_Presley_discography&diff... While this was a bad edit (without the patch): http://en.wikipedia.org/w/index.php?title=Sailing_at_the_2000_Summer_Olympic...
----------------------------------------------------------------------
Comment By: NicDumZ Nicolas Dumazet (nicdumz) Date: 2008-06-15 17:09
Message: Logged In: YES user_id=1963242 Originator: NO
Well, thanks for the patch.
Could you provide us some more info on this "cross-namespace interwiki" ? I've looked at your patch, and honestly I'm not sure of what it is supposed to do ?! (I'm not saying that this is a bad patch, I'm saying that I don't see what mediawiki feature it supports)
Can I get an example of the intended behavior, please ? :)
----------------------------------------------------------------------
Comment By: Stig Meireles Johansen (stigmj) Date: 2008-06-12 19:16
Message: Logged In: YES user_id=2116333 Originator: YES
File Added: pywikipedia-5562-crossnamespace-diff.patch
----------------------------------------------------------------------
Comment By: Stig Meireles Johansen (stigmj) Date: 2008-06-12 17:52
Message: Logged In: YES user_id=2116333 Originator: YES
File Added: pywikipedia-5562-crossnamespace-diff.patch
----------------------------------------------------------------------
You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=603140&aid=1992057...
pywikipedia-l@lists.wikimedia.org