jenkins-bot has submitted this change and it was merged.

Change subject: Add Special:ExportTranslations
......................................................................


Add Special:ExportTranslations

Previously exporting of translations lived within Special:Translate.
As a first step for refactoring Special:Translate (T136854), export related
code has been removed from Special:Translate and a dedicated special page,
Special:ExportTranslations, for exporting translations has been introduced.
Export related TranslateTasks has been removed and validation errors are now
shown on the special page itself. Redirects from Special:Translate to
Special:ExportTranslations has been set up to not break old URLs.

Bug: T49072
Change-Id: Ic75a4cb135a78f77e47731dfa25c530937b6322a
---
M Autoload.php
M Translate.alias.php
M Translate.php
M TranslateHooks.php
M TranslateTasks.php
M i18n/core/en.json
M i18n/core/qqq.json
A specials/SpecialExportTranslations.php
M specials/SpecialTranslate.php
M tag/PageTranslationHooks.php
10 files changed, 281 insertions(+), 162 deletions(-)

Approvals:
  Nikerabbit: Checked; Looks good to me, approved
  jenkins-bot: Verified



diff --git a/Autoload.php b/Autoload.php
index 20ef49c..0f12e88 100644
--- a/Autoload.php
+++ b/Autoload.php
@@ -38,6 +38,7 @@
  */
 $al['SpecialAggregateGroups'] = "$dir/specials/SpecialAggregateGroups.php";
 $al['SpecialImportTranslations'] = 
"$dir/specials/SpecialImportTranslations.php";
+$al['SpecialExportTranslations'] = 
"$dir/specials/SpecialExportTranslations.php";
 $al['SpecialLanguageStats'] = "$dir/specials/SpecialLanguageStats.php";
 $al['SpecialMagic'] = "$dir/specials/SpecialMagic.php";
 $al['SpecialManageGroups'] = "$dir/specials/SpecialManageGroups.php";
@@ -223,9 +224,6 @@
  */
 $al['AcceptQueueMessagesTask'] = "$dir/TranslateTasks.php";
 $al['CustomFilteredMessagesTask'] = "$dir/TranslateTasks.php";
-$al['ExportAsPoMessagesTask'] = "$dir/TranslateTasks.php";
-$al['ExportMessagesTask'] = "$dir/TranslateTasks.php";
-$al['ExportToFileMessagesTask'] = "$dir/TranslateTasks.php";
 $al['ReviewAllMessagesTask'] = "$dir/TranslateTasks.php";
 $al['ReviewMessagesTask'] = "$dir/TranslateTasks.php";
 $al['TranslateTask'] = "$dir/TranslateTasks.php";
diff --git a/Translate.alias.php b/Translate.alias.php
index 6d8610d..e3dda66 100644
--- a/Translate.alias.php
+++ b/Translate.alias.php
@@ -13,6 +13,7 @@
 $specialPageAliases['en'] = array(
        'AggregateGroups' => array( 'AggregateGroups' ),
        'ImportTranslations' => array( 'ImportTranslations' ),
+       'ExportTranslations' => array( 'ExportTranslations' ),
        'LanguageStats' => array( 'LanguageStats' ),
        'Magic' => array( 'AdvancedTranslate', 'Magic' ),
        'ManageMessageGroups' => array( 'ManageMessageGroups' ),
@@ -1175,4 +1176,4 @@
        'Translations' => array( '翻譯清單' ),
        'PageMigration' => array( '頁面轉移' ),
        'PagePreparation' => array( '頁面準備' ),
-);
\ No newline at end of file
+);
diff --git a/Translate.php b/Translate.php
index 13feaad..55e8df8 100644
--- a/Translate.php
+++ b/Translate.php
@@ -76,6 +76,7 @@
 $wgSpecialPages['LanguageStats'] = 'SpecialLanguageStats';
 $wgSpecialPages['MessageGroupStats'] = 'SpecialMessageGroupStats';
 $wgSpecialPages['ImportTranslations'] = 'SpecialImportTranslations';
+$wgSpecialPages['ExportTranslations'] = 'SpecialExportTranslations';
 $wgSpecialPages['ManageMessageGroups'] = 'SpecialManageGroups';
 $wgSpecialPages['SupportedLanguages'] = 'SpecialSupportedLanguages';
 $wgSpecialPages['AggregateGroups'] = 'SpecialAggregateGroups';
@@ -302,8 +303,6 @@
        'optional' => 'ViewOptionalTask',
        'acceptqueue' => 'AcceptQueueMessagesTask',
        'reviewall' => 'ReviewAllMessagesTask',
-       'export-as-po' => 'ExportasPoMessagesTask',
-       'export-to-file' => 'ExportToFileMessagesTask',
        'custom' => 'CustomFilteredMessagesTask',
 );
 
diff --git a/TranslateHooks.php b/TranslateHooks.php
index b9f8458..011a273 100644
--- a/TranslateHooks.php
+++ b/TranslateHooks.php
@@ -185,9 +185,6 @@
                        // Replace subpage logic behavior
                        $wgHooks['SkinSubPageSubtitle'][] = 
'PageTranslationHooks::replaceSubtitle';
 
-                       // Show page source code when export tab is opened
-                       $wgHooks['SpecialTranslate::executeTask'][] = 
'PageTranslationHooks::sourceExport';
-
                        // Replaced edit tab with translation tab for 
translation pages
                        $wgHooks['SkinTemplateNavigation'][] = 
'PageTranslationHooks::translateTab';
 
diff --git a/TranslateTasks.php b/TranslateTasks.php
index 559a93b..112eba2 100644
--- a/TranslateTasks.php
+++ b/TranslateTasks.php
@@ -286,101 +286,6 @@
 }
 
 /**
- * Exports messages to their native format with embedded textarea.
- */
-class ExportMessagesTask extends ViewMessagesTask {
-       protected $id = 'export';
-
-       protected function preinit() {
-               $code = $this->options['language'];
-               $this->collection = $this->group->initCollection( $code );
-               // Don't export ignored, unless it is the source language
-               // or message documentation
-               global $wgTranslateDocumentationLanguageCode;
-               if ( $code !== $wgTranslateDocumentationLanguageCode
-                       && $code !== $this->group->getSourceLanguage()
-               ) {
-                       $this->collection->filter( 'ignored' );
-               }
-       }
-
-       // No paging should be done.
-       protected function doPaging() {
-       }
-
-       public function output() {
-               return Html::element(
-                       'textarea',
-                       array( 'id' => 'wpTextbox1', 'rows' => '50' ),
-                       $this->group->getFFS()->writeIntoVariable( 
$this->collection )
-               );
-       }
-}
-
-/**
- * Exports messages to their native format as whole page.
- */
-class ExportToFileMessagesTask extends ExportMessagesTask {
-       protected $id = 'export-to-file';
-
-       public function plainOutput() {
-               return true;
-       }
-
-       public function output() {
-               if ( !$this->group instanceof FileBasedMessageGroup ) {
-                       return 'Not supported';
-               }
-
-               $ffs = $this->group->getFFS();
-               $data = $ffs->writeIntoVariable( $this->collection );
-
-               $filename = basename( $this->group->getSourceFilePath( 
$this->collection->getLanguage() ) );
-               header( "Content-Disposition: attachment; 
filename=\"$filename\"" );
-
-               return $data;
-       }
-}
-
-/**
- * Exports messages as special Gettext format that is suitable for off-line
- * translation with tools that support Gettext. These files can later be
- * imported back to the wiki.
- */
-class ExportAsPoMessagesTask extends ExportMessagesTask {
-       protected $id = 'export-as-po';
-
-       public function plainOutput() {
-               return true;
-       }
-
-       public function output() {
-               if ( MessageGroups::isDynamic( $this->group ) ) {
-                       return 'Not supported';
-               }
-
-               $ffs = null;
-               if ( $this->group instanceof FileBasedMessageGroup ) {
-                       $ffs = $this->group->getFFS();
-               }
-
-               if ( !$ffs instanceof GettextFFS ) {
-                       $group = FileBasedMessageGroup::newFromMessageGroup( 
$this->group );
-                       $ffs = new GettextFFS( $group );
-               }
-
-               $ffs->setOfflineMode( 'true' );
-
-               $code = $this->options['language'];
-               $id = $this->group->getID();
-               $filename = "${id}_$code.po";
-               header( "Content-Disposition: attachment; 
filename=\"$filename\"" );
-
-               return $ffs->writeIntoVariable( $this->collection );
-       }
-}
-
-/**
  * Collection of functions to get tasks.
  */
 class TranslateTasks {
@@ -394,10 +299,7 @@
                global $wgTranslateTasks;
 
                // Tasks not to be available in page translation.
-               $filterTasks = array(
-                       'optional',
-                       'export-to-file',
-               );
+               $filterTasks = array( 'optional', );
 
                $allTasks = array_keys( $wgTranslateTasks );
 
diff --git a/i18n/core/en.json b/i18n/core/en.json
index d652593..96855a0 100644
--- a/i18n/core/en.json
+++ b/i18n/core/en.json
@@ -62,6 +62,11 @@
        "translate-edit-nopermission": "You need translation rights to 
translate messages.",
        "translate-edit-askpermission": "Get permission",
        "translate-edit-tag-warning": "",
+       "exporttranslations": "Export translations",
+       "translate-export-form-format": "Format",
+       "translate-export-invalid-format": "Please specify a valid format.",
+       "translate-export-not-supported": "Translation export is not 
supported.",
+       "translate-export-format-notsupported": "The specified export format is 
not supported by the message group.",
        "translate-magic-pagename": "Extended MediaWiki translation",
        "translate-magic-help": "You can translate special pages aliases, magic 
words and namespace names.\n\nSpecial page aliases and magic words can have 
multiple translations.\nTranslations are separated by a comma (,).\nNamespaces 
can have only one translation.\n\nTranslating the project talk namespace 
<code>$1 talk</code> may be complicated.\n<code>$1</code> is replaced with the 
project sitename (for example <code>{{ns:project_talk}}</code>).\nIf it is not 
possible in your language to form a valid expression without changing the 
sitename, please let us know on [[Support]].\n\nYou need to be a translator to 
save changes.\nChanges are not saved until you click the save button below.",
        "translate-magic-module": "Module:",
diff --git a/i18n/core/qqq.json b/i18n/core/qqq.json
index 56465d4..b5cb1b0 100644
--- a/i18n/core/qqq.json
+++ b/i18n/core/qqq.json
@@ -93,6 +93,11 @@
        "translate-edit-nopermission": "Followed by link text 
{{msg-mw|Translate-edit-askpermission}}.",
        "translate-edit-askpermission": "Used as link text.\n\nPreceded by 
{{msg-mw|Translate-edit-nopermission}}.",
        "translate-edit-tag-warning": "{{notranslate}}\nShown when editing 
translatable pages. Default is empty.",
+       "exporttranslations": "Title of [[Special:ExportTranslations]]",
+       "translate-export-form-format": "Label of form field on 
[[Special:ExportTranslations]].",
+       "translate-export-invalid-format": "Validation error shown on 
[[Special:ExportTranslations]].",
+       "translate-export-not-supported": "Validation error shown on 
[[Special:ExportTranslations]]",
+       "translate-export-format-notsupported": "Validation error shown on 
[[Special:ExportTranslations]]",
        "translate-magic-pagename": "\"Extended\" can as well be understood as 
\"Extra\" or \"Special\" or \"Advanced\". It refers to the translations of 
pieces of text such as names of namespaces or special pages, which are not part 
of normal message or wiki page translation.\n\nUsed in 
{{msg-mw|Translate-magic-cm-updatedusing}}.",
        "translate-magic-help": "Description of 
[[Special:AdvancedTranslate]].\n\n<code>$1</code> is not a parameter; appears 
as is.",
        "translate-magic-module": "Label on drop-down box on 
[[Special:AdvancedTranslate]].\n{{Identical|Module}}",
diff --git a/specials/SpecialExportTranslations.php 
b/specials/SpecialExportTranslations.php
new file mode 100644
index 0000000..1045476
--- /dev/null
+++ b/specials/SpecialExportTranslations.php
@@ -0,0 +1,252 @@
+<?php
+/**
+ * @license GPL-2.0+
+ * @ingroup SpecialPage TranslateSpecialPage
+ */
+class SpecialExportTranslations extends SpecialPage {
+       /** @var string */
+       protected $language;
+
+       /** @var string */
+       protected $format;
+
+       /** @var string */
+       protected $groupId;
+
+       /** @var string[] */
+       public static $validFormats = array( 'export-as-po', 'export-to-file' );
+
+       public function __construct() {
+               parent::__construct( 'ExportTranslations' );
+       }
+
+       /**
+        * @param null|string $par
+        */
+       public function execute( $par ) {
+               $out = $this->getOutput();
+               $request = $this->getRequest();
+               $lang = $this->getLanguage();
+
+               $this->setHeaders();
+
+               $this->groupId = $request->getText( 'group', $par );
+               $this->language = $request->getVal( 'language', 
$lang->getCode() );
+               $this->format = $request->getText( 'format' );
+
+               $this->outputForm();
+
+               if ( $this->groupId ) {
+                       $status = $this->checkInput();
+                       if ( !$status->isGood() ) {
+                               $errors = $out->parse( $status->getWikiText( 
false, false, $lang ) );
+                               $out->addHTML( Html::rawElement( 'div', array( 
'class' => 'error' ), $errors ) );
+                               return;
+                       }
+
+                       $this->doExport();
+               }
+
+       }
+
+       protected function outputForm() {
+               $fields = array(
+                       'group' => array(
+                               'type' => 'select',
+                               'name' => 'group',
+                               'id' => 'group',
+                               'label-message' => 'translate-page-group',
+                               'options' => $this->getGroupOptions(),
+                               'default' => $this->groupId,
+                       ),
+                       'language' => array(
+                               // @todo Apply ULS to this field
+                               'type' => 'select',
+                               'name' => 'language',
+                               'id' => 'language',
+                               'label-message' => 'translate-page-language',
+                               'options' => $this->getLanguageOptions(),
+                               'default' => $this->language,
+                       ),
+                       'format' => array(
+                               'type' => 'radio',
+                               'name' => 'format',
+                               'id' => 'format',
+                               'label-message' => 
'translate-export-form-format',
+                               'flatlist' => true,
+                               'options' => $this->getFormatOptions(),
+                               'default' => $this->format,
+                       ),
+               );
+               $form = HTMLForm::factory( 'table', $fields, 
$this->getContext() );
+               $form
+                       ->setMethod( 'get' )
+                       ->setWrapperLegendMsg( 'translate-page-settings-legend' 
)
+                       ->setSubmitTextMsg( 'translate-submit' )
+                       ->prepareForm()
+                       ->displayForm( false );
+       }
+
+       /**
+        * @return array
+        */
+       protected function getGroupOptions() {
+               $selected = $this->groupId;
+               $groups = MessageGroups::getAllGroups();
+               uasort( $groups, array( 'MessageGroups', 'groupLabelSort' ) );
+
+               $options = array();
+               foreach ( $groups as $id => $group ) {
+                       if ( !$group->exists()
+                               || ( MessageGroups::getPriority( $group ) === 
'discouraged' && $id !== $selected )
+                       ) {
+                               continue;
+                       }
+
+                       $options[$group->getLabel()] = $id;
+               }
+
+               return $options;
+       }
+
+       /**
+        * @return array
+        */
+       protected function getLanguageOptions() {
+               $languages = TranslateUtils::getLanguageNames( 'en' );
+               $options = array();
+               foreach ( $languages as $code => $name ) {
+                       $options["$code - $name"] = $code;
+               }
+
+               return $options;
+       }
+
+       /**
+        * @return array
+        */
+       protected function getFormatOptions() {
+               $options = array();
+               foreach ( self::$validFormats as $format ) {
+                       // translate-taskui-export-to-file, 
translate-taskui-export-as-po
+                       $options[ $this->msg( "translate-taskui-$format" 
)->escaped() ] = $format;
+               }
+               return $options;
+       }
+
+       /**
+        * @return Status
+        */
+       protected function checkInput() {
+               $status = Status::newGood();
+
+               $msgGroup = MessageGroups::getGroup( $this->groupId );
+               if ( $msgGroup === null ) {
+                       $status->fatal( 'translate-page-no-such-group' );
+               } elseif ( MessageGroups::isDynamic( $msgGroup ) ) {
+                       $status->fatal( 'translate-export-not-supported' );
+               }
+
+               $langNames = TranslateUtils::getLanguageNames( 'en' );
+               if ( !isset( $langNames[$this->language] ) ) {
+                       $status->fatal( 'translate-page-no-such-language' );
+               }
+
+               // Do not show this error if no/invalid format is specified for 
translatable
+               // page groups as we can show a textarea box containing the 
translation page text
+               // (however it's not currently supported for other groups).
+               if ( !$msgGroup instanceof WikiPageMessageGroup
+                       && !in_array( $this->format, self::$validFormats )
+               ) {
+                       $status->fatal( 'translate-export-invalid-format' );
+               }
+
+               if ( $this->format === 'export-to-file'
+                       && !$msgGroup instanceof FileBasedMessageGroup
+               ) {
+                       $status->fatal( 'translate-export-format-notsupported' 
);
+               }
+
+               return $status;
+       }
+
+       protected function doExport() {
+               $out = $this->getOutput();
+               $group = MessageGroups::getGroup( $this->groupId );
+               $collection = $this->setupCollection( $group );
+
+               switch ( $this->format ) {
+                       case 'export-as-po':
+                               $out->disable();
+
+                               $ffs = null;
+                               if ( $group instanceof FileBasedMessageGroup ) {
+                                       $ffs = $group->getFFS();
+                               }
+
+                               if ( !$ffs instanceof GettextFFS ) {
+                                       $group = 
FileBasedMessageGroup::newFromMessageGroup( $group );
+                                       $ffs = new GettextFFS( $group );
+                               }
+
+                               $ffs->setOfflineMode( true );
+
+                               $filename = 
"{$group->getId()}_{$this->language}.po";
+                               header( "Content-Disposition: attachment; 
filename=\"$filename\"" );
+
+                               echo $ffs->writeIntoVariable( $collection );
+                               break;
+
+                       case 'export-to-file':
+                               $out->disable();
+
+                               $data = $group->getFFS()->writeIntoVariable( 
$collection );
+                               $filename = basename( 
$group->getSourceFilePath( $collection->getLanguage() ) );
+                               header( "Content-Disposition: attachment; 
filename=\"$filename\"" );
+
+                               echo $data;
+                               break;
+
+                       default:
+                               // @todo Add web viewing for groups other than 
WikiPageMessageGroup
+                               $pageTranslation = $this->getConfig()->get( 
'EnablePageTranslation' );
+                               if ( $pageTranslation && $group instanceof 
WikiPageMessageGroup ) {
+                                       $collection->loadTranslations();
+                                       $page = TranslatablePage::newFromTitle( 
$group->getTitle() );
+                                       $text = 
$page->getParse()->getTranslationPageText( $collection );
+                                       $displayTitle = 
$page->getPageDisplayTitle( $this->language );
+                                       if ( $displayTitle ) {
+                                               $text = 
"{{DISPLAYTITLE:$displayTitle}}$text";
+                                       }
+                                       $box = Html::element(
+                                               'textarea',
+                                               array( 'id' => 'wpTextbox', 
'rows' => 40, ),
+                                               $text
+                                       );
+                                       $out->addHTML( $box );
+                                       return;
+                               }
+
+                               // This should have been prevented at 
validation. See checkInput().
+                               throw new Exception( 'Unexpected export 
format.' );
+               }
+       }
+
+       private function setupCollection( MessageGroup $group ) {
+               $collection = $group->initCollection( $this->language );
+
+               // Don't export ignored, unless it is the source language or 
message documentation
+               $translateDocCode = $this->getConfig()->get( 
'TranslateDocumentationLanguageCode' );
+               if ( $this->language !== $translateDocCode
+                       && $this->language !== $group->getSourceLanguage()
+               ) {
+                       $collection->filter( 'ignored' );
+               }
+
+               return $collection;
+       }
+
+       protected function getGroupName() {
+               return 'wiki';
+       }
+}
diff --git a/specials/SpecialTranslate.php b/specials/SpecialTranslate.php
index 3fd3cf6..5775dde 100644
--- a/specials/SpecialTranslate.php
+++ b/specials/SpecialTranslate.php
@@ -85,7 +85,7 @@
 
                $errors = $this->getFormErrors();
 
-               if ( $isBeta && $this->options['taction'] !== 'export' ) {
+               if ( $isBeta ) {
                        $out->addModules( 'ext.translate.special.translate' );
 
                        $out->addHTML( Html::openElement( 'div', array(
@@ -335,7 +335,14 @@
                                        $defaults['task'] = 'reviewall';
                                }
                        } elseif ( $nondefaults['taction'] === 'export' ) {
-                               $defaults['task'] = '';
+                               // Redirect old export URLs to 
Special:ExportTranslations
+                               $params = array(
+                                'group' => $nondefaults['group'],
+                                'language' => $nondefaults['language'],
+                                'format' => $nondefaults['task'],
+                               );
+                               $export = SpecialPage::getTitleFor( 
'ExportTranslations' )->getLocalURL( $params );
+                               $this->getOutput()->redirect( $export );
                        }
                }
 
@@ -421,10 +428,6 @@
                        'limit' => $this->limitSelector(),
                );
 
-               if ( $taction === 'export' ) {
-                       unset( $selectors['limit'] );
-               }
-
                $options = array();
                foreach ( $selectors as $g => $selector ) {
                        // Give grep a chance to find the usages:
@@ -440,8 +443,6 @@
                        $extra = $this->taskLinks( array( 'acceptqueue', 
'reviewall' ) );
                } elseif ( $taction === 'translate' ) {
                        $extra = $this->taskLinks( array( 'view', 
'untranslated', 'optional' ) );
-               } elseif ( $taction === 'export' ) {
-                       $extra = $this->taskLinks( array( 'export-as-po', 
'export-to-file' ) );
                } else {
                        $extra = '';
                }
@@ -705,7 +706,6 @@
                        // Give grep a chance to find the usages:
                        // translate-taskui-view, 
translate-taskui-untranslated, translate-taskui-optional,
                        // translate-taskui-acceptqueue, 
translate-taskui-reviewall,
-                       // translate-taskui-export-to-file, 
translate-taskui-export-as-po
                        return $sep . Html::rawElement( 'label', array(),
                                Xml::radio( 'task', $id, true ) . ' ' .
                                        $this->msg( "translate-taskui-$id" 
)->escaped()
@@ -717,7 +717,6 @@
                                // Give grep a chance to find the usages:
                                // translate-taskui-view, 
translate-taskui-untranslated, translate-taskui-optional,
                                // translate-taskui-acceptqueue, 
translate-taskui-reviewall,
-                               // translate-taskui-export-to-file, 
translate-taskui-export-as-po
                                $output .= Html::rawElement( 'label', array(),
                                        Xml::radio( 'task', $id, 
$this->options['task'] === $id ) . ' ' .
                                                $this->msg( 
"translate-taskui-$id" )->escaped()
@@ -902,26 +901,11 @@
                        $tabs['views']['mstats']['class'] .= ' selected';
                }
 
-               // Kind of hackish, but works for now
-               global $wgTranslateTasks;
-               foreach ( array_keys( $wgTranslateTasks ) as $taskname ) {
-                       if ( !preg_match( '/^export-/', $taskname ) ) {
-                               continue;
-                       }
-
-                       $tabs['views']['export'] = array(
-                               'text' => wfMessage( 'translate-taction-export' 
)->text(),
-                               'href' => $translate->getLocalURL( array( 
'taction' => 'export' ) + $params ),
-                               'class' => 'tux-tab',
-                       );
-
-                       if ( $alias === 'Translate' && $taction === 'export' ) {
-                               $tabs['views']['export']['class'] .= ' 
selected';
-                       }
-
-                       // We only need the tab to apper once ;)
-                       break;
-               }
+               $tabs['views']['export'] = array(
+                       'text' => wfMessage( 'translate-taction-export' 
)->text(),
+                       'href' => SpecialPage::getTitleFor( 
'ExportTranslations' )->getLocalURL( $params ),
+                       'class' => 'tux-tab',
+               );
 
                return true;
        }
diff --git a/tag/PageTranslationHooks.php b/tag/PageTranslationHooks.php
index 508343f..4327a47 100644
--- a/tag/PageTranslationHooks.php
+++ b/tag/PageTranslationHooks.php
@@ -859,30 +859,6 @@
                return true;
        }
 
-       /// Hook: SpecialTranslate::executeTask
-       public static function sourceExport( RequestContext $context,
-               TranslateTask $task = null, MessageGroup $group, array $options
-       ) {
-               if ( $task || $options['taction'] !== 'export'
-                       || !$group instanceof WikiPageMessageGroup
-               ) {
-                       return true;
-               }
-
-               $page = TranslatablePage::newFromTitle( $group->getTitle() );
-               $collection = $group->initCollection( $options['language'] );
-               $collection->loadTranslations();
-               $text = $page->getParse()->getTranslationPageText( $collection 
);
-               $display = $page->getPageDisplayTitle( $options['language'] );
-               if ( $display ) {
-                       $text = "{{DISPLAYTITLE:$display}}$text";
-               }
-               $output = Html::element( 'textarea', array( 'rows' => 25 ), 
$text );
-               $context->getOutput()->addHTML( $output );
-
-               return false;
-       }
-
        /**
         * Converts the edit tab (if exists) for translation pages to translate 
tab.
         * Hook: SkinTemplateNavigation

-- 
To view, visit https://gerrit.wikimedia.org/r/296171
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic75a4cb135a78f77e47731dfa25c530937b6322a
Gerrit-PatchSet: 14
Gerrit-Project: mediawiki/extensions/Translate
Gerrit-Branch: master
Gerrit-Owner: Glaisher <glaisher.w...@gmail.com>
Gerrit-Reviewer: Glaisher <glaisher.w...@gmail.com>
Gerrit-Reviewer: Nikerabbit <niklas.laxst...@gmail.com>
Gerrit-Reviewer: Siebrand <siebr...@kitano.nl>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to