When a message key is defined with a upper case letter the sorting in
Special:AllMessages gets confused, because the upper case letter is
sorted before the lower case letters. Doing the upper case first, than
sorting avoids this when having such a key.
Bug: T86139
Change-Id: I8e9f7ca276a2fa999d8bd41c948cc083964ec66d
function getAllMessages( $descending ) {
$messageNames = Language::getLocalisationCache()->getSubitemList( 'en', 'messages' );
+
+ // Normalise message names so they look like page titles and sort correctly - T86139
+ $messageNames = array_map( array( $this->lang, 'ucfirst' ), $messageNames );
+
if ( $descending ) {
rsort( $messageNames );
} else {
asort( $messageNames );
}
- // Normalise message names so they look like page titles
- $messageNames = array_map( array( $this->lang, 'ucfirst' ), $messageNames );
-
return $messageNames;
}