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

Change subject: Show different title when Special:CentralAuth shown in 
read-only mode
......................................................................


Show different title when Special:CentralAuth shown in read-only mode

When [[Special:CentralAuth]] page shown up as read-only mode, display
"Global account info" instead of "Global account manager" for page
title. And this patchset change legend's header also.

Bug: 27142
Change-Id: I8bd030d464d708a85a622dbde9b8a403e8c8fd6c
---
M i18n/en.json
M i18n/qqq.json
M specials/SpecialCentralAuth.php
3 files changed, 19 insertions(+), 9 deletions(-)

Approvals:
  Hoo man: Looks good to me, approved
  Siebrand: Looks good to me, but someone else must approve
  jenkins-bot: Verified



diff --git a/i18n/en.json b/i18n/en.json
index f360998..cff0e55 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -77,14 +77,16 @@
     "centralauth-attach-submit": "Migrate account",
     "centralauth-attach-success": "The account was migrated to the unified 
account.",
     "centralauth": "Global account manager",
+    "centralauth-ro": "Global account information",
     "centralauth-admin-intro": "This interface can be used for administration 
of global accounts.",
     "centralauth-admin-manage": "Manage account data",
+    "centralauth-admin-view": "View account information",
     "centralauth-admin-username": "Username:",
-    "centralauth-admin-lookup-ro": "View user info",
+    "centralauth-admin-lookup-ro": "View user information",
     "centralauth-admin-lookup-rw": "Manage user account",
     "centralauth-admin-permission": "Only stewards may merge other people's 
accounts for them.",
     "centralauth-admin-no-unified": "No unified account for this username.",
-    "centralauth-admin-info-header": "Global account info",
+    "centralauth-admin-info-header": "Global account information",
     "centralauth-admin-info-username": "Username:",
     "centralauth-admin-info-id": "User ID:",
     "centralauth-admin-info-registered": "Registered:",
@@ -150,6 +152,7 @@
     "centralauth-admin-not-authorized": "You do not have permissions to 
perform this action",
     "centralauth-admin-too-many-edits": "The global account 
\"<nowiki>$1</nowiki>\" has over $2 {{PLURAL:$2|edit|edits}} and cannot be 
hidden.",
     "centralauth-admin-title": "Global account manager for $1",
+    "centralauth-admin-title-ro": "Global account information for $1",
     "globalusers": "Global accounts list",
     "centralauth-listusers-locked": "locked",
     "centralauth-listusers-attached": "[[User:$1|exists locally]]",
diff --git a/i18n/qqq.json b/i18n/qqq.json
index 8377719..08b94fd 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -112,8 +112,10 @@
        "centralauth-attach-submit": "Used as label for submit button.\n\nSee 
also:\n* {{msg-mw|Centralauth-attach-title}}\n* 
{{msg-mw|Centralauth-attach-text}}",
        "centralauth-attach-success": "Used as success message.",
        "centralauth": "{{doc-special|CentralAuth}}",
+       "centralauth-ro": "{{doc-special|CentralAuth}}\nSame as 
{{msg-mw|Centralauth}}, but showing when page displayed with the read only 
mode.",
        "centralauth-admin-intro": "Introduction to 
[[meta:Special:CentralAuth|Global User Manager]] special page.",
-       "centralauth-admin-manage": "Heading of dialog box on 
[[meta:Special:CentralAuth|Global User Manager]] special page.",
+       "centralauth-admin-manage": "Heading of dialog box on 
[[meta:Special:CentralAuth|Global User Manager]] special 
page.\n*{{msg-mw|Centralauth-admin-manage}}\n*{{msg-mw|Centralauth-admin-view}}",
+       "centralauth-admin-view": "Heading of dialog box on 
[[meta:Special:CentralAuth|Global User Manager]] special 
page.\n*{{msg-mw|Centralauth-admin-manage}}\n*{{msg-mw|Centralauth-admin-view}}",
        "centralauth-admin-username": "Input box label on 
[[meta:Special:CentralAuth|Global User Manager]] special 
page.\n\n{{Identical|Username}}",
        "centralauth-admin-lookup-ro": "Submit button on 
[[meta:Special:CentralAuth|Global User Manager]] special 
page.\n*{{msg-mw|Centralauth-admin-lookup-rw}}\n*{{msg-mw|Centralauth-admin-lookup-ro}}",
        "centralauth-admin-lookup-rw": "Submit button on 
[[meta:Special:CentralAuth|Global User Manager]] special 
page.\n*{{msg-mw|Centralauth-admin-lookup-rw}}\n*{{msg-mw|Centralauth-admin-lookup-ro}}",
@@ -183,7 +185,8 @@
        "centralauth-admin-suppressreason": "Parameters:\n* $1 - username\n* $2 
- reason",
        "centralauth-admin-not-authorized": "Error message when the user 
doesn't have permission",
        "centralauth-admin-too-many-edits": "Error message when the user 
