* @ingroup SpecialPage
*/
class SpecialAllmessages extends SpecialPage {
-
/**
* @var AllmessagesTablePager
*/
global $wgUseDatabaseMessages;
if ( !$wgUseDatabaseMessages ) {
$out->addWikiMsg( 'allmessagesnotsupportedDB' );
+
return;
} else {
$this->outputHeader( 'allmessagestext' );
$this->table->getNavigationBar() .
$this->table->getBody() .
$this->table->getNavigationBar() );
-
}
protected function getGroupName() {
* getting data from a table when in fact not all of it comes from the database.
*/
class AllmessagesTablePager extends TablePager {
-
protected $filter, $prefix, $langcode, $displayPrefix;
public $mLimitsShown;
$this->getHiddenFields( array( 'title', 'prefix', 'filter', 'lang', 'limit' ) ) .
Xml::closeElement( 'fieldset' ) .
Xml::closeElement( 'form' );
+
return $out;
}
$messageNames = array_map( array( $this->lang, 'ucfirst' ), $messageNames );
wfProfileOut( __METHOD__ );
+
return $messageNames;
}
/**
* This function normally does a database query to get the results; we need
* to make a pretend result using a FakeResultWrapper.
+ * @param string $offset
+ * @param int $limit
+ * @param bool $descending
* @return FakeResultWrapper
*/
function reallyDoQuery( $offset, $limit, $descending ) {
break;
}
}
+
return $result;
}
case 'am_title' :
$title = Title::makeTitle( NS_MEDIAWIKI, $value . $this->suffix );
$talk = Title::makeTitle( NS_MEDIAWIKI_TALK, $value . $this->suffix );
+ $translation = Linker::makeExternalLink(
+ 'https://translatewiki.net/w/i.php?' . wfArrayToCgi( array(
+ 'title' => 'Special:SearchTranslations',
+ 'group' => 'mediawiki',
+ 'grouppath' => 'mediawiki',
+ 'query' => 'language:' . $this->getLanguage()->getCode() . '^25 ' .
+ 'messageid:"MediaWiki:' . $value . '"^10 "' .
+ $this->msg ( $value )->inLanguage ( 'en' )->plain() . '"'
+ ) ),
+ $this->msg( 'allmessages-filter-translate' )->text()
+ );
if ( $this->mCurrentRow->am_customised ) {
$title = Linker::linkKnown( $title, $this->getLanguage()->lcfirst( $value ) );
array( 'broken' )
);
}
- return $title . ' ' . $this->msg( 'parentheses' )->rawParams( $talk )->escaped();
+
+ return $title . ' '
+ . $this->msg( 'parentheses' )->rawParams( $talk )->escaped()
+ . ' '
+ . $this->msg( 'parentheses' )->rawParams( $translation )->escaped();
case 'am_default' :
case 'am_actual' :
$s .= Xml::tags( 'td', $this->getCellAttrs( 'am_actual', $row->am_actual ), $formatted )
. "</tr>\n";
}
+
return $s;
}
if ( !$isSecond ) {
$arr['id'] = Sanitizer::escapeId( 'msg_' . $this->getLanguage()->lcfirst( $row->am_title ) );
}
+
return $arr;
}