diff options
author | Pierre Schmitz <pierre@archlinux.de> | 2006-10-11 20:21:25 +0000 |
---|---|---|
committer | Pierre Schmitz <pierre@archlinux.de> | 2006-10-11 20:21:25 +0000 |
commit | d81f562b712f2387fa02290bf2ca86392ab356f2 (patch) | |
tree | d666cdefbe6ac320827a2c6cb473581b46e22c4c /includes/SpecialAllmessages.php | |
parent | 183851b06bd6c52f3cae5375f433da720d410447 (diff) |
Aktualisierung auf Version 1.8.1
Diffstat (limited to 'includes/SpecialAllmessages.php')
-rw-r--r-- | includes/SpecialAllmessages.php | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/includes/SpecialAllmessages.php b/includes/SpecialAllmessages.php index 60258f9e..6e3f6588 100644 --- a/includes/SpecialAllmessages.php +++ b/includes/SpecialAllmessages.php @@ -9,7 +9,7 @@ * */ function wfSpecialAllmessages() { - global $wgOut, $wgAllMessagesEn, $wgRequest, $wgMessageCache, $wgTitle; + global $wgOut, $wgRequest, $wgMessageCache, $wgTitle; global $wgUseDatabaseMessages; # The page isn't much use if the MediaWiki namespace is not being used @@ -27,16 +27,16 @@ function wfSpecialAllmessages() { $navText = wfMsg( 'allmessagestext' ); # Make sure all extension messages are available - wfLoadAllExtensions(); + MessageCache::loadAllMessages(); $first = true; - $sortedArray = array_merge( $wgAllMessagesEn, $wgMessageCache->mExtensionMessages ); + $sortedArray = array_merge( Language::getMessagesFor( 'en' ), $wgMessageCache->getExtensionMessagesFor( 'en' ) ); ksort( $sortedArray ); $messages = array(); $wgMessageCache->disableTransform(); foreach ( $sortedArray as $key => $value ) { - $messages[$key]['enmsg'] = is_array( $value ) ? $value['en'] : $value; + $messages[$key]['enmsg'] = $value; $messages[$key]['statmsg'] = wfMsgNoDb( $key ); $messages[$key]['msg'] = wfMsg ( $key ); } @@ -62,10 +62,10 @@ function wfSpecialAllmessages() { * */ function makePhp($messages) { - global $wgLanguageCode; - $txt = "\n\n".'$wgAllMessages'.ucfirst($wgLanguageCode).' = array('."\n"; + global $wgLang; + $txt = "\n\n\$messages = array(\n"; foreach( $messages as $key => $m ) { - if(strtolower($wgLanguageCode) != 'en' and $m['msg'] == $m['enmsg'] ) { + if($wgLang->getCode() != 'en' and $m['msg'] == $m['enmsg'] ) { //if (strstr($m['msg'],"\n")) { // $txt.='/* '; // $comment=' */'; @@ -74,7 +74,7 @@ function makePhp($messages) { // $comment = ''; //} continue; - } elseif ($m['msg'] == '<'.$key.'>'){ + } elseif ( wfEmptyMsg( $key, $m['msg'] ) ) { $m['msg'] = ''; $comment = ' #empty'; } else { @@ -90,7 +90,7 @@ function makePhp($messages) { * */ function makeHTMLText( $messages ) { - global $wgLang, $wgUser, $wgLanguageCode, $wgContLanguageCode; + global $wgLang, $wgContLang, $wgUser; $fname = "makeHTMLText"; wfProfileIn( $fname ); @@ -148,8 +148,8 @@ function makeHTMLText( $messages ) { foreach( $messages as $key => $m ) { $title = $wgLang->ucfirst( $key ); - if($wgLanguageCode != $wgContLanguageCode) - $title.="/$wgLanguageCode"; + if($wgLang->getCode() != $wgContLang->getCode()) + $title.= '/' . $wgLang->getCode(); $titleObj =& Title::makeTitle( NS_MEDIAWIKI, $title ); $talkPage =& Title::makeTitle( NS_MEDIAWIKI_TALK, $title ); |