Fix regression in use of messages with underscores/spaces; normalize spaces to unders...
authorBrion Vibber <brion@users.mediawiki.org>
Tue, 9 Jan 2007 00:00:56 +0000 (00:00 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Tue, 9 Jan 2007 00:00:56 +0000 (00:00 +0000)
includes/MessageCache.php
maintenance/parserTests.txt

index 0e2b8f9..75c14d6 100644 (file)
@@ -446,6 +446,7 @@ class MessageCache {
 
                # Normalise title-case input
                $lckey = $wgContLang->lcfirst( $key );
+               $lckey = str_replace( ' ', '_', $lckey );
 
                # Try the MediaWiki namespace
                if( !$this->mDisable && $useDB ) {
index 730b038..3d748ae 100644 (file)
@@ -4777,6 +4777,24 @@ Transclusion of nonexistent MediaWiki message
 </p>
 !! end
 
+!! test
+Transclusion of MediaWiki message with underscore
+!! input
+{{MediaWiki:history_short}}
+!! result
+<p>History
+</p>
+!! end
+
+!! test
+Transclusion of MediaWiki message with space
+!! input
+{{MediaWiki:history short}}
+!! result
+<p>History
+</p>
+!! end
+
 !! test
 Invalid header with following text
 !! input