account being hidden has more global edits than a certain 
threshold.\n\nParameters:\n* $1 - username\n* $2 - number of edits",
-       "centralauth-admin-title": "{{Gender}}\nThe page title of 
[[Special:CentralAuth]] (when a username is given) in your browser bar (HTML 
title), but not the page title in the heading.\n\nParameters:\n* $1 - the 
username\nSee also:\n* {{msg-mw|Contributions-title}}\n* 
{{msg-mw|Centralauth}}",
+       "centralauth-admin-title": "{{Gender}}\nThe page title of 
[[Special:CentralAuth]] (when a username is given) in your browser bar (HTML 
title), but not the page title in the heading.\n\nParameters:\n* $1 - the 
username\nSee also:\n* {{msg-mw|Contributions-title}}\n* 
{{msg-mw|Centralauth}}\n *{{msg-mw|Centralauth-admin-title-ro}}",
+       "centralauth-admin-title-ro": "{{Gender}}\nThe page title of 
[[Special:CentralAuth]] (when a username is given) in your browser bar (HTML 
title), but not the page title in the heading.\n\nParameters:\n* $1 - the 
username\nSee also:\n* {{msg-mw|Contributions-title}}\n* 
{{msg-mw|Centralauth}}\n* {{msg-mw|Centralauth-admin-title}}",
        "globalusers": "{{doc-special|GlobalUsers}}\nSee example: 
[[w:Special:GlobalUsers]] and [[w:Special:SpecialPages]]",
        "centralauth-listusers-locked": "This message is used as user's 
info:\n*{{msg-mw|centralauth-listusers-locked}}\n*{{msg-mw|centralauth-listusers-attached}}\n*{{msg-mw|centralauth-listusers-nolocal}}\n{{identical|locked}}",
        "centralauth-listusers-attached": "This message is used as user's info. 
Parameters:\n* $1 - username\nSee also:\n* 
{{msg-mw|Centralauth-listusers-locked}}\n* 
{{msg-mw|Centralauth-listusers-attached}}\n* 
{{msg-mw|Centralauth-listusers-nolocal}}",
diff --git a/specials/SpecialCentralAuth.php b/specials/SpecialCentralAuth.php
index db77c81..914838a 100644
--- a/specials/SpecialCentralAuth.php
+++ b/specials/SpecialCentralAuth.php
@@ -25,6 +25,7 @@
                $this->mCanOversight = $this->getUser()->isAllowed( 
'centralauth-oversight' );
                $this->mCanEdit = $this->mCanUnmerge || $this->mCanLock || 
$this->mCanOversight;
 
+               $this->getOutput()->setPageTitle( $this->msg( $this->mCanEdit ? 
'centralauth' : 'centralauth-ro' ) );
                $this->getOutput()->addModules( 'ext.centralauth' );
                $this->getOutput()->addModuleStyles( 'ext.centralauth.noflash' 
);
                $this->getOutput()->addJsConfigVars( 
'wgMergeMethodDescriptions', $this->getMergeMethodDescriptions() );
@@ -61,7 +62,10 @@
                // per bug 47991
                $this->getOutput()->setHTMLTitle( $this->msg(
                        'pagetitle',
-                       $this->msg( 'centralauth-admin-title', $this->mUserName 
)->plain()
+                       $this->msg(
+                               $this->mCanEdit ? 'centralauth-admin-title' : 
'centralauth-admin-title-ro',
+                               $this->mUserName
+                       )->plain()
                ) );
 
                $this->mGlobalUser = $globalUser = new CentralAuthUser( 
$this->mUserName );
@@ -175,13 +179,13 @@
 
        function showUsernameForm() {
                global $wgScript;
-               $lookup = $this->mCanEdit ?
-                       $this->msg( 'centralauth-admin-lookup-rw' )->text() :
-                       $this->msg( 'centralauth-admin-lookup-ro' )->text();
+               $lookup = $this->msg(
+                       $this->mCanEdit ? 'centralauth-admin-lookup-rw' : 
'centralauth-admin-lookup-ro'
+               )->text();
 
                $html = Xml::openElement( 'form', array( 'method' => 'get', 
'action' => $wgScript ) );
                $html .= Xml::fieldset(
-                       $this->msg( 'centralauth-admin-manage' )->text(),
+                       $this->msg( $this->mCanEdit ? 
'centralauth-admin-manage' : 'centralauth-admin-view' )->text(),
                        Html::hidden( 'title', 
$this->getPageTitle()->getPrefixedText() ) .
                                Xml::openElement( 'p' ) .
                                Xml::inputLabel( $this->msg( 
'centralauth-admin-username' )->text(),

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I8bd030d464d708a85a622dbde9b8a403e8c8fd6c
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/extensions/CentralAuth
Gerrit-Branch: master
Gerrit-Owner: devunt <dev...@gmail.com>
Gerrit-Reviewer: Hoo man <h...@online.de>
Gerrit-Reviewer: Leinad <danny.lei...@gmail.com>
Gerrit-Reviewer: MarkAHershberger <m...@nichework.com>
Gerrit-Reviewer: PiRSquared17 <pirsquare...@gmail.com>
Gerrit-Reviewer: Siebrand <siebr...@kitano.nl>
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