mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Echo
synced 2024-11-12 01:10:07 +00:00
Use localized group names for user rights changes
Bug: 55338 Change-Id: I738c2e8a8811d1bbcae03bd873bf5d076c83e8fd
This commit is contained in:
parent
0d005e15af
commit
dd627ab22b
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue