Index: trunk/extensions/Translate/Translate.php |
— | — | @@ -320,7 +320,8 @@ |
321 | 321 | 'optional' => 'ViewOptionalTask', |
322 | 322 | 'suggestions' => 'ViewWithSuggestionsTask', |
323 | 323 | // 'untranslatedoptional' => 'ViewUntranslatedOptionalTask', |
324 | | - 'review' => 'ReviewMessagesTask', |
| 324 | +// 'review' => 'ReviewMessagesTask', |
| 325 | + 'acceptqueue' => 'AcceptQueueMessagesTask', |
325 | 326 | 'reviewall' => 'ReviewAllMessagesTask', |
326 | 327 | 'export-as-po' => 'ExportasPoMessagesTask', |
327 | 328 | 'export-to-file' => 'ExportToFileMessagesTask', |
Index: trunk/extensions/Translate/TranslateTasks.php |
— | — | @@ -196,7 +196,7 @@ |
197 | 197 | } |
198 | 198 | |
199 | 199 | /** |
200 | | - * List messages which has been changed since last export. |
| 200 | + * Basic class for review mode |
201 | 201 | */ |
202 | 202 | class ReviewMessagesTask extends ViewMessagesTask { |
203 | 203 | protected $id = 'review'; |
— | — | @@ -207,15 +207,12 @@ |
208 | 208 | $this->collection->setReviewMode( true ); |
209 | 209 | $this->collection->setInfile( $this->group->load( $code ) ); |
210 | 210 | $this->collection->filter( 'ignored' ); |
211 | | - $this->collection->filter( 'hastranslation', false ); |
212 | | - $this->collection->filter( 'changed', false ); |
213 | 211 | } |
214 | 212 | |
215 | 213 | protected function output() { |
216 | 214 | $table = new MessageTable( $this->collection, $this->group ); |
217 | 215 | $table->appendEditLinkParams( 'loadtask', $this->getId() ); |
218 | 216 | $table->setReviewMode(); |
219 | | - |
220 | 217 | return $table->fullTable(); |
221 | 218 | } |
222 | 219 | } |
— | — | @@ -327,15 +324,27 @@ |
328 | 325 | protected $id = 'reviewall'; |
329 | 326 | |
330 | 327 | protected function preinit() { |
331 | | - $code = $this->options->getLanguage(); |
332 | | - $this->collection = $this->group->initCollection( $code ); |
333 | | - $this->collection->setReviewMode( true ); |
334 | | - $this->collection->setInfile( $this->group->load( $code ) ); |
| 328 | + parent::preinit(); |
335 | 329 | $this->collection->filter( 'ignored' ); |
336 | 330 | $this->collection->filter( 'hastranslation', false ); |
337 | 331 | } |
338 | 332 | } |
339 | 333 | |
| 334 | +/// Lists all translations for accepting. |
| 335 | +class AcceptQueueMessagesTask extends ReviewMessagesTask { |
| 336 | + protected $id = 'acceptqueue'; |
| 337 | + |
| 338 | + protected function preinit() { |
| 339 | + global $wgUser; |
| 340 | + parent::preinit(); |
| 341 | + $this->collection->filter( 'ignored' ); |
| 342 | + $this->collection->filter( 'hastranslation', false ); |
| 343 | + $this->collection->filter( 'fuzzy' ); |
| 344 | + $this->collection->filter( 'reviewer', true, $wgUser->getId() ); |
| 345 | + $this->collection->filter( 'last-translator', true, $wgUser->getId() ); |
| 346 | + } |
| 347 | +} |
| 348 | + |
340 | 349 | /** |
341 | 350 | * Exports messages to their native format with embedded textarea. |
342 | 351 | */ |
— | — | @@ -453,7 +462,6 @@ |
454 | 463 | $filterTasks = array( |
455 | 464 | 'optional', |
456 | 465 | 'untranslatedoptional', |
457 | | - 'review', |
458 | 466 | 'export-to-file', |
459 | 467 | ); |
460 | 468 | |
Index: trunk/extensions/Translate/Translate.i18n.php |
— | — | @@ -30,6 +30,7 @@ |
31 | 31 | 'translate-task-untranslatedoptional' => 'View untranslated optional messages from', |
32 | 32 | 'translate-task-problematic' => 'View messages that have problems', |
33 | 33 | 'translate-task-review' => 'Review changes to', |
| 34 | + 'translate-task-acceptqueue' => 'Accept translations in', |
34 | 35 | 'translate-task-reviewall' => 'Review all translated messages in', |
35 | 36 | 'translate-task-export' => 'Export translations', |
36 | 37 | 'translate-task-export-to-file' => 'Export translations to file', |