$wgEnableEmail, $wgEmailConfirmToEdit, $wgEnableUserEmail, $wgEmailAuthentication,
$wgEnotifWatchlist, $wgEnotifUserTalk, $wgEnotifRevealEditorAddress;
+ // retrieving user name for GENDER and misc.
+ $userName = $user->getName();
+
## User info #####################################
// Information panel
$defaultPreferences['username'] = array(
'type' => 'info',
- 'label-message' => 'username',
- 'default' => $user->getName(),
+ 'label-message' => array( 'username', $userName ),
+ 'default' => $userName,
'section' => 'personal/info',
);
$defaultPreferences['userid'] = array(
'type' => 'info',
- 'label-message' => 'uid',
+ 'label-message' => array( 'uid', $userName ),
'default' => $user->getId(),
'section' => 'personal/info',
);
$groupName = User::getGroupName( $ueg );
$userGroups[] = User::makeGroupLinkHTML( $ueg, $groupName );
- $memberName = User::getGroupMember( $ueg, $user->getName() );
+ $memberName = User::getGroupMember( $ueg, $userName );
$userMembers[] = User::makeGroupLinkHTML( $ueg, $memberName );
}
asort( $userGroups );
$defaultPreferences['usergroups'] = array(
'type' => 'info',
'label' => $context->msg( 'prefs-memberingroups' )->numParams(
- count( $userGroups ) )->parse(),
+ count( $userGroups ) )->params( $userName )->parse(),
'default' => $context->msg( 'prefs-memberingroups-type',
$lang->commaList( $userGroups ),
$lang->commaList( $userMembers )
# be nice to somehow merge this back in there to avoid redundancy.
if ( $wgAllowUserCss || $wgAllowUserJs ) {
$linkTools = array();
+ $userName = $user->getName();
if ( $wgAllowUserCss ) {
- $cssPage = Title::makeTitleSafe( NS_USER, $user->getName() . '/common.css' );
+ $cssPage = Title::makeTitleSafe( NS_USER, $userName . '/common.css' );
$linkTools[] = Linker::link( $cssPage, $context->msg( 'prefs-custom-css' )->escaped() );
}
if ( $wgAllowUserJs ) {
- $jsPage = Title::makeTitleSafe( NS_USER, $user->getName() . '/common.js' );
+ $jsPage = Title::makeTitleSafe( NS_USER, $userName . '/common.js' );
$linkTools[] = Linker::link( $jsPage, $context->msg( 'prefs-custom-js' )->escaped() );
}
'section' => 'searchoptions/advancedsearchoptions',
);
- $nsOptions = array();
-
- foreach ( $wgContLang->getNamespaces() as $ns => $name ) {
- if ( $ns < 0 ) {
- continue;
- }
-
- $displayNs = str_replace( '_', ' ', $name );
-
- if ( !$displayNs ) {
- $displayNs = $context->msg( 'blanknamespace' )->text();
- }
-
- $displayNs = htmlspecialchars( $displayNs );
- $nsOptions[$displayNs] = $ns;
+ $nsOptions = $wgContLang->getFormattedNamespaces();
+ $nsOptions[0] = $context->msg( 'blanknamespace' )->text();
+ foreach ( $nsOptions as $ns => $name ) {
+ if ( $ns < 0 )
+ unset( $nsOptions[$ns] );
}
$defaultPreferences['searchnamespaces'] = array(
'type' => 'multiselect',
'label-message' => 'defaultns',
- 'options' => $nsOptions,
+ 'options' => array_flip( $nsOptions ),
'section' => 'searchoptions/advancedsearchoptions',
'prefix' => 'searchNs',
);
'prefs-emailconfirm-label' => 'E-mail confirmation:',
'prefs-textboxsize' => 'Size of editing window',
'youremail' => 'E-mail:',
-'username' => 'Username:',
-'uid' => 'User ID:',
-'prefs-memberingroups' => 'Member of {{PLURAL:$1|group|groups}}:',
+'username' => '{{GENDER:$1|Username}}:',
+'uid' => '{{GENDER:$1|User}} ID:',
+'prefs-memberingroups' => '{{GENDER:$2|Member}} of {{PLURAL:$1|group|groups}}:',
'prefs-memberingroups-type' => '$1', # only translate this message to other languages if you have to change it
'prefs-registration' => 'Registration time:',
'prefs-registration-date-time' => '$1', # only translate this message to other languages if you have to change it
'youremail' => 'Label of the e-mail text box of the "E-mail options" section of "Special:Preferences".
{{Identical|E-mail}}',
-'username' => '{{Identical|Username}}',
-'uid' => '{{Identical|User ID}}',
-'prefs-memberingroups' => 'This message is shown on [[Special:Preferences]], first tab. See also {{msg-mw|prefs-memberingroups-type}}.',
+'username' => 'Username field in [[Special:Preferences]]. $1 is the current user name for GENDER distinction (depends on sex setting).
+
+{{Identical|Username}}',
+'uid' => 'User ID field in [[Special:Preferences]]. $1 is the current user name for GENDER distinction (depends on sex setting).
+
+{{Identical|User ID}}',
+'prefs-memberingroups' => 'This message is shown on [[Special:Preferences]], first tab. See also {{msg-mw|prefs-memberingroups-type}}. $2 is the user name for GENDER.',
'prefs-memberingroups-type' => '{{optional}}
Parameters:
* $1 is list of group names