addHTML(wfMsg('allmessagesnotsupportedDB')); return; } $fname = "wfSpecialAllMessages"; wfProfileIn( $fname ); wfProfileIn( "$fname-setup"); $ot = $wgRequest->getText( 'ot' ); $navText = wfMsg( 'allmessagestext' ); $first = true; $sortedArray = array_merge( $wgAllMessagesEn, $wgMessageCache->mExtensionMessages ); ksort( $sortedArray ); $messages = array(); $wgMessageCache->disableTransform(); foreach ( $sortedArray as $key => $enMsg ) { $messages[$key]['enmsg'] = $enMsg; $messages[$key]['statmsg'] = wfMsgNoDb( $key ); $messages[$key]['msg'] = wfMsg ( $key ); } $wgMessageCache->enableTransform(); wfProfileOut( "$fname-setup" ); wfProfileIn( "$fname-output" ); if ($ot == 'php') { $navText .= makePhp($messages); $wgOut->addHTML('PHP | HTML
'.htmlspecialchars($navText).''); } else { $wgOut->addHTML( 'PHP | HTML' ); $wgOut->addWikiText( $navText ); $wgOut->addHTML( makeHTMLText( $messages ) ); } wfProfileOut( "$fname-output" ); wfProfileOut( $fname ); } /** * */ function makePhp($messages) { global $wgLanguageCode; $txt = "\n\n".'$wgAllMessages'.ucfirst($wgLanguageCode).' = array('."\n"; foreach( $messages as $key => $m ) { if(strtolower($wgLanguageCode) != 'en' and $m['msg'] == $m['enmsg'] ) { if (strstr($m['msg'],"\n")) { $txt.='/* '; $comment=' */'; } else { $txt .= '#'; $comment = ''; } } elseif ($m['msg'] == '<'.$key.'>'){ $m['msg'] = ''; $comment = ' #empty'; } else { $comment = ''; } $txt .= "'$key' => '" . preg_replace( "/(?getSkin(); $talk = $wgLang->getNsText( NS_TALK ); $mwnspace = $wgLang->getNsText( NS_MEDIAWIKI ); $mwtalk = $wgLang->getNsText( NS_MEDIAWIKI_TALK ); $txt = "
" . wfMsgHtml('allmessagesname') . " | " . wfMsgHtml('allmessagesdefault') . " |
---|---|
" . wfMsgHtml('allmessagescurrent') . " | |
$pageLink $talkLink | $message |
$mw | |
$pageLink $talkLink | $mw |