Last modified: 2006-02-20 01:37:11 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T6282, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 4282 - Remove "Backwards compatibility hacks" from all LanguageXx.php files
Remove "Backwards compatibility hacks" from all LanguageXx.php files
Product: Wikimedia
Classification: Unclassified
Language setup (Other open bugs)
All All
: Normal normal with 1 vote (vote)
: ---
Assigned To: Nobody - You can work on this!
Depends on: 4130
  Show dependency treegraph
Reported: 2005-12-15 04:24 UTC by lɛʁi לערי ריינהארט
Modified: 2006-02-20 01:37 UTC (History)
1 user (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Description lɛʁi לערי ריינהארט 2005-12-15 04:24:54 UTC

Please compare [[wiktionary:nl:user:Gangleri]] and [[wiktionary:la:user:Gangleri]].
You will see that "wikipedia" is not a valid interwiki at
[[wiktionary:la:Pagina_prima]] = wiktionary:la: .

Tray [[wiktionary:la:Victionarium:Taberna]], [[wiktionary:la:project:Taberna]]
and [[wiktionary:la:Wikipedia:Taberna]] and you will see that the "Backward
compatibility hack" is still active because off

function getNsIndex( $text )
  global $wgNamespaceNamesLa;
  global $wgMetaNamespace;

  foreach ( $wgNamespaceNamesLa as $i => $n ) {
   if ( 0 == strcasecmp( $n, $text ) ) { return $i; }

  # Backwards compatibility hacks
  if( $wgMetaNamespace == 'Vicipaedia' || $wgMetaNamespace == 'Victionarium' ) {
   if( 0 == strcasecmp( 'Wikipedia', $text ) ) return NS_PROJECT;
   if( 0 == strcasecmp( 'Disputatio_Wikipedia', $text ) ) return NS_PROJECT_TALK;

The problem is at
  if( $wgMetaNamespace == 'Vicipaedia' || $wgMetaNamespace == 'Victionarium' ) {
which is *always* the case in MediaWiki foundation projects.

Please compare with
  if( $wgSitename == 'Wikipédia' ) {
   if( 0 == strcasecmp( 'Wikipedia', $text ) ) return 4;
   if( 0 == strcasecmp( 'Discussion_Wikipedia', $text ) ) return 5;

There the condition depends on $wgSitename:
  if( $wgSitename == 'Wikipédia' )

Please allow "Backwards compatibility hacks" to be dependend in LanguageXx.php
files only from $wgSitename and not from $wgMetaNamespace.

Please identify *all* afected LanguageXx.php files. I remember that I have
reported a similar bug for [[eo:]] (maybe also for [[la:]]) which was fixed by
Hashar. See

Thanks for your efforts in advance!

best regards reinhardt [[user:gangleri]]
Comment 1 Brion Vibber 2005-12-15 21:36:03 UTC
This doesn't make any sense.
Comment 2 lɛʁi לערי ריינהארט 2005-12-16 00:11:54 UTC
Sorry! This is a "todo issue" for people with have access to change the
The bug should have product WikiMedia web sites and component Language setup.

It should not be that difficult to search the files for
if( $wgMetaNamespace ==
in order to identify all affected languages.
Comment 3 Ævar Arnfjörð Bjarmason 2005-12-16 00:22:36 UTC
The problem is that your report does not make any sense at all, we have no idea
what you want, where the problem is and how to fix it.
Comment 4 lɛʁi לערי ריינהארט 2005-12-16 00:37:20 UTC
OK Ævar! Keep it KISS.
This summer we (Tim and me) installed some test wiki's at WikiPage.

At that time I have seen that I was not able to configure an interwiki prefix
[[wikipedia:]]. We verified the code at LanguageEo.php. Some weeks later we
installed a wiki in Latin. There was the same story. Inserting [[wikipedia:]] in
the interwiki table did not help to generate links. LanguageEo.php was fixed in
the mean time.

I verified LanguageLa.php this night at 04:24. This bug is not just a bug about
LanguageLa.php. This is *one* item. I made a general subject because it makes
sense to solve "similar" patterns together.
Comment 5 Rob Church 2005-12-16 07:29:14 UTC
You've still not said what it is we need to fix about those language files.
Chances are, anyone reading this bug report now is confused as hell.
Comment 6 lɛʁi לערי ריינהארט 2005-12-17 06:43:26 UTC
(In reply to comment #5)
> You've still not said what it is we need to fix about those language files.
> Chances are, anyone reading this bug report now is confused as hell.

Rob! We talked at IRC. I think you agreed that [[wiktionary:la:Wikipedia:Foo]]
should not be equivalent to [[wiktionary:la:project:Foo]] ==
[[wiktionary:la:Victionarium:Foo]] but to [[en:Foo]].
You told me that I can use interwiki's as "w:<language code>:user:Gangleri" at
[[wiktionary:la:user:Gangleri]]. I know that. This is a "workaround". You agreed
that the interwiki prefix "wikipedia:" can *not* be used at WIKT:LA:.

Tody I verified the other sister projects of WP:LA: at [[Special:SiteMatrix]].
These three direct all to [[en:Foo]].

Task 1: Just change

Task 2: Verify if this change allows you to use the interwiki prefix al WIKT:LA:


There are two more issues:

a) Please verify if other files from
contains similar "Backwards compatibility hacks".

Because MediaWiki claims to be used also for installations outside the WikiMedia
foundation my opinion is that no compatibility hack should be included in *any*
LanguageXx.php file.

This would lead to wrong installations. See:
which is equivalen to
because it was created with an old version of LanguageEo.pho (as available
around January 2005)
    Revision as of 08:47, 14 Jan 2005;

I do not have the time to verfy all the files from
Maybe it is also not my task.

b) because there is a difference in behaviour / seeting between WIKT:LA: and
WIKISOURCE:LA: you / somebody with access to all LocalSettings.php files should
- if hacks are present in LocalSettings.php
- if yes, if they make sense / are still required; notify /ask the community if
you are not certain

c) please note that [[special:SiteMatrix]] contains more languages then
as [[co:]] etc. etc.

Again only the people having access to all the LocalSettings.php files can
verify if hacks are present there or not.

When opening a bug I was not aware of the last implications. However I did
expect that some feedback would be posted by people involved in "Backwards
compatibility hacks" during the past. See

best regards reinhardt [[user:gangleri]]
Comment 8 lɛʁi לערי ריינהארט 2005-12-28 08:41:28 UTC
(In reply to comment #3)
> The problem is that your report does not make any sense at all, we have no idea
> what you want, where the problem is and how to fix it.

(In reply to comment #5)
> You've still not said what it is we need to fix about those language files.
> Chances are, anyone reading this bug report now is confused as hell.

REOPENed the bug because now there are more todo's all with the *same* pattern.
Sorry Ævar, Brion and Rob if I can not find the right words from the beginning
when I can not forsee all the implications.

changed summary to:
Remove "Backwards compatibility hacks" from all LanguageXx.php files

I assume that "Backwards compatibility hacks" at the WikiMedia foundations wiki
should be included only in LocalSettings.php files.

*more to do's*
a2) [[wikibooks:hu:User:Gangleri]]
b2) [[wikibooks:ia:Usator:Gangleri]]
c2) probably *no action* as [[wikibooks:la:wikipedia:foo]] directs to [[foo]]
c3) probably *no action* as [[wikisource:la:wikipedia:foo]] directs to [[foo]]
d2) [[wikibooks:ms:Pengguna:Gangleri]]
e2) [[wikibooks:sl:Uporabnik:Gangleri]]
f2) [[wikibooks:tt:Äğzä:Gangleri]]

