Index: trunk/extensions/Translate/scripts/groupStatistics.php |
— | — | @@ -373,6 +373,8 @@ |
374 | 374 | } |
375 | 375 | |
376 | 376 | foreach ( $groups as $groupName => $g ) { |
| 377 | + $stats = MessageGroupStats::forGroup( $groupName ); |
| 378 | + |
377 | 379 | // Perform the statistic calculations on every language |
378 | 380 | foreach ( $languages as $code => $name ) { |
379 | 381 | // Skip list |
— | — | @@ -390,7 +392,7 @@ |
391 | 393 | continue; |
392 | 394 | } |
393 | 395 | |
394 | | - list( $total, $translated, $fuzzy ) = MessageGroupStats::forItem( $groupName, $code ); |
| 396 | + list( $total, $translated, $fuzzy ) = $stats[$code]; |
395 | 397 | |
396 | 398 | $rows[$code][] = array( false, $translated, $total ); |
397 | 399 | |
Index: trunk/extensions/Translate/utils/MessageGroupStats.php |
— | — | @@ -40,9 +40,10 @@ |
41 | 41 | * @return Array |
42 | 42 | */ |
43 | 43 | public static function forItem( $id, $code ) { |
44 | | - $stats = array(); |
45 | | - $res = self::selectRowsIdLang( $id, $code ); |
46 | | - $stats = self::extractResults( $res, $stats ); |
| 44 | + $group = MessageGroups::getGroup( $id ); |
| 45 | + $ids = array_unique( self::expandAggregates( $group ) ); |
| 46 | + $res = self::selectRowsIdLang( $ids, $code ); |
| 47 | + $stats = self::extractResults( $res ); |
47 | 48 | |
48 | 49 | $group = MessageGroups::getGroup( $id ); |
49 | 50 | |