jenkins-bot has submitted this change and it was merged. Change subject: Replace hardcoded square brackets by message brackets ......................................................................
Replace hardcoded square brackets by message brackets * Rename $temp into $attribs Change-Id: Id8792f9e6d0de6460a5c6a4ae34b8a745fe2409e --- M includes/EditPage.php 1 file changed, 9 insertions(+), 21 deletions(-) Approvals: IAlex: Looks good to me, approved Umherirrender: Looks good to me, but someone else must approve jenkins-bot: Verified diff --git a/includes/EditPage.php b/includes/EditPage.php index 03e50fc..3d57e95 100644 --- a/includes/EditPage.php +++ b/includes/EditPage.php @@ -3839,46 +3839,34 @@ public function getEditButtons( &$tabindex ) { $buttons = array(); - // @todo FIXME: Hardcoded square brackets. - $temp = array( + $attribs = array( 'id' => 'wpSave', 'name' => 'wpSave', 'type' => 'submit', 'tabindex' => ++$tabindex, 'value' => wfMessage( 'savearticle' )->text(), - 'accesskey' => wfMessage( 'accesskey-save' )->text(), - 'title' => wfMessage( 'tooltip-save' )->text() - . ' [' . wfMessage( 'accesskey-save' )->text() . ']', - ); - $buttons['save'] = Xml::element( 'input', $temp, '' ); + ) + Linker::tooltipAndAccesskeyAttribs( 'save' ); + $buttons['save'] = Xml::element( 'input', $attribs, '' ); ++$tabindex; // use the same for preview and live preview - // @todo FIXME: Hardcoded square brackets. - $temp = array( + $attribs = array( 'id' => 'wpPreview', 'name' => 'wpPreview', 'type' => 'submit', 'tabindex' => $tabindex, 'value' => wfMessage( 'showpreview' )->text(), - 'accesskey' => wfMessage( 'accesskey-preview' )->text(), - 'title' => wfMessage( 'tooltip-preview' )->text() - . ' [' . wfMessage( 'accesskey-preview' )->text() . ']', - ); - $buttons['preview'] = Xml::element( 'input', $temp, '' ); + ) + Linker::tooltipAndAccesskeyAttribs( 'preview' ); + $buttons['preview'] = Xml::element( 'input', $attribs, '' ); $buttons['live'] = ''; - // @todo FIXME: Hardcoded square brackets. - $temp = array( + $attribs = array( 'id' => 'wpDiff', 'name' => 'wpDiff', 'type' => 'submit', 'tabindex' => ++$tabindex, 'value' => wfMessage( 'showdiff' )->text(), - 'accesskey' => wfMessage( 'accesskey-diff' )->text(), - 'title' => wfMessage( 'tooltip-diff' )->text() - . ' [' . wfMessage( 'accesskey-diff' )->text() . ']', - ); - $buttons['diff'] = Xml::element( 'input', $temp, '' ); + ) + Linker::tooltipAndAccesskeyAttribs( 'diff' ); + $buttons['diff'] = Xml::element( 'input', $attribs, '' ); wfRunHooks( 'EditPageBeforeEditButtons', array( &$this, &$buttons, &$tabindex ) ); return $buttons; -- To view, visit https://gerrit.wikimedia.org/r/138896 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Id8792f9e6d0de6460a5c6a4ae34b8a745fe2409e Gerrit-PatchSet: 3 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Gerrit Patch Uploader <gerritpatchuploa...@gmail.com> Gerrit-Reviewer: Gerrit Patch Uploader <gerritpatchuploa...@gmail.com> Gerrit-Reviewer: IAlex <coderev...@emsenhuber.ch> Gerrit-Reviewer: Siebrand <siebr...@kitano.nl> Gerrit-Reviewer: Umherirrender <umherirrender_de...@web.de> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits