Index: trunk/extensions/Translate/scripts/export.php |
— | — | @@ -113,15 +113,19 @@ |
114 | 114 | |
115 | 115 | STDERR( 'Exporting ' . $groupId ); |
116 | 116 | |
| 117 | + $langs = $reqLangs; |
117 | 118 | if ( $threshold ) { |
118 | | - $langs = TranslationStats::getPercentageTranslated( |
119 | | - $groupId, |
120 | | - $reqLangs, |
121 | | - $threshold, |
122 | | - true |
123 | | - ); |
124 | | - } else { |
125 | | - $langs = $reqLangs; |
| 119 | + $stats = MessageGroupStats::forGroup( $groupId ); |
| 120 | + foreach ( $langs as $index => $code ) { |
| 121 | + if ( !isset( $stats[$code] ) ) { |
| 122 | + unset( $langs[$index] ); |
| 123 | + } |
| 124 | + |
| 125 | + list( $total, $translated, ) = $stats[$code]; |
| 126 | + if ( $translate/$total < $threshold ) { |
| 127 | + unset( $langs[$index] ); |
| 128 | + } |
| 129 | + } |
126 | 130 | } |
127 | 131 | |
128 | 132 | if ( $group instanceof FileBasedMessageGroup ) { |