Ebe123 has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/148716

Change subject: Show whether a page is watched though a message while editing
......................................................................

Show whether a page is watched though a message while editing

This change switches the "watchthis" message for "watchthis-watched"
in the edit dialog if the page is already watched by the user. This
is to supplement the checkbox being activated when the page is watched.

Bug: 14224
Change-Id: I2dc738dcae78ecd05602de61d5ff5956f4612fb2
---
M includes/EditPage.php
M languages/i18n/en.json
M languages/i18n/qqq.json
3 files changed, 10 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/16/148716/1

diff --git a/includes/EditPage.php b/includes/EditPage.php
index 9d512ab..efb77bb 100644
--- a/includes/EditPage.php
+++ b/includes/EditPage.php
@@ -3795,7 +3795,12 @@
                        }
                }
 
-               $watchLabel = wfMessage( 'watchthis' )->parse();
+               if ( $wgUser->isWatched( $this->mTitle ) ) {
+                       $watchLabel = wfMessage( 'watchthis-watched' )->parse();
+               } else {
+                       $watchLabel = wfMessage( 'watchthis' )->parse();
+               }
+
                $checkboxes['watch'] = '';
                if ( $wgUser->isLoggedIn() ) {
                        $attribs = array(
diff --git a/languages/i18n/en.json b/languages/i18n/en.json
index e42d716..e9b1a35 100644
--- a/languages/i18n/en.json
+++ b/languages/i18n/en.json
@@ -577,7 +577,8 @@
        "summary": "Summary:",
        "subject": "Subject/headline:",
        "minoredit": "This is a minor edit",
-       "watchthis": "Watch this page",
+       "watchthis": "Watch this page (unwatched)",
+       "watchthis-watched": "Watch this page (watched)",
        "savearticle": "Save page",
        "preview": "Preview",
        "showpreview": "Show preview",
diff --git a/languages/i18n/qqq.json b/languages/i18n/qqq.json
index ad5b288..1aae103 100644
--- a/languages/i18n/qqq.json
+++ b/languages/i18n/qqq.json
@@ -739,7 +739,8 @@
        "summary": "The Summary text beside the edit summary field\n\nSee 
also:\n* {{msg-mw|Subject}}\nSee also:\n* {{msg-mw|Accesskey-summary}}\n* 
{{msg-mw|Tooltip-summary}}\n{{Identical|Summary}}",
        "subject": "Used as label for input box in the EditPage page.\n\nSee 
also:\n* {{msg-mw|Summary}}",
        "minoredit": "Text above Save page button in editor\n\nSee also:\n* 
{{msg-mw|Minoredit}}\n* {{msg-mw|Accesskey-minoredit}}\n* 
{{msg-mw|Tooltip-minoredit}}",
-       "watchthis": "Text of checkbox above {{msg-mw|Showpreview}} button in 
editor.\n\nSee also:\n* {{msg-mw|Watchthis}}\n* {{msg-mw|Accesskey-watch}}\n* 
{{msg-mw|Tooltip-watch}}\n{{Identical|Watch this page}}",
+       "watchthis": "Text of checkbox above {{msg-mw|Showpreview}} button in 
editor when page edited is not already watched.\n\nSee also:\n* 
{{msg-mw|Watchthis}}\n* {{msg-mw|Accesskey-watch}}\n* 
{{msg-mw|Tooltip-watch}}\n* {{msg-mw|Watchthis-watched}}",
+       "watchthis-watched": "Text of checkbox above {{msg-mw|Showpreview}} 
button in editor when page edited is already watched.\n\nSee also:\n* 
{{msg-mw|Watchthis}}\n* {{msg-mw|Accesskey-watch}}\n* {{msg-mw|Tooltip-watch}}",
        "savearticle": "Text on the Save page button. See also 
{{msg-mw|showpreview}} and {{msg-mw|showdiff}} for the other buttons.\n\nSee 
also:\n* {{msg-mw|Savearticle}}\n* {{msg-mw|Accesskey-save}}\n* 
{{msg-mw|Tooltip-save}}\n{{Identical|Save page}}",
        "preview": "The title of the Preview page shown after clicking the 
\"Show preview\" button in the edit page. Since this is a heading, it should 
probably be translated as a noun and not as a verb.\n\n{{Identical|Preview}}",
        "showpreview": "The text of the button to preview the page you are 
editing. See also {{msg-mw|showdiff}} and {{msg-mw|savearticle}} for the other 
buttons.\n\nSee also:\n* {{msg-mw|Showpreview}}\n* 
{{msg-mw|Accesskey-preview}}\n* {{msg-mw|Tooltip-preview}}\n{{Identical|Show 
preview}}",

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2dc738dcae78ecd05602de61d5ff5956f4612fb2
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Ebe123 <beauleetien...@gmail.com>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to