jenkins-bot has submitted this change and it was merged.
Change subject: EditPage: Implement 'editnotice-notext' message
......................................................................
EditPage: Implement 'editnotice-notext' message
Bug: T91715
Change-Id: Iff6735d93da8b877063690ff67bda652a03d4906
---
M RELEASE-NOTES-1.25
M includes/EditPage.php
M languages/i18n/en.json
M languages/i18n/qqq.json
4 files changed, 17 insertions(+), 1 deletion(-)
Approvals:
Krinkle: Looks good to me, but someone else must approve
Jforrester: Looks good to me, approved
jenkins-bot: Verified
diff --git a/RELEASE-NOTES-1.25 b/RELEASE-NOTES-1.25
index 5e08efd..e657239 100644
--- a/RELEASE-NOTES-1.25
+++ b/RELEASE-NOTES-1.25
@@ -115,6 +115,8 @@
interface, reachable via IContextSource::getStats().
* Move the jQuery Client library from being mastered in MediaWiki as v0.1.0 to
a
proper, published library, which is now tagged as v1.0.0.
+* A new message (defaulting to blank), 'editnotice-notext', can be shown to
users
+ when they are editing if no edit notices apply to the page being edited.
==== External libraries ====
* MediaWiki now requires certain external libraries to be installed. In the
past
diff --git a/includes/EditPage.php b/includes/EditPage.php
index a8a17cf..e9a5ef9 100644
--- a/includes/EditPage.php
+++ b/includes/EditPage.php
@@ -2555,7 +2555,19 @@
}
// Add edit notices
- $wgOut->addHTML( implode( "\n", $this->mTitle->getEditNotices(
$this->oldid ) ) );
+ $editNotices = $this->mTitle->getEditNotices( $this->oldid );
+ if ( count( $editNotices ) ) {
+ $wgOut->addHTML( implode( "\n", $editNotices ) );
+ } else {
+ $msg = wfMessage( 'editnotice-notext' );
+ if ( !$msg->isDisabled() ) {
+ $wgOut->addHTML(
+ '<div class="mw-editnotice-notext">'
+ . $msg->parseAsBlock()
+ . '</div>'
+ );
+ }
+ }
if ( $this->isConflict ) {
$wgOut->wrapWikiMsg( "<div
class='mw-explainconflict'>\n$1\n</div>", 'explainconflict' );
diff --git a/languages/i18n/en.json b/languages/i18n/en.json
index a81a89e..8d98ccd 100644
--- a/languages/i18n/en.json
+++ b/languages/i18n/en.json
@@ -645,6 +645,7 @@
"editingsection": "Editing $1 (section)",
"editingcomment": "Editing $1 (new section)",
"editconflict": "Edit conflict: $1",
+ "editnotice-notext": "-",
"explainconflict": "Someone else has changed this page since you
started editing it.\nThe upper text area contains the page text as it currently
exists.\nYour changes are shown in the lower text area.\nYou will have to merge
your changes into the existing text.\n<strong>Only</strong> the text in the
upper text area will be saved when you press \"{{int:savearticle}}\".",
"yourtext": "Your text",
"storedversion": "Stored revision",
diff --git a/languages/i18n/qqq.json b/languages/i18n/qqq.json
index 77ecd74..bd8e984 100644
--- a/languages/i18n/qqq.json
+++ b/languages/i18n/qqq.json
@@ -810,6 +810,7 @@
"editingsection": "This message displays at the top of the page when a
user is editing a page section. Parameters:\n* $1 - page
name\n{{Related|Editing}}",
"editingcomment": "This message displays at the top of the page when a
user is creating a new section. Parameters:\n* $1 - page
name\n{{Related|Editing}}",
"editconflict": "Used as title of error message. Parameters:\n* $1 -
page title",
+ "editnotice-notext": "{{ignored}}\nCustom message on top of the edit
page if no edit notices apply to this page.",
"explainconflict": "Appears at the top of a page when there is an edit
conflict.\n\nSee also:\n* {{msg-mw|Savearticle}}",
"yourtext": "Used in Diff Preview page. The diff is between
{{msg-mw|currentrev}} and {{msg-mw|yourtext}}.\n\nAlso used in Edit Conflict
page; the diff between {{msg-mw|yourtext}} and {{msg-mw|storedversion}}.",
"storedversion": "This is used in an edit conflict as the label for the
top revision that has been stored, as opposed to your version
{{msg-mw|yourtext}} that has not been stored which is shown at the bottom of
the page.",
--
To view, visit https://gerrit.wikimedia.org/r/196466
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Iff6735d93da8b877063690ff67bda652a03d4906
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Krinkle <[email protected]>
Gerrit-Reviewer: Jackmcbarn <[email protected]>
Gerrit-Reviewer: Jforrester <[email protected]>
Gerrit-Reviewer: Krinkle <[email protected]>
Gerrit-Reviewer: Legoktm <[email protected]>
Gerrit-Reviewer: Siebrand <[email protected]>
Gerrit-Reviewer: Tpt <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits