[Mediawiki-l] Renaming namespaces

Rowan Collins rowan.collins at gmail.com
Thu Jun 9 16:44:52 UTC 2005


On 08/06/05, Alias <viool at webmail.co.za> wrote:
> What would be the consequences of dropping in a new
> translation of languageAF.php that would involve renaming the
> namespaces?

At present, there is no system for having more than 2 names for each
namespace (the localized one, and a "canonical" English one) other
than adding an ugly hack in the language file. So, while everything on
the wiki would instantly show up with the new names, all existing
links with the old names spelled out in them would instantly break.

e.g. if "Talk:" is currently translated "Foo:" and you change it to "Bar:"
* a page called "Foo:Something" will now be called "Bar:Something"
* links entered in other pages as "[[Foo:Something]]" will now point
to a non-existent page, in the article namespace, called
"Foo:Something"

If there's only a few such links, a bot could probably help fix them;
if there are likely to be lots, you could add a hack in the
LanguageAf.php, similar to the one for "Wikipedia:" in LanguageFr.php
(see function getNsIndex()). But probably best in this case to keep
two copies - one for use in existing Wikimedia projects, and one
(without the hack) for distribution to other servers in the CVS.

In a future version, it looks like there may be a proper way of having
aliases for namespaces (see
http://mail.wikimedia.org/pipermail/wikitech-l/2005-May/029909.html),
but this may take some time to arrive.

-- 
Rowan Collins BSc
[IMSoP]



More information about the MediaWiki-l mailing list