From f09baf963c79151e5e28eb18934a34df115e0bf2 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Niklas=20Laxstr=C3=B6m?= Date: Fri, 11 Jul 2008 17:37:45 +0000 Subject: [PATCH] * (bug 12487) Rights log is not fully internationalized * Use listToText for lists --- RELEASE-NOTES | 1 + includes/LogPage.php | 5 +++++ includes/specials/SpecialUserrights.php | 5 +++-- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 61ddb18ed7..8ad7e7083e 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -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 === diff --git a/includes/LogPage.php b/includes/LogPage.php index 58a73a6892..27554308bd 100644 --- a/includes/LogPage.php +++ b/includes/LogPage.php @@ -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' ); } diff --git a/includes/specials/SpecialUserrights.php b/includes/specials/SpecialUserrights.php index 7fa21bc711..fd3c690b89 100644 --- a/includes/specials/SpecialUserrights.php +++ b/includes/specials/SpecialUserrights.php @@ -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 = '

' . $grouplist . ' ' . $wgLang->listToText( $list ) . '

'; } $wgOut->addHTML( Xml::openElement( 'form', array( 'method' => 'post', 'action' => $this->getTitle()->getLocalURL(), 'name' => 'editGroup', 'id' => 'mw-userrights-form2' ) ) . -- 2.20.1