* (bug 12487) Rights log is not fully internationalized
authorNiklas Laxström <nikerabbit@users.mediawiki.org>
Fri, 11 Jul 2008 17:37:45 +0000 (17:37 +0000)
committerNiklas Laxström <nikerabbit@users.mediawiki.org>
Fri, 11 Jul 2008 17:37:45 +0000 (17:37 +0000)
* Use listToText for lists

RELEASE-NOTES
includes/LogPage.php
includes/specials/SpecialUserrights.php

index 61ddb18..8ad7e70 100644 (file)
@@ -430,6 +430,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
 * (bug 14763) Child classes of Database (DatabasePostgres and DatabaseOracle)
   had stict standards issues with setFakeSlaveLag() and setFakeMaster().
 * (bug 451) Improve the phrase mappings of the Chinese converter arrays.
+* (bug 12487) Rights log is not fully internationalized
 
 === API changes in 1.13 ===
 
index 58a73a6..2755430 100644 (file)
@@ -193,6 +193,11 @@ class LogPage {
                                if( $key == 'rights/rights' ) {
                                        if ($skin) {
                                                $rightsnone = wfMsg( 'rightsnone' );
+                                               foreach ( $params as &$param ) {
+                                                       $groupArray = array_map( 'trim', explode( ',', $param ) );
+                                                       $groupArray = array_map( array( 'User', 'getGroupName' ), $groupArray );
+                                                       $param = $wgLang->listToText( $groupArray );
+                                               }
                                        } else {
                                                $rightsnone = wfMsgForContent( 'rightsnone' );
                                        }
index 7fa21bc..fd3c690 100644 (file)
@@ -349,7 +349,7 @@ class UserrightsPage extends SpecialPage {
         * @param $groups    Array:  Array of groups the user is in
         */
        protected function showEditUserGroupsForm( $user, $groups ) {
-               global $wgOut, $wgUser;
+               global $wgOut, $wgUser, $wgLang;
 
                list( $addable, $removable ) = $this->splitGroups( $groups );
 
@@ -359,7 +359,8 @@ class UserrightsPage extends SpecialPage {
 
                $grouplist = '';
                if( count( $list ) > 0 ) {
-                       $grouplist = Xml::tags( 'p', null, wfMsgHtml( 'userrights-groupsmember' ) . ' ' . implode( ', ', $list ) );
+                       $grouplist = wfMsgHtml( 'userrights-groupsmember' );
+                       $grouplist = '<p>' . $grouplist  . ' ' . $wgLang->listToText( $list ) . '</p>';
                }
                $wgOut->addHTML(
                        Xml::openElement( 'form', array( 'method' => 'post', 'action' => $this->getTitle()->getLocalURL(), 'name' => 'editGroup', 'id' => 'mw-userrights-form2' ) ) .