On Wed, Feb 22, 2012 at 12:28 AM, Thomas Gries <mail(a)tgries.de> wrote:
Basically:
a link on a page like [[Benutzer:Alice]] is not necessarily the same as
[[User:Alice]] (even when the latter exists).
It depends on the current setting of
$wgLanguageCode = "en" ;
$wgLanguageCode = "de" ;
(during testing my extension I played with this setting)
whether [[Benutzer:Alice]] it is in the Namespace or not.
So I was trapped by thinking that _any_ localised Namespace (like
"Benutzer") is necessarily the same as USER or USER_TALK,
which was incorrect.
Question:
=======
Has anyone an idea, how to detect language-independently whether a link
on page is in Namespace USER or USER_TALK, or in a localised version of
these (when $wgLanguageCode has been modified)?
The goal is to detect and to mark USER or USER_TALK page links
language-independently in
function wfWikiArticleFeedsAddSignatureMarker in E:WikiArticleFeeds line
262 .
This sounds like it should be a non-issue. If the wiki language is set
to English, then [[Benutzer:Alice]] simply is not a user page, it's in
the main namespace. If the language is set to German,
[[Benutzerin:Alice]] will be a user page, and [[Benutzer:Alice]] and
[[User:Alice]] will be aliases pointing to that page.
Trying to detect German namespace prefixes while the wiki language is
in English simply is not going to work, and *should not* work. If you
have been changing the lanugage code settings around a lot, then maybe
something got stuck in parser cache and that made it look like the
detection failed?
Roan