Add different log-in tooltip for private wikis
authorThis, that and the other <at.light@live.com.au>
Thu, 20 Apr 2017 02:25:59 +0000 (12:25 +1000)
committerThis, that and the other <at.light@live.com.au>
Thu, 20 Apr 2017 02:25:59 +0000 (12:25 +1000)
Bug: T148006
Change-Id: I14e9a554c72222e6f67bc120941199b999740886

RELEASE-NOTES-1.29
includes/skins/SkinTemplate.php
languages/i18n/en.json
languages/i18n/qqq.json

index f9ff2e3..a225086 100644 (file)
@@ -327,6 +327,8 @@ changes to languages because of Phabricator reports.
   mwCustomEditButtons, injectSpinner, removeSpinner, escapeQuotes,
   escapeQuotesHTML, jsMsg, addPortletLink, appendCSS, tooltipAccessKeyPrefix,
   tooltipAccessKeyRegexp, updateTooltipAccessKeys.
+* The ID of the <li> element containing the login link has changed from
+  'pt-login' to 'pt-login-private' in private wikis.
 
 == Compatibility ==
 
index 61dbf2b..1dd9a06 100644 (file)
@@ -720,7 +720,10 @@ class SkinTemplate extends Skin {
                        }
 
                        if ( $authManager->canAuthenticateNow() ) {
-                               $personal_urls['login'] = $login_url;
+                               $key = User::groupHasPermission( '*', 'read' )
+                                       ? 'login'
+                                       : 'login-private';
+                               $personal_urls[$key] = $login_url;
                        }
                }
 
index 6db8d10..1b71808 100644 (file)
        "accesskey-pt-mycontris": "y",
        "accesskey-pt-anoncontribs": "y",
        "accesskey-pt-login": "o",
+       "accesskey-pt-login-private": "o",
        "accesskey-pt-logout": "",
        "accesskey-pt-createaccount": "",
        "accesskey-ca-talk": "t",
        "tooltip-pt-mycontris": "A list of {{GENDER:|your}} contributions",
        "tooltip-pt-anoncontribs": "A list of edits made from this IP address",
        "tooltip-pt-login": "You are encouraged to log in; however, it is not mandatory",
+       "tooltip-pt-login-private": "You need to log in to use this wiki",
        "tooltip-pt-logout": "Log out",
        "tooltip-pt-createaccount": "You are encouraged to create an account and log in; however, it is not mandatory",
        "tooltip-ca-talk": "Discussion about the content page",
index d0c55c3..afc9b32 100644 (file)
        "accesskey-pt-mycontris": "{{doc-accesskey}}\nSee also:\n* {{msg-mw|Mycontris}}\n* {{msg-mw|Accesskey-pt-mycontris}}\n* {{msg-mw|Tooltip-pt-mycontris}}",
        "accesskey-pt-anoncontribs": "{{doc-accesskey}}\nSee also:\n* {{msg-mw|Anoncontribs}}\n* {{msg-mw|Tooltip-pt-anoncontribs}}",
        "accesskey-pt-login": "{{doc-accesskey}}",
+       "accesskey-pt-login-private": "{{doc-accesskey}}",
        "accesskey-pt-logout": "{{doc-accesskey}}\nSee also:\n* {{msg-mw|Logout}}\n* {{msg-mw|Accesskey-pt-logout}}\n* {{msg-mw|Tooltip-pt-logout}}",
        "accesskey-pt-createaccount": "{{doc-accesskey}}",
        "accesskey-ca-talk": "{{doc-accesskey}}\nSee also:\n* {{msg-mw|Talk}}\n* {{msg-mw|Accesskey-ca-talk}}\n* {{msg-mw|Tooltip-ca-talk}}",
        "tooltip-pt-mycontris": "Tooltip shown when hovering over the {{msg-mw|Mycontris}} link in your personal toolbox (upper right side).\n\nSee also:\n* {{msg-mw|Mycontris}}\n* {{msg-mw|Accesskey-pt-mycontris}}\n* {{msg-mw|Tooltip-pt-mycontris}}",
        "tooltip-pt-anoncontribs": "Tooltip shown when hovering over the {{msg-mw|Anoncontribs}} link in your personal toolbox (upper right side).\n\nSee also:\n* {{msg-mw|Anoncontribs}}\n* {{msg-mw|Accesskey-pt-anoncontribs}}",
        "tooltip-pt-login": "Tooltip shown when hovering over the link 'Log in' in the upper right corner show on all pages while not logged in.",
+       "tooltip-pt-login-private": "Tooltip shown when hovering over the link 'Log in' in the upper right corner show on all pages while not logged in, and wiki is private.",
        "tooltip-pt-logout": "Tooltip shown when hovering over the {{msg-mw|Logout}} link in your personal toolbox (upper right side).\n\nSee also:\n* {{msg-mw|Logout}}\n* {{msg-mw|Accesskey-pt-logout}}\n* {{msg-mw|Tooltip-pt-logout}}\n{{Identical|Log out}}",
        "tooltip-pt-createaccount": "Tooltip shown when hovering over the link 'Create account' in the upper right corner show on all pages while not logged in.",
        "tooltip-ca-talk": "Tooltip shown when hovering over the {{msg-mw|Talk}} tab.\n\nA 'content page' is a page that forms part of the purpose of the wiki. It includes the main page and pages in the main namespace and any other namespaces that are included when the wiki is customised. For example on Wikimedia Commons 'content pages' include pages in the file and category namespaces. On Wikinews 'content pages' include pages in the Portal namespace. For a technical definition of 'content namespaces' see [[mw:Manual:Using_custom_namespaces#Content_namespaces|MediaWiki]].\n\nPossible alternatives to the word 'content' are 'subject matter' or 'wiki subject' or 'wiki purpose'.\n\nSee also:\n* {{msg-mw|Talk}}\n* {{msg-mw|Accesskey-ca-talk}}\n* {{msg-mw|Tooltip-ca-talk}}\n{{Identical|Content page}}",