Victorbarbu has uploaded a new change for review.
https://gerrit.wikimedia.org/r/263196
Change subject: Add link to extension/skin's page in ExtensionDistributor
......................................................................
Add link to extension/skin's page in ExtensionDistributor
Added link to either extension's or skin's MediaWiki page.
Bug: T31661
Change-Id: I4953e87e85aa5073e547e3664d6c79f889b303b2
---
M i18n/en.json
M i18n/qqq.json
M includes/specials/SpecialBaseDistributor.php
3 files changed, 18 insertions(+), 1 deletion(-)
git pull
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ExtensionDistributor
refs/changes/96/263196/1
diff --git a/i18n/en.json b/i18n/en.json
index 9bdc2c0..c8ca50f 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -36,5 +36,7 @@
"apihelp-query+extdistbranches-description": "Returns the list of
branches for a repository supported by ExtensionDistributor",
"apihelp-query+extdistbranches-param-skins": "Skins to get branches
for",
"apihelp-query+extdistbranches-param-exts": "Extensions to get branches
for",
- "apihelp-query+extdistbranches-example-1": "Get branches for the
ExtensionDistributor extension"
+ "apihelp-query+extdistbranches-example-1": "Get branches for the
ExtensionDistributor extension",
+ "extdist-goto-extensions-page": "Go to <b>$1</b> extension page",
+ "extdist-goto-skins-page": "Go to <b>$1</b> skin page"
}
diff --git a/i18n/qqq.json b/i18n/qqq.json
index 7d27877..b7d513a 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -35,6 +35,8 @@
"extdist-created-skins": "Followed by the link text
{{msg-mw|Extdist-want-more-skins}}.\n\nIn the expression \"skins directory\",
\"skins\" is the name of an actual directory and should not be
translated.\n\nParameters:\n* $1 - skin name\n* $2 - revision number (SHA1, 7
characters)\n* $3 - branch name. e.g. master, REL1_21, REL1_20\n* $4 - URL
which points to the .tar.gz file\n* $5 - filename of the .tar.gz file",
"extdist-want-more-extensions": "Used as link text in
[[Special:ExtensionDistributor]].\n\nThis message follows the Download icon.",
"extdist-want-more-skins": "Used as link text in
[[Special:SkinDistributor]].\n\nThis message follows the Download icon.",
+ "extdist-goto-extensions-page": "Used as link text in
[[Special:ExtensionDistributor]].\n\nThis message precedes the \"Want more\"
message.",
+ "extdist-goto-skins-page": "Used as link text in
[[Special:SkinDistributor]].\n\nThis message precedes the \"Want more\"
message.",
"extdist-tar-error": "Used as error message in
[[Special:ExtensionDistributor]], when downloading an extension.",
"extdist-no-branches": "Error message shown if it can't find any
information about any branches",
"extdist-popular-extensions": "Message shown before a list of popular
extensions. $1 is the number of items in the list.",
diff --git a/includes/specials/SpecialBaseDistributor.php
b/includes/specials/SpecialBaseDistributor.php
index f424efa..9c0b35a 100644
--- a/includes/specials/SpecialBaseDistributor.php
+++ b/includes/specials/SpecialBaseDistributor.php
@@ -285,6 +285,19 @@
// extdist-created-extensions, extdist-created-skins
$this->getOutput()->addWikiMsg( $this->msgKey(
'extdist-created-$TYPE' ), $extension, $sha1,
$version, $url, $fileName );
+ // add link to the extension/skin's page
+ $link = 'https://www.mediawiki.org/wiki/'
+ . ( $this->type === ExtDistProvider::EXTENSIONS ?
'Extension:' : 'Skin:' )
+ . $extension;
+ $this->getOutput()->addHTML(
+ Xml::openElement( 'p' ) .
+ Html::rawElement(
+ 'a',
+ array( 'href' => $link ),
+ $this->msg( "extdist-goto-{$this->type}-page",
$extension )->plain()
+ ) .
+ Xml::closeElement( 'p' ) . "\n"
+ );
$this->getOutput()->addHTML(
Xml::openElement( 'p', array( 'style' =>
'font-size:150%' ) ) .
Linker::link( $this->getPageTitle(),
--
To view, visit https://gerrit.wikimedia.org/r/263196
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I4953e87e85aa5073e547e3664d6c79f889b303b2
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ExtensionDistributor
Gerrit-Branch: master
Gerrit-Owner: Victorbarbu <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits