Glaisher has uploaded a new change for review.
https://gerrit.wikimedia.org/r/201959
Change subject: Show an editnotice on the central global userpage
......................................................................
Show an editnotice on the central global userpage
Bug: T89841
Change-Id: Ief8caea8dbd602fa7f65fda56efab6dcb30134a1
---
M GlobalUserPage.hooks.php
M i18n/en.json
M i18n/qqq.json
3 files changed, 7 insertions(+), 1 deletion(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/GlobalUserPage
refs/changes/59/201959/1
diff --git a/GlobalUserPage.hooks.php b/GlobalUserPage.hooks.php
index 7b40cec..b3317bf 100644
--- a/GlobalUserPage.hooks.php
+++ b/GlobalUserPage.hooks.php
@@ -138,7 +138,8 @@
}
/**
- * Show an edit notice on user pages which displays global user pages.
+ * Show an edit notice on user pages which displays global user pages
+ * or on the central global user page.
*
* @param Title $title
* @param integer $oldid
@@ -149,7 +150,10 @@
$notices['globaluserpage'] = '<p><strong>' .
wfMessage( 'globaluserpage-editnotice'
)->parse()
. '</strong></p>';
+ } elseif ( self::isGlobalUserPage( $title ) ) {
+ $notices['centraluserpage'] = wfMessage(
'globaluserpage-central-editnotice' )->parseAsBlock();
}
+
return true;
}
}
diff --git a/i18n/en.json b/i18n/en.json
index 8135872..99c3815 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -6,6 +6,7 @@
},
"globaluserpage-desc": "Automatically fetches user pages from a central
wiki",
"globaluserpage-editnotice": "This page currently displays a user page
from another wiki. If you create a new page here, it will be overridden with
the newly created page.",
+ "globaluserpage-central-editnotice": "This user page will be
[https://www.mediawiki.org/wiki/Special:MyLanguage/Help:Extension:GlobalUserPage
displayed] on other wikis if a user page does not exist locally on other
wikis.",
"globaluserpage-preferences": "Use
[https://www.mediawiki.org/wiki/Special:MyLanguage/Help:Extension:GlobalUserPage
global user page]",
"globaluserpage-footer": "What you see on this page was
[https://www.mediawiki.org/wiki/Special:MyLanguage/Help:Extension:GlobalUserPage
copied] from [$2 $2]."
}
diff --git a/i18n/qqq.json b/i18n/qqq.json
index 7296b61..053811b 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -7,6 +7,7 @@
},
"globaluserpage-desc":
"{{desc|name=GlobalUserPage|url=https://www.mediawiki.org/wiki/Extension:GlobalUserPage}}",
"globaluserpage-editnotice": "Edit notice displayed on user pages if it
currently shows a global user page.",
+ "globaluserpage-central-editnotice": "Edit notice displayed on global
user pages on the central wiki.",
"globaluserpage-preferences": "Used as checkbox label in
[[Special:GlobalPreferences]].",
"globaluserpage-footer": "Footer shown on global user pages.
Parameters:\n* $1 - the user's name\n* $2 - a link to the original user page on
the central wiki"
}
--
To view, visit https://gerrit.wikimedia.org/r/201959
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ief8caea8dbd602fa7f65fda56efab6dcb30134a1
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/GlobalUserPage
Gerrit-Branch: master
Gerrit-Owner: Glaisher <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits