Last modified: 2014-07-25 12:28:34 UTC
When importing [[arz:قالب:Country data Cape Verde/doc]] (which is a template documentation page) from English Wikipedia to Egyptian Arabic (arz) Wikipedia, the edit summary of the import process 1 تعديل من en:قالب:Country data Cape Verde/doc: قالب متعاز و لسه محتاج ترجمه contains a link to [[en:قالب:Country data Cape Verde/doc]] which is wrong because it shows the localized name of the template namespace in Arabic (قالب). Instead, the link should be [[en:Template:Country data Cape Verde/doc]].
I just took a look at this: As far as I can tell, the problem here is that the WikiImporter class (in Import.php) uses a Title object to store the title of the original page. However, WikiImporter doesn't know about interwiki prefixes, so it creates a Title with no interwiki prefix. This causes the Title class to assume it is dealing with a local page, so it uses local namespace names when generating a display form of the title. This could partly be solved by always using canonical namespace names in the edit summary. However, that would probably fail in the following scenario: * import "Portal:Foo" to a wiki where "Portal" is set as a namespace alias for the "Portada" namespace * Title object returns a link to "Portada:Foo", which doesn't exist on the source wiki But I am inclined to think it is a better stopgap solution (fixes the vast majority of cases) until someone can be bothered to overhaul WikiImporter!
Change 84197 had a related patch set uploaded by TTO: Make the link in import log entry always use canonical namespace https://gerrit.wikimedia.org/r/84197
*** Bug 62821 has been marked as a duplicate of this bug. ***
Change 149293 had a related patch set uploaded by TTO: Proper namespace handling for WikiImporter https://gerrit.wikimedia.org/r/149293
Change 84197 abandoned by TTO: Make the link in import log entry always use canonical namespace Reason: OK, I decided to do this *for real* this time. See Iaa58e1b9fd https://gerrit.wikimedia.org/r/84197