From: jenkins-bot Date: Wed, 24 Aug 2016 00:14:38 +0000 (+0000) Subject: Merge "EditPage: Show a different label for the button on create vs. modify" X-Git-Tag: 1.31.0-rc.0~5923 X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=commitdiff_plain;h=99dbf4e1d4d7f18e02935bdb8cd3be4413ffe729;hp=bdc664e4eadfebdd6574cf0dc49deb0672c0d668 Merge "EditPage: Show a different label for the button on create vs. modify" --- diff --git a/includes/EditPage.php b/includes/EditPage.php index 7dedac4d2b..da35fb5362 100644 --- a/includes/EditPage.php +++ b/includes/EditPage.php @@ -4050,13 +4050,14 @@ HTML 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 = [