Use localized group names for user rights changes

Bug: 55338
Change-Id: I738c2e8a8811d1bbcae03bd873bf5d076c83e8fd
This commit is contained in:
Kunal Mehta 2013-10-24 17:18:14 +00:00 committed by Legoktm
parent 0d005e15af
commit dd627ab22b

View file

@ -23,11 +23,19 @@ class EchoUserRightsFormatter extends EchoBasicFormatter {
foreach ( array( 'add', 'remove' ) as $action ) {
if ( isset( $extra[$action] ) && $extra[$action] ) {
// Get the localized group names, bug 55338
$groups = array();
foreach( $extra[$action] as $group ) {
$msg = $this->getMessage( 'group-' . $group );
$groups[] = $msg->isBlank() ? $group : $msg->escaped();
}
// Messages that can be used here:
// * notification-user-rights-add
// * notification-user-rights-remove
$list[] = $this->getMessage( 'notification-user-rights-' . $action )
->params( $wgLang->commaList( $extra[$action] ), count( $extra[$action] ) )
->params( $wgLang->commaList( $groups ), count( $groups ) )
->escaped();
}
}