Index: trunk/extensions/Translate/TranslatePage.php |
— | — | @@ -253,16 +253,9 @@ |
254 | 254 | protected function taskSelector( $pageTranslation = false ) { |
255 | 255 | $selector = new HTMLSelector( 'task', 'task', $this->options['task'] ); |
256 | 256 | |
257 | | - /** |
258 | | - * Check if this is a page translation group to return only appropriate tasks. |
259 | | - */ |
260 | | - $isPageTranslation = false; |
261 | | - if ( $this->group ) { |
262 | | - $isPageTranslation = strpos( $this->group->getId(), 'page|' ) === 0; |
263 | | - } |
264 | | - |
| 257 | + $isPageTranslation = $this->group instanceof WikiPageMessageGroup; |
265 | 258 | foreach ( TranslateTasks::getTasks( $isPageTranslation ) as $id ) { |
266 | | - $label = call_user_func( array( 'TranslateTask', 'labelForTask' ), $id ); |
| 259 | + $label = TranslateTask::labelForTask( $id ); |
267 | 260 | $selector->addOption( $label, $id ); |
268 | 261 | } |
269 | 262 | |
Index: trunk/extensions/Translate/tag/TranslatablePage.php |
— | — | @@ -471,14 +471,11 @@ |
472 | 472 | public function getTranslationUrl( $code = false ) { |
473 | 473 | $translate = SpecialPage::getTitleFor( 'Translate' ); |
474 | 474 | $params = array( |
475 | | - 'group' => 'page|' . $this->getTitle()->getPrefixedText(), |
476 | | - 'task' => 'view' |
| 475 | + 'group' => $this->getMessageGroupId(), |
| 476 | + 'task' => 'view', |
| 477 | + 'language' => $code, |
477 | 478 | ); |
478 | 479 | |
479 | | - if ( $code ) { |
480 | | - $params['language'] = $code; |
481 | | - } |
482 | | - |
483 | 480 | return $translate->getFullURL( $params ); |
484 | 481 | } |
485 | 482 | |