jenkins-bot has submitted this change and it was merged.

Change subject: EditPage: Allow the 'save' button's label to be 'publish' for 
public wikis
......................................................................


EditPage: Allow the 'save' button's label to be 'publish' for public wikis

Default remains 'save xyz', at least for now.

Bug: T131132
Change-Id: I56634ed223778a0650cf36ac7256151b13c494f1
---
M includes/DefaultSettings.php
M includes/EditPage.php
2 files changed, 15 insertions(+), 1 deletion(-)

Approvals:
  Catrope: Looks good to me, approved
  Jforrester: Looks good to me, but someone else must approve
  jenkins-bot: Verified



diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php
index b8e1486..54c7218 100644
--- a/includes/DefaultSettings.php
+++ b/includes/DefaultSettings.php
@@ -3196,6 +3196,15 @@
 $wgUseMediaWikiUIEverywhere = false;
 
 /**
+ * Whether to label the store-to-database-and-show-to-others button in the 
editor
+ * as "Save page"/"Save changes" if false (the default) or, if true, instead as
+ * "Publish page"/"Publish changes".
+ *
+ * @since 1.28
+ */
+$wgEditButtonPublishNotSave = false;
+
+/**
  * Permit other namespaces in addition to the w3.org default.
  *
  * Use the prefix for the key and the namespace for the value.
diff --git a/includes/EditPage.php b/includes/EditPage.php
index 7f94140..78455fb 100644
--- a/includes/EditPage.php
+++ b/includes/EditPage.php
@@ -4032,7 +4032,12 @@
        public function getEditButtons( &$tabindex ) {
                $buttons = [];
 
-               $buttonLabelKey = $this->isNew ? 'savearticle' : 'savechanges';
+               $labelAsPublish = 
$this->mArticle->getContext()->getConfig()->get( 'EditButtonPublishNotSave' );
+               if ( $labelAsPublish ) {
+                       $buttonLabelKey = $this->isNew ? 'publishpage' : 
'publishchanges';
+               } else {
+                       $buttonLabelKey = $this->isNew ? 'savearticle' : 
'savechanges';
+               }
                $buttonLabel = wfMessage( $buttonLabelKey )->text();
                $attribs = [
                        'id' => 'wpSave',

-- 
To view, visit https://gerrit.wikimedia.org/r/296719
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I56634ed223778a0650cf36ac7256151b13c494f1
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Jforrester <jforres...@wikimedia.org>
Gerrit-Reviewer: Catrope <roan.katt...@gmail.com>
Gerrit-Reviewer: Jackmcbarn <jackmcb...@gmail.com>
Gerrit-Reviewer: Jforrester <jforres...@wikimedia.org>
Gerrit-Reviewer: Legoktm <legoktm.wikipe...@gmail.com>
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

Reply via email to