r101001 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r101000‎ | r101001 | r101002 >
Date:16:51, 27 October 2011
Author:siebrand
Status:ok
Tags:
Comment:
stylize.php
Modified paths:
  • /trunk/extensions/Translate/MessageGroups.php (modified) (history)
  • /trunk/extensions/Translate/Translate.php (modified) (history)
  • /trunk/extensions/Translate/TranslateEditAddons.php (modified) (history)
  • /trunk/extensions/Translate/resources/ext.translate.messagetable.js (modified) (history)
  • /trunk/extensions/Translate/specials/SpecialSupportedLanguages.php (modified) (history)
  • /trunk/extensions/Translate/specials/SpecialTranslate.php (modified) (history)
  • /trunk/extensions/Translate/specials/SpecialTranslationStats.php (modified) (history)
  • /trunk/extensions/Translate/tag/MoveJob.php (modified) (history)
  • /trunk/extensions/Translate/utils/MessageTable.php (modified) (history)
  • /trunk/extensions/Translate/utils/UserToggles.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Translate/MessageGroups.php
@@ -996,7 +996,7 @@
997997
998998 $tables = array( 'page', 'revtag' );
999999 $vars = array( 'page_id', 'page_namespace', 'page_title', );
1000 - $conds = array( 'page_id=rt_page', 'rt_type' => RevTag::getType( 'tp:mark') );
 1000+ $conds = array( 'page_id=rt_page', 'rt_type' => RevTag::getType( 'tp:mark' ) );
10011001 $options = array( 'GROUP BY' => 'rt_page' );
10021002 $res = $dbr->select( $tables, $vars, $conds, __METHOD__, $options );
10031003
Index: trunk/extensions/Translate/tag/MoveJob.php
@@ -73,12 +73,12 @@
7474
7575 $this->unlock();
7676
77 -
 77+
7878 $cache = wfGetCache( CACHE_ANYTHING );
7979 $key = wfMemcKey( 'translate-pt-move', $base );
80 -
 80+
8181 $count = $cache->decr( $key );
82 - $last = strval($count) === "0";
 82+ $last = strval( $count ) === "0";
8383
8484 if ( $last ) {
8585 $cache->delete( $key );
Index: trunk/extensions/Translate/TranslateEditAddons.php
@@ -288,7 +288,7 @@
289289 * @return \bool If string contains fuzzy string.
290290 */
291291 public static function hasFuzzyString( $text ) {
292 - #wfDeprecated( __METHOD__, '1.19' );
 292+ # wfDeprecated( __METHOD__, '1.19' );
293293 return MessageHandle::hasFuzzyString( $text );
294294 }
295295
@@ -298,7 +298,7 @@
299299 * @return \bool If title is marked fuzzy.
300300 */
301301 public static function isFuzzy( Title $title ) {
302 - #wfDeprecated( __METHOD__, '1.19' );
 302+ # wfDeprecated( __METHOD__, '1.19' );
303303 $handle = new MessageHandle( $title );
304304 return $handle->isFuzzy();
305305 }
Index: trunk/extensions/Translate/Translate.php
@@ -15,7 +15,7 @@
1616 /**
1717 * Version number used in extension credits and in other placed where needed.
1818 */
19 -define( 'TRANSLATE_VERSION', '2011-10-07' );
 19+define( 'TRANSLATE_VERSION', '2011-10-27' );
2020
2121 /**
2222 * Extension credits properties.
Index: trunk/extensions/Translate/utils/MessageTable.php
@@ -141,7 +141,7 @@
142142 if ( $m->hasTag( 'optional' ) ) {
143143 $extra = '<br />' . $optional;
144144 }
145 -
 145+
146146 $leftColumn = $anchor . $tools['edit'] . $this->getReviewButton( $m ) . $extra . $this->getReviewStatus( $m );
147147
148148 if ( $this->reviewMode && $original !== $message ) {
@@ -225,11 +225,11 @@
226226 $attribs['value'] = wfMessage( 'translate-messagereview-done' )->text();
227227 $attribs['disabled'] = 'disabled';
228228 $attribs['title'] = wfMessage( 'translate-messagereview-doit' )->text();
229 - } elseif( $message->hasTag( 'fuzzy' ) ) {
 229+ } elseif ( $message->hasTag( 'fuzzy' ) ) {
230230 $attribs['value'] = wfMessage( 'translate-messagereview-submit' )->text();
231231 $attribs['disabled'] = 'disabled';
232232 $attribs['title'] = wfMessage( 'translate-messagereview-no-fuzzy' )->text();
233 - } elseif( $wgUser->getName() === $message->author() ) {
 233+ } elseif ( $wgUser->getName() === $message->author() ) {
234234 $attribs['value'] = wfMessage( 'translate-messagereview-submit' )->text();
235235 $attribs['disabled'] = 'disabled';
236236 $attribs['title'] = wfMessage( 'translate-messagereview-no-own' )->text();
Index: trunk/extensions/Translate/utils/UserToggles.php
@@ -25,7 +25,7 @@
2626 public static function onGetPreferences( $user, &$preferences ) {
2727 global $wgTranslateNewsletterPreference;
2828
29 - if( !$wgTranslateNewsletterPreference ) {
 29+ if ( !$wgTranslateNewsletterPreference ) {
3030 return true;
3131 }
3232
Index: trunk/extensions/Translate/specials/SpecialSupportedLanguages.php
@@ -397,7 +397,7 @@
398398 $legend = '';
399399 $period = $this->period;
400400
401 - for ( $i = 0; $i <= $period; $i+=30 ) {
 401+ for ( $i = 0; $i <= $period; $i += 30 ) {
402402 $iFormatted = $wgLang->formatNum( $i );
403403 $legend .= '<span style="background-color:#' . $this->getActivityColour( $period - $i, $period ) . "\"> $iFormatted</span>";
404404 }
Index: trunk/extensions/Translate/specials/SpecialTranslate.php
@@ -45,7 +45,7 @@
4646
4747 $this->setHeaders();
4848
49 - //@todo Move to api or so
 49+ // @todo Move to api or so
5050 if ( $parameters === 'editpage' ) {
5151 $editpage = TranslationEditPage::newFromRequest( $wgRequest );
5252
Index: trunk/extensions/Translate/specials/SpecialTranslationStats.php
@@ -483,14 +483,14 @@
484484 /* Here we assume that week starts on monday, which does not
485485 * always hold true. Go Xwards day by day until we are on monday */
486486 while ( date( 'D', $cutoff ) !== "Mon" ) {
487 - $cutoff += $dir*86400;
 487+ $cutoff += $dir * 86400;
488488 }
489489 // Round to nearest day
490490 $cutoff -= ( $cutoff % 86400 );
491491 } elseif ( $scale === 'months' ) {
492492 // Go Xwards/ day by day until we are on the first day of the month
493493 while ( date( 'j', $cutoff ) !== "1" ) {
494 - $cutoff += $dir*86400;
 494+ $cutoff += $dir * 86400;
495495 }
496496 // Round to nearest day
497497 $cutoff -= ( $cutoff % 86400 );
Index: trunk/extensions/Translate/resources/ext.translate.messagetable.js
@@ -11,7 +11,7 @@
1212 $b.val( mw.msg( "translate-messagereview-done" ) );
1313 }
1414 };
15 -
 15+
1616 var params = {
1717 action: "translationreview",
1818 token: $b.data( "token" ),
@@ -21,7 +21,7 @@
2222 $b.val( mw.msg( "translate-messagereview-progress" ) );
2323 $b.prop( "disabled", true );
2424 $.post( mw.util.wikiScript( "api" ), params, successFunction );
25 -
 25+
2626 } );
2727 } );
2828 } );

Status & tagging log