* (bug 14454) "Member of group(s)" in Special:Preferences causes language difficulties
authorNiklas Laxström <nikerabbit@users.mediawiki.org>
Tue, 28 Jul 2009 15:10:42 +0000 (15:10 +0000)
committerNiklas Laxström <nikerabbit@users.mediawiki.org>
Tue, 28 Jul 2009 15:10:42 +0000 (15:10 +0000)
RELEASE-NOTES
includes/Preferences.php
languages/messages/MessagesEn.php
languages/messages/MessagesQqq.php
maintenance/language/messages.inc

index 39bf383..efd6753 100644 (file)
@@ -164,6 +164,7 @@ this. Was used when mwEmbed was going to be an extension.
 * (bug 10812) Interwiki links can have names and descriptions, fetched from 
   message 'interwiki-desc-PREFIX', not really used anywhere yet though
 * (bug 9691) Add type (signup or login) parameter to AuthPlugin::ModifyUITemplate()
+* (bug 14454) "Member of group(s)" in Special:Preferences causes language difficulties
 
 === Bug fixes in 1.16 ===
 
index f89990d..f5c2d02 100644 (file)
@@ -110,22 +110,30 @@ class Preferences {
 
                # Get groups to which the user belongs
                $userEffectiveGroups = $user->getEffectiveGroups();
-               $userEffectiveGroupsArray = array();
+               $userGroups = $userMembers = array();
                foreach( $userEffectiveGroups as $ueg ) {
                        if( $ueg == '*' ) {
                                // Skip the default * group, seems useless here
                                continue;
                        }
-                       $userEffectiveGroupsArray[] = User::makeGroupLinkHTML( $ueg );
+                       $groupName  = User::getGroupName( $ueg );
+                       $userGroups[] = User::makeGroupLinkHTML( $ueg, $groupName );
+
+                       $memberName = User::getGroupMember( $ueg );
+                       $userMembers[] = User::makeGroupLinkHTML( $ueg, $memberName );
                }
-               asort( $userEffectiveGroupsArray );
+               asort( $userGroups );
+               asort( $userMembers );
 
                $defaultPreferences['usergroups'] =
                                array(
                                        'type' => 'info',
                                        'label' => wfMsgExt( 'prefs-memberingroups', 'parseinline',
-                                                               count( $userEffectiveGroupsArray ) ),
-                                       'default' => $wgLang->commaList( $userEffectiveGroupsArray ),
+                                               $wgLang->formatNum( count($userGroups) ) ),
+                                       'default' => wfMsgExt( 'prefs-memberingroups-type', array(),
+                                               $wgLang->commaList( $userGroups ),
+                                               $wgLang->commaList( $userMembers )
+                                       ),
                                        'raw' => true,
                                        'section' => 'personal/info',
                                );
index 8c41129..a51ab67 100644 (file)
@@ -1758,6 +1758,7 @@ This cannot be undone.',
 'username'                      => 'Username:',
 'uid'                           => 'User ID:',
 'prefs-memberingroups'          => 'Member of {{PLURAL:$1|group|groups}}:',
+'prefs-memberingroups-type'     => '$1',
 'prefs-registration'            => 'Registration time:',
 'prefs-registration-date-time'  => '$1', # only translate this message to other languages if you have to change it
 'yourrealname'                  => 'Real name:',
@@ -4124,7 +4125,7 @@ Enter the filename without the "{{ns:file}}:" prefix.',
 'htmlform-int-toolow'          => 'The value you specified is below the minimum of $1',
 'htmlform-int-toohigh'         => 'The value you specified is above the maximum of $1',
 'htmlform-submit'              => 'Submit',
-'htmlform-reset'               => 'Undo changes',
-'htmlform-selectorother-other' => 'Other',
+'htmlform-reseta'               => 'Undo changes',
+'htmlform-selectorother-other' => 'Othera',
 
 );
index 1865369..8943ba6 100644 (file)
@@ -1104,7 +1104,8 @@ Shown as legend of the second fieldset of the tab 'Search' in [[Special:Preferen
 {{Identical|E-mail}}',
 'username'                      => '{{Identical|Username}}',
 'uid'                           => '{{Identical|User ID}}',
-'prefs-memberingroups'          => 'This message is shown on [[Special:Preferences]], first tab, where it is follwed by a colon.',
+'prefs-memberingroups'          => 'This message is shown on [[Special:Preferences]], first tab, where it is follwed by a colon. See also prefs-memberingroups-type.',
+'prefs-memberingroups-type'     => '$1 is list of group names, $2 is list of group member names. Label for these is prefs-memberingroups.',
 'prefs-registration'            => 'Used in [[Special:Preferences]].',
 'prefs-registration-date-time'  => '{{optional}}
 Used in [[Special:Preferences]]. Parameters are:
index f8d32df..99c8541 100644 (file)
@@ -954,6 +954,7 @@ $wgMessageStructure = array(
                'username',
                'uid',
                'prefs-memberingroups',
+               'prefs-memberingroups-type',
                'prefs-registration',
                'prefs-registration-date-time',
                'yourrealname',