Index: trunk/extensions/Translate/TranslateEditAddons.php |
— | — | @@ -58,8 +58,8 @@ |
59 | 59 | if ( isset( $keys[$index+1] ) ) { |
60 | 60 | $next = $keys[$index+1]; |
61 | 61 | } |
62 | | - |
63 | 62 | |
| 63 | + |
64 | 64 | $id = $group->getId(); |
65 | 65 | $ns = $title->getNamespace(); |
66 | 66 | |
— | — | @@ -408,39 +408,6 @@ |
409 | 409 | return true; |
410 | 410 | } |
411 | 411 | |
412 | | - public static function customDisplay( $article, &$content ) { |
413 | | - global $wgRequest, $wgTitle; |
414 | | - if ( |
415 | | - $wgRequest->getVal( 'action' ) !== 'edit' && |
416 | | - $wgTitle instanceof Title && $article->getTitle()->equals( $wgTitle ) && |
417 | | - self::isMessageNamespace( $article->getTitle() ) ) |
418 | | - { |
419 | | - list( $key, $code, $group ) = self::getKeyCodeGroup( $article->getTitle() ); |
420 | | - if ( !$group ) return true; |
421 | | - |
422 | | - $def = self::preserveWhitespaces( $group->getMessage( $key, 'en' ) ); |
423 | | - $content = self::preserveWhitespaces( $content ); |
424 | | - |
425 | | - $deftext = wfMsgNoTrans( 'translate-edit-show-def' ); |
426 | | - $trans = wfMsgNoTrans( 'translate-edit-show-trans' ); |
427 | | - $click = htmlspecialchars( wfMsgNoTrans( 'translate-edit-show-click' ) ); |
428 | | - |
429 | | - $content = <<<HTML |
430 | | -<table class="wikitable translationdisplay" id=tt1 title="$click"> |
431 | | - <tr><th>$deftext</th><th>$trans</th></tr> |
432 | | - <tr><td style=vertical-align:top>$def</td><td style=vertical-align:top>$content</td></tr> |
433 | | -</table> |
434 | | -<table class="wikitable translationdisplay" id=tt2 title="$click" style=display:none> |
435 | | - <tr><th>$deftext</th></tr> |
436 | | - <tr><td style=vertical-align:top>$def</td></tr> |
437 | | - <tr><th>$trans</th></tr> |
438 | | - <tr><td style=vertical-align:top>$content</td></tr> |
439 | | -</table> |
440 | | -HTML; |
441 | | - } |
442 | | - return true; |
443 | | - } |
444 | | - |
445 | 412 | public static function preserveWhitespaces( $text ) { |
446 | 413 | $text = wfEscapeWikiText( $text ); |
447 | 414 | $text = preg_replace( '/^ /m', ' ', $text ); |
Index: trunk/extensions/Translate/Translate.php |
— | — | @@ -89,7 +89,6 @@ |
90 | 90 | $wgHooks['EditPageBeforeEditButtons'][] = 'TranslateEditAddons::buttonHack'; |
91 | 91 | $wgHooks['EditPage::showEditForm:fields'][] = 'TranslateEditAddons::keepFields'; |
92 | 92 | $wgHooks['SkinTemplateTabs'][] = 'TranslateEditAddons::tabs'; |
93 | | -$wgHooks['ArticleAfterFetchContent'][] = 'TranslateEditAddons::customDisplay'; |
94 | 93 | $wgHooks['ParserBeforeStrip'][] = 'TranslateEditAddons::injectTranslationDisplayJs'; |
95 | 94 | $wgHooks['LanguageGetTranslatedLanguageNames'][] = 'TranslateEditAddons::translateMessageDocumentationLanguage'; |
96 | 95 | $wgHooks['ArticlePrepareTextForEdit'][] = 'TranslateEditAddons::disablePreSaveTransform'; |