+ $txt .= "'$key' => '" . preg_replace( "/(?<!\\\\)'/", "\'", $m['msg']) . "',$comment\n";
+ }
+ $txt .= ');';
+ return $txt;
+}
+
+/**
+ *
+ */
+function makeHTMLText( $messages ) {
+ global $wgLang, $wgUser, $wgLanguageCode, $wgContLanguageCode, $wgContLang;
+ $fname = "makeHTMLText";
+ wfProfileIn( $fname );
+
+ $sk =& $wgUser->getSkin();
+ $talk = $wgLang->getNsText( NS_TALK );
+ $mwnspace = $wgLang->getNsText( NS_MEDIAWIKI );
+ $mwtalk = $wgLang->getNsText( NS_MEDIAWIKI_TALK );
+ $txt = "
+
+ <table border='1' cellspacing='0' width='100%'>
+ <tr bgcolor='#b2b2ff'>
+ <th>" . wfMsg('allmessagesname') . "</th>
+ <th>" . wfMsg('allmessagesdefault') . "</th>
+ <th>" . wfMsg('allmessagescurrent') . "</th>
+ </tr>";
+
+ wfProfileIn( "$fname-check" );
+ # This is a nasty hack to avoid doing independent existence checks
+ # without sending the links and table through the slow wiki parser.
+ $pageExists = array(
+ NS_MEDIAWIKI => array(),
+ NS_MEDIAWIKI_TALK => array()
+ );
+ $dbr =& wfGetDB( DB_SLAVE );
+ $page = $dbr->tableName( 'page' );
+ $sql = "SELECT page_namespace,page_title FROM $page WHERE page_namespace IN (" . NS_MEDIAWIKI . ", " . NS_MEDIAWIKI_TALK . ")";
+ $res = $dbr->query( $sql );
+ while( $s = $dbr->fetchObject( $res ) ) {
+ $pageExists[$s->page_namespace][$s->page_title] = true;