Index: trunk/extensions/Translate/scripts/export.php |
— | — | @@ -109,16 +109,12 @@ |
110 | 110 | |
111 | 111 | foreach ( $groups as $groupId => $group ) { |
112 | 112 | if ( !$group instanceof MessageGroup ) { |
113 | | - STDERR( "Unknown message group $groupId" ); |
| 113 | + STDERR( "Invalid group: " . $groupId ); |
114 | 114 | exit( 1 ); |
115 | 115 | } |
116 | 116 | |
117 | | - if ( $group->isMeta() ) { |
118 | | - STDERR( "Skipping meta message group $groupId" ); |
119 | | - } |
| 117 | + STDERR( 'Exporting ' . $groupId ); |
120 | 118 | |
121 | | - STDERR( "Exporting $groupId" ); |
122 | | - |
123 | 119 | $langs = $reqLangs; |
124 | 120 | if ( $threshold ) { |
125 | 121 | $stats = MessageGroupStats::forGroup( $groupId ); |
Index: trunk/extensions/Translate/MessageGroups.php |
— | — | @@ -1333,17 +1333,22 @@ |
1334 | 1334 | /** |
1335 | 1335 | * Get message groups for corresponding message group ids. |
1336 | 1336 | * |
1337 | | - * @param $ids array of message group ids |
1338 | | - * @return array array of message groups indexed by message group ids |
| 1337 | + * @param $ids array Group IDs |
| 1338 | + * @param $skipMeta bool Skip aggregate message groups |
| 1339 | + * @return array |
1339 | 1340 | * @since 2012-02-13 |
1340 | 1341 | */ |
1341 | | - public static function getGroupsById( array $ids ) { |
| 1342 | + public static function getGroupsById( array $ids, $skipMeta = false ) { |
1342 | 1343 | $groups = array(); |
1343 | 1344 | foreach ( $ids as $id ) { |
1344 | 1345 | $group = self::getGroup( $id ); |
1345 | 1346 | |
1346 | 1347 | if ( $group !== null ) { |
1347 | | - $groups[$id] = $group; |
| 1348 | + if ( $skipMeta && $group->isMeta() ) { |
| 1349 | + continue; |
| 1350 | + } else { |
| 1351 | + $groups[$id] = $group; |
| 1352 | + } |
1348 | 1353 | } else { |
1349 | 1354 | wfDebug( __METHOD__ . ": Invalid message group id: $id\n" ); |
1350 | 1355 | } |