Search code examples
luamediawikiscribunto

How to add alias for extension namespace in wikimedia?


I am trying to create my custom copy of italian wikipedia from the dump.

I encounter the problem with some of extensions.

I have got the error:

Lua error in package.lua at line 80: module 'Modulo:String' not found.

The problem is that there is no 'Modulo:String' in my copy, but there is 'Module:String'.

I have tried to add alias for this namespace in my LocalSettings.php, as I did for categories, but for modules it didn't help.

$wgNamespaceAliases['Categoria'] = NS_CATEGORY; //this helped for categories
$wgNamespaceAliases['Modulo'] = NS_MODULE; //this does not work

Module namespace is part of Scribunto default namespace.

https://www.mediawiki.org/wiki/Extension_default_namespaces

How to solve the Lua error with loading modules?


Solution

  • The actual set of namespace aliases for Italian Wikipedia is (1); Categoria and Modulo are translations. To use them, just set $wgLanguageCode to it.

    (I'm not sure why setting Modulo as an alias does not work; in theory it should. But it's not the easy way to set up a mirror.)