diff options
author | Pierre Schmitz <pierre@archlinux.de> | 2009-06-10 13:00:47 +0200 |
---|---|---|
committer | Pierre Schmitz <pierre@archlinux.de> | 2009-06-10 13:00:47 +0200 |
commit | 72e90545454c0e014318fa3c81658e035aac58c1 (patch) | |
tree | 9212e3f46868989c4d57ae9a5c8a1a80e4dc0702 /includes/MessageCache.php | |
parent | 565a0ccc371ec1a2a0e9b39487cbac18e6f60e25 (diff) |
applying patch to version 1.15.0
Diffstat (limited to 'includes/MessageCache.php')
-rw-r--r-- | includes/MessageCache.php | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/includes/MessageCache.php b/includes/MessageCache.php index a06b0cb9..2236bdd7 100644 --- a/includes/MessageCache.php +++ b/includes/MessageCache.php @@ -702,7 +702,10 @@ class MessageCache { * @param string $lang The messages language, English by default */ function addMessage( $key, $value, $lang = 'en' ) { - $this->mExtensionMessages[$lang][$key] = $value; + global $wgContLang; + # Normalise title-case input + $lckey = str_replace( ' ', '_', $wgContLang->lcfirst( $key ) ); + $this->mExtensionMessages[$lang][$lckey] = $value; } /** @@ -800,6 +803,7 @@ class MessageCache { */ function loadMessagesFile( $filename, $langcode = false ) { global $wgLang, $wgContLang; + wfProfileIn( __METHOD__ ); $messages = $magicWords = false; require( $filename ); @@ -822,6 +826,7 @@ class MessageCache { global $wgContLang; $wgContLang->addMagicWordsByLang( $magicWords ); } + wfProfileOut( __METHOD__ ); } /** @@ -831,6 +836,7 @@ class MessageCache { * @param string $langcode Language code to process. */ function processMessagesArray( $messages, $langcode ) { + wfProfileIn( __METHOD__ ); $fallbackCode = $langcode; $mergedMessages = array(); do { @@ -842,6 +848,7 @@ class MessageCache { if ( !empty($mergedMessages) ) $this->addMessages( $mergedMessages, $langcode ); + wfProfileOut( __METHOD__ ); } public function figureMessage( $key ) { |