Use of:
$action_desc[0] = strtolower($action_desc[0]);
is horrible wrong for a few reasons:
1) The first-byte match fails for all non-ASCII characters -- use lcfirst()!
2) System strtolower() or lcfirst() may not work for UTF-8 or lang-specific issues properly; use $wgLang->lcfirst()
3) You shouldn't be forcing things to lowercase here anyway, you can't know it's correct gramattically.
This whole message output should be redone cleanly; either all the rights info messages should be designed to work in an inline list sentence, or they should be formatted as stand-alone text strings using a <ul> or something.
if ($action == null) {
$text = wfMsgNoTrans( 'permissionserrorstext', count($errors)). "\n\n";
} else {
+ global $wgLang;
$action_desc = wfMsg( "right-$action" );
- $action_desc[0] = strtolower($action_desc[0]);
+ $action_desc = $wgLang->lcfirst( $action_desc ); // FIXME: TERRIBLE HACK
$text = wfMsgNoTrans( 'permissionserrorstext-withaction', count($errors), $action_desc ) . "\n\n";
}