From 57a2ad595c36d29f7dd21baa0dff16a903ac9753 Mon Sep 17 00:00:00 2001 From: "This, that and the other" Date: Thu, 20 Apr 2017 12:25:59 +1000 Subject: [PATCH] Add different log-in tooltip for private wikis Bug: T148006 Change-Id: I14e9a554c72222e6f67bc120941199b999740886 --- RELEASE-NOTES-1.29 | 2 ++ includes/skins/SkinTemplate.php | 5 ++++- languages/i18n/en.json | 2 ++ languages/i18n/qqq.json | 2 ++ 4 files changed, 10 insertions(+), 1 deletion(-) diff --git a/RELEASE-NOTES-1.29 b/RELEASE-NOTES-1.29 index f9ff2e3980..a225086741 100644 --- a/RELEASE-NOTES-1.29 +++ b/RELEASE-NOTES-1.29 @@ -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
  • element containing the login link has changed from + 'pt-login' to 'pt-login-private' in private wikis. == Compatibility == diff --git a/includes/skins/SkinTemplate.php b/includes/skins/SkinTemplate.php index 61dbf2b1c1..1dd9a06add 100644 --- a/includes/skins/SkinTemplate.php +++ b/includes/skins/SkinTemplate.php @@ -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; } } diff --git a/languages/i18n/en.json b/languages/i18n/en.json index 6db8d109f2..1b718084ad 100644 --- a/languages/i18n/en.json +++ b/languages/i18n/en.json @@ -2735,6 +2735,7 @@ "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", @@ -2806,6 +2807,7 @@ "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", diff --git a/languages/i18n/qqq.json b/languages/i18n/qqq.json index d0c55c39e3..afc9b322f7 100644 --- a/languages/i18n/qqq.json +++ b/languages/i18n/qqq.json @@ -2923,6 +2923,7 @@ "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}}", @@ -2994,6 +2995,7 @@ "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}}", -- 2.20.1