best regards reinhardt [[user:gangleri]]
Comment 10 lɛʁi לערי ריינהארט 2006-01-07 03:48:41 UTC
h1) [[wiktionary:fo:Brúkari:Gangleri]]

This seems to be the last.
Comment 11 lɛʁi לערי ריינהארט 2006-01-09 11:57:42 UTC
adding "depends on"
Bug 4130: Change some inactive wikibooks Project namespaces to "Wikibooks"

Thanks Zigger!

Bug 4130 shows that not all languages / projects listed above are using
"backwards compatibility hacks". If bug 4130 is fixed the list should be
reworked. Bug 4130 does not cover "Wiktionaries". It seems that there (in some
of the projects) is the same problem.

best regards reinhardt [[user:gangleri]]

The problem at
Bug 4413: LanguageFa.php hardcodes Wikipedia project namespace
Bug 4526: oc.wikipedia doesn't have proper sitename/metanamespace
was not caused by "backwards compatibility hacks"; it was caused by hardcoded
*project* namespaces
Comment 12 lɛʁi לערי ריינהארט 2006-01-09 22:43:44 UTC

The following templates show that the language projects are using the same
namespace for project as WP:XX:.

This might be an indication that the project namespace is hardcoded at: (Wikipedia) (Vicipéid) (Wikipedia) (Wikipedia) (Wikipedija) (Wikipedija) (Wikipedija) (Wikipedia)

best regards reinhardt [[user:gangleri]]
Comment 13 lɛʁi לערי ריינהארט 2006-01-09 23:50:32 UTC
All issues a) to h1) work fine except
the link generated at *Mediazilla* for g2) [[wikinews:sr:Корисник:Gangleri]].

This links works fine at
[[commons:User:Gangleri/tests#wikinews:sr:Корисник:Gangleri]] .

Soem issues from comment 12 are still open.
Comment 14 lɛʁi לערי ריינהארט 2006-01-10 12:39:18 UTC
(In reply to comment #12)
> (Wikipedija)
> (Wikipedija)
> (Wikipedija)

still have {{ns:project}} == (Wikipedija). All others are fixed.
Comment 15 lɛʁi לערי ריינהארט 2006-01-14 20:10:53 UTC
(In reply to comment #4)
> ... LanguageEo.php was fixed in
> the mean time.

This was
Bug 2513: LanguageEo.php uses "Wikipedia" as equivalent to {{ns:6}}
Comment 16 lɛʁi לערי ריינהארט 2006-02-20 01:37:11 UTC
Marking as WORKSFORME because all mentioned projects are fixed one way or the other:
a) backward compatibility links are included in if statements checking for
Wikimedia Foundation projects
b) (all known) hardcoding of project namespaces was removed

Thanks to all for cleaning this.

best regards reinhardt [[user:gangleri]]

Note You need to log in before you can comment on or make changes to this bug.