jenkins-bot has submitted this change and it was merged. Change subject: EditPage: Show a different label for the button on create vs. modify ......................................................................
EditPage: Show a different label for the button on create vs. modify This is exceedingly common in CMS software, and it was noted in the work on T131132 that MediaWiki is unusual in not differentiating these cases. Bug: T139033 Change-Id: Ie81b5edd275963a965cd44d0fd325cae9ee2f1a6 --- M includes/EditPage.php 1 file changed, 3 insertions(+), 2 deletions(-) Approvals: Catrope: Looks good to me, approved Jforrester: Looks good to me, but someone else must approve jenkins-bot: Verified diff --git a/includes/EditPage.php b/includes/EditPage.php index 2a80ea6..7f94140 100644 --- a/includes/EditPage.php +++ b/includes/EditPage.php @@ -4032,13 +4032,14 @@ public function getEditButtons( &$tabindex ) { $buttons = []; + $buttonLabelKey = $this->isNew ? 'savearticle' : 'savechanges'; + $buttonLabel = wfMessage( $buttonLabelKey )->text(); $attribs = [ 'id' => 'wpSave', 'name' => 'wpSave', 'tabindex' => ++$tabindex, ] + Linker::tooltipAndAccesskeyAttribs( 'save' ); - $buttons['save'] = Html::submitButton( wfMessage( 'savearticle' )->text(), - $attribs, [ 'mw-ui-constructive' ] ); + $buttons['save'] = Html::submitButton( $buttonLabel, $attribs, [ 'mw-ui-constructive' ] ); ++$tabindex; // use the same for preview and live preview $attribs = [ -- To view, visit https://gerrit.wikimedia.org/r/296718 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie81b5edd275963a965cd44d0fd325cae9ee2f1a6 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Jforrester <jforres...@wikimedia.org> Gerrit-Reviewer: Catrope <roan.katt...@gmail.com> Gerrit-Reviewer: Esanders <esand...@wikimedia.org> Gerrit-Reviewer: Jackmcbarn <jackmcb...@gmail.com> Gerrit-Reviewer: Jforrester <jforres...@wikimedia.org> Gerrit-Reviewer: Tpt <thoma...@hotmail.fr> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits