http://www.mediawiki.org/wiki/Special:Code/MediaWiki/65525
Revision: 65525 Author: siebrand Date: 2010-04-25 19:23:39 +0000 (Sun, 25 Apr 2010) Log Message: ----------- * link to review mode when the complete group has been translated * remove 1.14 backward compat code Modified Paths: -------------- trunk/extensions/Translate/SpecialLanguageStats.php trunk/extensions/Translate/Translate.php Modified: trunk/extensions/Translate/SpecialLanguageStats.php =================================================================== --- trunk/extensions/Translate/SpecialLanguageStats.php 2010-04-25 19:08:29 UTC (rev 65524) +++ trunk/extensions/Translate/SpecialLanguageStats.php 2010-04-25 19:23:39 UTC (rev 65525) @@ -229,23 +229,21 @@ // Division by 0 should not be possible, but does occur. Caching issue? $translatedPercentage = $total ? $wgLang->formatNum( number_format( round( 100 * $translated / $total, 2 ), 2 ) ) : $errorString; + $translatedPercentage = $translatedPercentage == $errorString ? $translatedPercentage : wfMsg( 'percent', $translatedPercentage ); + $fuzzyPercentage = $total ? $wgLang->formatNum( number_format( round( 100 * $fuzzy / $total, 2 ), 2 ) ) : $errorString; + $fuzzyPercentage = $fuzzyPercentage == $errorString ? $fuzzyPercentage : wfMsg( 'percent', $fuzzyPercentage ); - if ( !wfEmptyMsg( 'percent', wfMsgNoTrans( 'percent' ) ) ) { - $translatedPercentage = $translatedPercentage == $errorString ? $translatedPercentage : wfMsg( 'percent', $translatedPercentage ); - $fuzzyPercentage = $fuzzyPercentage == $errorString ? $fuzzyPercentage : wfMsg( 'percent', $fuzzyPercentage ); - } else { - // For 1.14 compatability - $translatedPercentage = "$translatedPercentage%"; - $fuzzyPercentage = "$fuzzyPercentage%"; - } - $translateTitle = SpecialPage::getTitleFor( 'Translate' ); $queryParameters = array( 'group' => $groupId, 'language' => $code ); + if( $translated == $total ) { + $queryParameters['task'] = 'reviewall'; + } + $translateGroupLink = $wgUser->getSkin()->link( $translateTitle, $g->getLabel(), Modified: trunk/extensions/Translate/Translate.php =================================================================== --- trunk/extensions/Translate/Translate.php 2010-04-25 19:08:29 UTC (rev 65524) +++ trunk/extensions/Translate/Translate.php 2010-04-25 19:23:39 UTC (rev 65525) @@ -12,7 +12,7 @@ * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 2.0 or later */ -define( 'TRANSLATE_VERSION', '2010-01-16' ); +define( 'TRANSLATE_VERSION', '2010-04-25' ); $wgExtensionCredits['specialpage'][] = array( 'path' => __FILE__, _______________________________________________ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs