Page MenuHomePhabricator

Gender specific display text for tabs
Closed, ResolvedPublic

Description

Author: danny.leinad

Description:
Now namespaces have gender support (bug17160), but tab of NS_USER needs the same support.

On [[MediaWiki:Nstab-user]] is possible to set {{GENDER:{{BASEPAGENAME}}|male form|female form}}, but I'm not sure is it ok for servers performance.

Maybe better idea is to create [[MediaWiki:Nstab-user-male]] and [[MediaWiki:Nstab-user-female]] and use these messages when $namespaceGenderAliases is enabled.


Version: 1.18.x
Severity: enhancement

Details

Reference
bz27387

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 11:16 PM
bzimport set Reference to bz27387.
bzimport added a subscriber: Unknown Object (MLST).

(In reply to comment #0)

Maybe better idea is to create [[MediaWiki:Nstab-user-male]] and
[[MediaWiki:Nstab-user-female]] and use these messages when
$namespaceGenderAliases is enabled.

This particular idea is not a good suggestion, because it assumes that
male/female will be the only two forms GENDER will (ever) use. However, there
has been speculation that formal/informal could also be introduced using this
magic word, and there is an open issue requesting a transgender form. Limiting
options isn't a good idea. Using GENDER, and adding support for it where
needed, is what needs to be done, regardless of how many GENDERs we will have
defined now or in the future.

danny.leinad wrote:

(In reply to comment #1)

This particular idea is not a good suggestion, because it assumes that

Hmmm, maybe you are right, but are you sure this is good solution for servers? - in similar situation Domas reverted changes (http://en.wikipedia.org/w/index.php?title=MediaWiki:Nstab-main&diff=217955007&oldid=215091279) :-) and last time there was created dedicated message (Bug14267).

PS. If {{GENDER:{{BASEPAGENAME}}|male form|female form}} is the best solution, could you add variable $1 for [[MediaWiki:Nstab-user-male]] as in standard message with GENDER support: {{GENDER:$1|male form|female form}}.

(In reply to comment #2)

Hmmm, maybe you are right, but are you sure this is good solution for servers?

  • in similar situation Domas reverted changes

(http://en.wikipedia.org/w/index.php?title=MediaWiki:Nstab-main&diff=217955007&oldid=215091279)
:-) and last time there was created dedicated message (Bug14267).

The major difference between that and this is the number of readers in NS_MAIN vs NS_USER.

Maybe better idea is to create [[MediaWiki:Nstab-user-male]] and
[[MediaWiki:Nstab-user-female]] and use these messages when
$namespaceGenderAliases is enabled.

This particular idea is not a good suggestion, because it assumes that
male/female will be the only two forms GENDER will (ever) use.

There's nothing fixed in that naming.

$gender = $user->getGender();
if ($gender === '') {

$msg = 'nstab-user';

} else {

$msg = 'nstab-user-' . $gender;

if $msg doesn't exists, fall back to 'nstab-user'

}

print wfMsg($msg) in the tab

Added message documentation in twn. That should be enough.