Page MenuHomePhabricator

$namespaceGenderAliases not compatible with $wgExtraNamespaces
Closed, ResolvedPublic

Description

Author: danny.leinad

Description:
When $namespaceGenderAliases is set in MessagesXX.php (where XX is a language code), the configuration $wgExtraNamespaces[NS_USER] = "Foo"; in LocalSettings.php not works.

In my opinion $wgExtraNamespaces should overrides $namespaceGenderAliases

or

as in my humble suggestion (read https://bugzilla.wikimedia.org/show_bug.cgi?id=17160#c19 and https://bugzilla.wikimedia.org/show_bug.cgi?id=17160#c20) there should be possibility to set in LocalSettings.php namespace in proper gender form:
$wgExtraNamespaces[NS_USER] = array (male => "male form", female => "female form");


Version: 1.18.x
Severity: normal

Details

Reference
bz27398

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 11:16 PM
bzimport set Reference to bz27398.

Bryan.TongMinh wrote:

$wgExtraNamespaces is for configuring extra namespaces, not to reconfigure existing namespaces. Are you sure you don't want $wgNamespaceAliases?

danny.leinad wrote:

(In reply to comment #1)

$wgExtraNamespaces is for configuring extra namespaces, not to reconfigure
existing namespaces. Are you sure you don't want $wgNamespaceAliases?

$wgExtraNamespaces allows configuring extra namespaces *and also* reconfigure existing namespaces, for example please look at http://noc.wikimedia.org/conf/highlight.php?file=InitialiseSettings.php - in default MediaWiki installation user namespace is "Użytkownik" (User) and using $wgExtraNamespaces we can reconfigure user namespace to "Wikipedysta" (Wikipedian).

Bryan.TongMinh wrote:

Hmm ok. Assigning to Niklas then.

danny.leinad wrote:

And one more issue connected with this bug...

To reproduce:

  1. set $namespaceGenderAliases in MessagesXX.php
  2. set $wgExtraNamespaces[NS_USER] = "Foo"; in LocalSettings.php
  3. for example open [[Special:AllPages]] and try choose user namespace in "Namespace:" - there will be "Foo".

A new global perhaps? Aay $wgExtraNamespaceGenderAliases, although I'd rather avoid adding new globals if possible.

danny.leinad wrote:

If it is not possible to integrate functionality in single global - $wgExtraNamespaces, an extra global would be the best solution.

If it is a string, it overrides all genders, else it can be an array, with $namespaceGenderAliases format.

How would you then deal with the situation where you have "user" and "wikipedian", e.g. having to have gendered aliases each? Only one of them could be automatically genderized. I believe that suffices. Anyone else?

I don't follow you, Purodha. Where do you have user and wikipedian? Where are you configuring that?

We have Medmaacher (with spelling variant Metmaacher) for masculine, neuter, and unknown, and Medmaachėrn (with spelling variant Metmaacherin) for female1 and female2. Literally, these words translate to "corroborator", "participant".

I was speaking generally. If you have 2 base words, only one can be currently used as the standard word. While it does not have to be the same word all the times, in one place/situaton only one can be generated.

Btw. We did not and do have varying namespacenames per gender set.
This morning, I wanted to quickly figure what exactly to do for it.
While the current system of male/female is indeed easily set up,
I detected that we need to have 20 choices to cover all cases occurring in our grammar when talking _about_ users (including "unknown" cases but not counting T/F forms, or polite forms, or forms addressing people) These 20 choices can be experessed with two variables having 5 and 4 possible values, respectively, one being the "grammatical gender" (declension properties) of the name or nickname, the other being the "natural gender" of a user. One can use "<user-or-bot-name> altered <his/her/its> userpage." as a key sentence which has all 20 variantes.

danny.leinad wrote:

I still don't understand Purodha - how is it connected with this bug?

MediaWiki allows to set default $namespaceGenderAliases and the purpose of this bug is to resolve collisions with $wgExtraNamespaces (in case when we want reconfigure name of default namespace).

danny.leinad wrote:

Hello,

Is there any progress with this bug?

Currently namespace GENDER support is very partial and couldn't be deployed to Wikimedia projects (this bug has been tagged "Version: 1.18").

Why couldn't it be deployed? This variable is only needed for specifying wiki specific gendered namespaces, which I think only few Wikimedia wikis will do. The general "user" translations will come through normal means in i18n files.

danny.leinad wrote:

On http://svn.wikimedia.org/viewvc/mediawiki/trunk/phase3/languages/messages/MessagesPl.php?view=markup there is:

$namespaceGenderAliases = array(

	        NS_USER => array( 'male' => 'Użytkownik', 'female' => 'Użytkowniczka' ),
	        NS_USER_TALK => array( 'male' => 'Dyskusja_użytkownika', 'female' => 'Dyskusja_użytkowniczki' ),

);

and on http://noc.wikimedia.org/conf/highlight.php?file=InitialiseSettings.php there is:

'wgExtraNamespaces' => array(

'plwiki' => array( 
    NS_USER => 'Wikipedysta',
    # Lower case w in wikipedysty as per bug #10064
    NS_USER_TALK => 'Dyskusja_wikipedysty',

),

if you deploy current svn verion, it will reset current configured for Polish Wikipedia user namespace (details at the top of this bug).

danny.leinad wrote:

In other words:

Default MediaWiki user namespace is:

$namespaceGenderAliases = array(

NS_USER => array( 'male' => 'Użytkownik', 'female' =>

'Użytkowniczka' ),

NS_USER_TALK => array( 'male' => 'Dyskusja_użytkownika', 'female'

> 'Dyskusja_użytkowniczki' ),

);

but Polish Wikipedia should have:

NS_USER => array( 'male' => 'Wikipedysta', 'female' =>
'Wikipedystka' ),
NS_USER_TALK => array( 'male' => 'Dyskusja_wikipedysty', 'female'

> 'Dyskusja_wikipedystki' ),

danny.leinad wrote:

Hi,

Is there any chance to fix this bug before announced deployment of MW 1.18 (http://www.mediawiki.org/wiki/MediaWiki_1.18)? Otherwise gender namespace support couldn't be introduced in Wikimedia projects.