r36088 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r36087‎ | r36088 | r36089 >
Date:16:49, 9 June 2008
Author:nikerabbit
Status:old
Tags:
Comment:
* New filter option and fix to export
Modified paths:
  • /trunk/extensions/Translate/RcFilter.php (modified) (history)
  • /trunk/extensions/Translate/Translate.i18n.php (modified) (history)
  • /trunk/extensions/Translate/ffs/Simple.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Translate/RcFilter.php
@@ -19,10 +19,13 @@
2020
2121 if ( $translations === 'only' ) {
2222 $conds[] = 'rc_namespace IN (' . $dbr->makeList($namespaces) . ')';
 23+ $conds[] = 'rc_title like \'%%/%%\'';
2324 } elseif ( $translations === 'filter' ) {
2425 $conds[] = 'rc_namespace NOT IN (' . $dbr->makeList($namespaces) . ')';
 26+ } elseif ( $translations === 'site' ) {
 27+ $conds[] = 'rc_namespace IN (' . $dbr->makeList($namespaces) . ')';
 28+ $conds[] = 'rc_title not like \'%%/%%\'';
2529 }
26 -
2730 return true;
2831 }
2932
@@ -38,6 +41,7 @@
3942 $select->addOption( wfMsg( 'translate-rc-translation-filter-no' ), '' );
4043 $select->addOption( wfMsg( 'translate-rc-translation-filter-only' ), 'only' );
4144 $select->addOption( wfMsg( 'translate-rc-translation-filter-filter' ), 'filter' );
 45+ $select->addOption( wfMsg( 'translate-rc-translation-filter-site' ), 'site' );
4246
4347 $items['translations'] = array( $label, $select->getHTML() );
4448 return true;
Index: trunk/extensions/Translate/Translate.i18n.php
@@ -115,6 +115,7 @@
116116 'translate-rc-translation-filter-no' => 'Do nothing',
117117 'translate-rc-translation-filter-only' => 'Show translations only',
118118 'translate-rc-translation-filter-filter' => 'Filter out translations',
 119+ 'translate-rc-translation-filter-site' => 'Changes to site messages only',
119120 );
120121
121122 /** Karelian (Karjala)
Index: trunk/extensions/Translate/ffs/Simple.php
@@ -22,7 +22,8 @@
2323 }
2424 }
2525
26 - protected $authors, $staticHeader;
 26+ protected $authors = array();
 27+ protected $staticHeader = '';
2728
2829 public function parseAuthors() {
2930 if ( $this->authors === null ) {
@@ -40,7 +41,7 @@
4142
4243 protected function parseHeader() {
4344 if ( $this->filename === false ) {
44 - return '';
 45+ return;
4546 }
4647
4748 $authors = array();

Status & tagging log