16 public function __construct() {
17 parent::__construct(
'PageMigration',
'pagetranslation' );
20 protected function getGroupName() {
24 public function getDescription() {
25 return $this->msg(
'pagemigration' );
28 public function execute( $par ) {
29 $output = $this->getOutput();
31 $this->checkPermissions();
32 $this->addHelpLink(
'Help:Extension:Translate/Page translation administration' );
33 $this->outputHeader(
'pagemigration-summary' );
34 $output->addModules(
'ext.translate.special.pagemigration' );
35 $output->addModuleStyles( [
36 'ext.translate.specialpages.styles',
38 'mediawiki.codex.messagebox.styles',
44 $out .= Html::openElement(
'div', [
'class' =>
'mw-tpm-sp-container grid' ] );
45 $out .= Html::openElement(
'div', [
'class' =>
'mw-tpm-sp-error row',
46 'id' =>
'mw-tpm-sp-error-div' ] );
47 $out .= Html::element(
'div',
48 [
'class' =>
'mw-tpm-sp-error__message five columns hide' ] );
49 $out .= Html::closeElement(
'div' );
50 $out .= Html::openElement(
'form', [
'class' =>
'mw-tpm-sp-form row',
51 'id' =>
'mw-tpm-sp-primary-form',
'action' =>
'' ] );
52 $out .= Html::element(
'input', [
'id' =>
'pm-summary',
'type' =>
'hidden',
53 'value' => $this->msg(
'pm-summary-import' )->inContentLanguage()->text() ] );
55 $out .= Html::element(
'input', [
'id' =>
'title',
'class' =>
'mw-searchInput mw-ui-input',
56 'data-mw-searchsuggest' => FormatJson::encode( [
58 ] ),
'placeholder' => $this->msg(
'pm-pagetitle-placeholder' )->text() ] );
60 $out .= Html::element(
'input', [
'id' =>
'action-import',
61 'class' =>
'mw-ui-button mw-ui-progressive',
'type' =>
'button',
62 'value' => $this->msg(
'pm-import-button-label' )->text() ] );
64 $out .= Html::element(
'input', [
'id' =>
'action-save',
65 'class' =>
'mw-ui-button mw-ui-progressive hide',
'type' =>
'button',
66 'value' => $this->msg(
'pm-savepages-button-label' )->text() ] );
68 $out .= Html::element(
'input', [
'id' =>
'action-cancel',
69 'class' =>
'mw-ui-button mw-ui-quiet hide',
'type' =>
'button',
70 'value' => $this->msg(
'pm-cancel-button-label' )->text() ] );
71 $out .= Html::closeElement(
'form' );
72 $out .= Html::element(
'div', [
'class' =>
'mw-tpm-sp-instructions hide' ] );
73 $out .= Html::rawElement(
'div', [
'class' =>
'mw-tpm-sp-unit-listing' ] );
74 $out .= Html::closeElement(
'div' );
76 $output->addHTML( $out );
79 $this->msg(
'tux-nojs' )->escaped(),