Index: trunk/extensions/Translate/tag/PageTranslationHooks.php |
— | — | @@ -551,10 +551,11 @@ |
552 | 552 | $wgOut->wrapWikiMsg( $wrap, array( 'tpt-translation-intro', $url, $titleText, $per ) ); |
553 | 553 | |
554 | 554 | if ( floor( $per ) < 100 ) { |
555 | | - $group = $page->getMessageGroup(); |
556 | | - $collection = $group->initCollection( $code ); |
557 | | - $collection->filter( 'fuzzy', false ); |
558 | | - if ( count( $collection ) ) { |
| 555 | + $groupId = $page->getMessageGroup()->getId(); |
| 556 | + $stats = MessageGroupStats::forItem( $groupId, $code ); |
| 557 | + $fuzzy = $stats[MessageGroupStats::FUZZY]; |
| 558 | + if ( $fuzzy ) { |
| 559 | + // Only show if there is fuzzy messages |
559 | 560 | $wrap = '<div class="mw-translate-page-info mw-translate-fuzzy">$1</div>'; |
560 | 561 | $wgOut->wrapWikiMsg( $wrap, array( 'tpt-translation-intro-fuzzy' ) ); |
561 | 562 | } |