16 public function __construct() {
17 parent::__construct(
'PagePreparation',
'pagetranslation' );
20 protected function getGroupName() {
24 public function execute( $par ) {
25 $request = $this->getRequest();
26 $output = $this->getOutput();
28 $this->checkPermissions();
29 $this->outputHeader();
30 $inputValue = htmlspecialchars( $request->getText(
'page', $par ) );
31 $pagenamePlaceholder = $this->msg(
'pp-pagename-placeholder' )->escaped();
32 $prepareButtonValue = $this->msg(
'pp-prepare-button-label' )->escaped();
33 $saveButtonValue = $this->msg(
'pp-save-button-label' )->escaped();
34 $cancelButtonValue = $this->msg(
'pp-cancel-button-label' )->escaped();
35 $summaryValue = $this->msg(
'pp-save-summary' )->inContentLanguage()->escaped();
36 $output->addModules(
'ext.translate.special.pagepreparation' );
37 $output->addModuleStyles( [
38 'ext.translate.specialpages.styles',
43 $diff =
new DifferenceEngine( $this->getContext() );
44 $diffHeader = $diff->addHeader(
' ', $this->msg(
'pp-diff-old-header' )->escaped(),
45 $this->msg(
'pp-diff-new-header' )->escaped() );
48<div
class=
"mw-tpp-sp-container grid">
49 <form
class=
"mw-tpp-sp-form row" name=
"mw-tpp-sp-input-form" action=
"">
50 <input
id=
"pp-summary" type=
"hidden" value=
"{$summaryValue}" />
51 <input name=
"page" id=
"page" class=
"mw-searchInput mw-ui-input"
52 placeholder=
"{$pagenamePlaceholder}" value=
"{$inputValue}"/>
53 <button
id=
"action-prepare" class=
"mw-ui-button mw-ui-progressive" type=
"button">
54 {$prepareButtonValue}</button>
55 <button
id=
"action-save" class=
"mw-ui-button mw-ui-progressive hide" type=
"button">
56 {$saveButtonValue}</button>
57 <button
id=
"action-cancel" class=
"mw-ui-button mw-ui-quiet hide" type=
"button">
58 {$cancelButtonValue}</button>
60 <div
class=
"messageDiv hide"></div>
61 <div
class=
"divDiff hide">
66 $output->addHTML( $out );
69 $this->msg(
'tux-nojs' )->plain(),