http://www.mediawiki.org/wiki/Special:Code/MediaWiki/72508
Revision: 72508
Author: nikerabbit
Date: 2010-09-06 20:11:24 +0000 (Mon, 06 Sep 2010)
Log Message:
-----------
Don't display warning of outdated translations if not applicable.
Does extra query for now, but could use the cache later.
Modified Paths:
--------------
trunk/extensions/Translate/tag/PageTranslationHooks.php
Modified: trunk/extensions/Translate/tag/PageTranslationHooks.php
===================================================================
--- trunk/extensions/Translate/tag/PageTranslationHooks.php 2010-09-06
20:04:50 UTC (rev 72507)
+++ trunk/extensions/Translate/tag/PageTranslationHooks.php 2010-09-06
20:11:24 UTC (rev 72508)
@@ -455,9 +455,14 @@
$wgOut->wrapWikiMsg( $wrap, array( 'tpt-translation-intro',
$url, $titleText, $per ) );
- if ( ( (int) $per ) < 100 ) {
- $wrap = '<div style="font-size: x-small; text-align:
center" class="mw-translate-fuzzy">$1</div>';
- $wgOut->wrapWikiMsg( $wrap, array(
'tpt-translation-intro-fuzzy' ) );
+ if ( ((int) $per) < 100 ) {
+ $group = MessageGroups::getGroup( 'page|' .
$page->getTitle()->getPrefixedText() );
+ $collection = $group->initCollection( $code );
+ $collection->filter( 'fuzzy', false );
+ if ( count( $collection ) ) {
+ $wrap = '<div style="font-size: x-small;
text-align: center" class="mw-translate-fuzzy">$1</div>';
+ $wgOut->wrapWikiMsg( $wrap, array(
'tpt-translation-intro-fuzzy' ) );
+ }
}
$wgOut->addHTML( '<hr />' );
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs