* (bug 5587) Clean up the languages from references to the Groups special page
authorNiklas Laxström <nikerabbit@users.mediawiki.org>
Thu, 4 May 2006 22:48:47 +0000 (22:48 +0000)
committerNiklas Laxström <nikerabbit@users.mediawiki.org>
Thu, 4 May 2006 22:48:47 +0000 (22:48 +0000)
** Based on patch by Rotem Liss
* Added new group-X and group-X-member messages

RELEASE-NOTES
includes/SpecialListusers.php
includes/User.php
languages/Messages.php

index d5cd4f7..dc9dec6 100644 (file)
@@ -199,6 +199,8 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
 * Special:Randompage now additionally accepts English namespace name as parameter
 * (bug 2981) Really fixed linktrail for Tamil (ta)
 * Disallow substituting Special pages when included into a page
+* (bug 5587) Clean up the languages from references to the Groups special page
+* Added new group-X and group-X-member messages
 
 == Compatibility ==
 
index 411d620..a737969 100644 (file)
@@ -82,9 +82,9 @@ class ListUsersPage extends QueryPage {
                $out = wfElement( 'form', array( 'method' => 'post', 'action' => $self->getLocalUrl() ) );
                
                # Group drop-down list
-               $out .= wfElement( 'label', array( 'for' => 'group' ), wfMsg( 'groups-editgroup-name' ) ) . ' ';
+               $out .= wfElement( 'label', array( 'for' => 'group' ), wfMsg( 'group' ) ) . ' ';
                $out .= wfOpenElement( 'select', array( 'name' => 'group' ) );
-               $out .= wfElement( 'option', array( 'value' => '' ), '(' . wfMsg( 'groupsall' ) . ')' ); # Item for "all groups"
+               $out .= wfElement( 'option', array( 'value' => '' ), wfMsg( 'group-all' ) ); # Item for "all groups"
                $groups = User::getAllGroups();
                foreach( $groups as $group ) {
                        $attribs = array( 'value' => $group );
@@ -185,7 +185,7 @@ class ListUsersPage extends QueryPage {
                                'ListUsersPage::formatResult' );
                        $groups = array();
                        while( $row = $dbr->fetchObject( $result ) ) {
-                               $groups[] = User::getGroupName( $row->ug_group );
+                               $groups[] = User::getGroupMember( $row->ug_group );
                        }
                        $dbr->freeResult( $result );
 
index 3e5afe3..d2f5501 100644 (file)
@@ -1883,11 +1883,11 @@ class User {
 
        /**
         * @param string $group key name
-        * @return string localized descriptive name, if provided
+        * @return string localized descriptive name for group, if provided
         * @static
         */
        function getGroupName( $group ) {
-               $key = "group-$group-name";
+               $key = "group-$group";
                $name = wfMsg( $key );
                if( $name == '' || $name == "&lt;$key&gt;" ) {
                        return $group;
@@ -1896,6 +1896,22 @@ class User {
                }
        }
 
+       /**
+        * @param string $group key name
+        * @return string localized descriptive name for member of a group, if provided
+        * @static
+        */
+       function getGroupMember( $group ) {
+               $key = "group-$group-member";
+               $name = wfMsg( $key );
+               if( $name == '' || $name == "&lt;$key&gt;" ) {
+                       return $group;
+               } else {
+                       return $name;
+               }
+       }
+
+
        /**
         * Return the set of defined explicit groups.
         * The * and 'user' groups are not included.
index 2bf071a..b238c86 100644 (file)
@@ -729,38 +729,11 @@ $2 List redirects &nbsp; Search for $3 $9",
 'default'              => 'default',
 'files'                        => 'Files',
 
-# User levels special page
-#
-
-# switching pan
-'groups-lookup-group' => 'Manage group rights',
-'groups-group-edit' => 'Existing groups:',
-'editgroup' => 'Edit Group',
-'addgroup' => 'Add Group',
-
+# User rights
 'userrights-lookup-user' => 'Manage user groups',
 'userrights-user-editname' => 'Enter a username:',
 'editusergroup' => 'Edit User Groups',
 
-# group editing
-'groups-editgroup'          => 'Edit group',
-'groups-addgroup'           => 'Add group',
-'groups-editgroup-preamble' => 'If the name or description starts with a colon, the
-remainder will be treated as a message name, and hence the text will be localised
-using the MediaWiki namespace',
-'groups-editgroup-name'     => 'Group name:',
-'groups-editgroup-description' => 'Group description (max 255 characters):<br />',
-'savegroup'                 => 'Save Group',
-'groups-tableheader'        => 'ID || Name || Description || Rights',
-'groups-existing'           => 'Existing groups',
-'groups-noname'             => 'Please specify a valid group name',
-'groups-already-exists'     => 'A group of that name already exists',
-'addgrouplogentry'          => 'Added group $2',
-'changegrouplogentry'       => 'Changed group $2',
-'renamegrouplogentry'       => 'Renamed group $2 to $3',
-
-# user groups editing
-#
 'userrights-editusergroup' => 'Edit user groups',
 'saveusergroups' => 'Save User Groups',
 'userrights-groupsmember' => 'Member of:',
@@ -769,18 +742,18 @@ using the MediaWiki namespace',
 Unselected groups will not be changed. You can deselect a group with CTRL + Left Click',
 'userrights-logcomment' => 'Changed group membership from $1 to $2',
 
-# Default group names and descriptions
-#
-'group-anon-name'       => 'Anonymous',
-'group-anon-desc'       => 'Anonymous users',
-'group-loggedin-name'   => 'User',
-'group-loggedin-desc'   => 'General logged in users',
-'group-admin-name'      => 'Administrator',
-'group-admin-desc'      => 'Trusted users able to block users and delete articles',
-'group-bureaucrat-name' => 'Bureaucrat',
-'group-bureaucrat-desc' => 'The bureaucrat group is able to make sysops',
-'group-steward-name'    => 'Steward',
-'group-steward-desc'    => 'Full access',
+# Groups
+'group'                   => 'Group:',
+'group-bot'               => 'Bots',
+'group-sysop'             => 'Sysops',
+'group-bureaucrat'        => 'Bureaucrats',
+'group-steward'           => 'Stewards',
+'group-all'               => '(all)',
+
+'group-bot-member'        => 'Bot',
+'group-sysop-member'      => 'Sysop',
+'group-bureaucrat-member' => 'Bureaucrat',
+'group-steward-member'    => 'Steward',
 
 
 # Recent changes
@@ -1072,7 +1045,7 @@ Future changes to this page and its associated Talk page will be listed there,
 and the page will appear '''bolded''' in the [[Special:Recentchanges|list of recent changes]] to
 make it easier to pick out.
 
-<p>If you want to remove the page from your watchlist later, click \"Unwatch\" in the sidebar.",
+If you want to remove the page from your watchlist later, click \"Unwatch\" in the sidebar.",
 'removedwatch'         => 'Removed from watchlist',
 'removedwatchtext'     => "The page \"[[:$1]]\" has been removed from your watchlist.",
 'watch' => 'Watch',
@@ -1942,7 +1915,6 @@ is collapsed. Others will be hidden by default.
 'watchlistall1' => 'all',
 'watchlistall2' => 'all',
 'namespacesall' => 'all',
-'groupsall' => 'all',
 
 # E-mail address confirmation
 'confirmemail' => 'Confirm E-mail address',
@@ -2022,7 +1994,6 @@ Please confirm that really want to recreate this article.',
 
 # Separator for categories in page lists
 'catseparator' => '|',
-
 );