* Also remove the lego thing: http://translatewiki.net/wiki/Support#shareduploadwiki-linktext_is_used_in_different_ways
selection
* The svn-version version numbers on Special:Version have been removed
* (bug 17374) Special:Export no longer exports two copies of the same page
+* (bug 18190) Proper parsing in MediaWiki:Sharedupload message
== API changes in 1.15 ==
* (bug 16858) Revamped list=deletedrevs to make listing deleted contributions
$descUrl = $this->img->getDescriptionUrl();
$descText = $this->img->getDescriptionText();
+
+ $wrap = "<div class='sharedUploadNotice'>\n$1\n</div>";
+ $repo = $this->img->getRepo()->getDisplayName();
+
$msg = '';
- if( $descUrl ) {
- $sk = $wgUser->getSkin();
- $link = $sk->makeExternalLink( $descUrl, wfMsg( 'shareduploadwiki-linktext' ) );
- $msg = ( $descText ) ? 'shareduploadwiki-desc' : 'shareduploadwiki';
- $msg = wfMsgExt( $msg, array( 'parseinline', 'replaceafter' ), $link );
- if( $msg == '-' ) {
- $msg = '';
- }
+ if( $descUrl && $descText && wfMsgNoTrans( 'sharedupload-desc-here' ) !== '-' ) {
+ $wgOut->wrapWikiMsg( $wrap, array( 'sharedupload-desc-here', $repo, $descUrl ) );
+ } elseif ( $descUrl && wfMsgNoTrans( 'sharedupload-desc-there' ) !== '-' ) {
+ $wgOut->wrapWikiMsg( $wrap, array( 'sharedupload-desc-there', $repo, $descUrl ) );
+ } else {
+ $wgOut->wrapWikiMsg( $wrap, array( 'sharedupload', $repo ), ''/*BACKCOMPAT*/ );
}
- $s = "<div class='sharedUploadNotice'>";
- $s .= wfMsgWikiHtml( 'sharedupload', $this->img->getRepo()->getDisplayName(), $msg );
- $s .= "</div>";
- $wgOut->addHTML( $s );
if( $descText ) {
$this->mExtraDescription = $descText;
'morelinkstoimage' => 'View [[Special:WhatLinksHere/$1|more links]] to this file.',
'redirectstofile' => 'The following {{PLURAL:$1|file redirects|$1 files redirect}} to this file:',
'duplicatesoffile' => 'The following {{PLURAL:$1|file is a duplicate|$1 files are duplicates}} of this file ([[Special:FileDuplicateSearch/$2|more details]]):',
-'sharedupload' => 'This file is from $1 and may be used by other projects. $2', # $1 is the repo name, $2 is shareduploadwiki(-desc)
-'shareduploadwiki' => 'Please see the $1 for further information.',
-'shareduploadwiki-desc' => 'The description on its $1 there is shown below.',
-'shareduploadwiki-linktext' => 'file description page',
+'sharedupload' => 'This file is from $1 and may be used by other projects.',
+'sharedupload-desc-there' => 'This file is from $1 and may be used by other projects. Please see the [$2 file description page] for further information.',
+'sharedupload-desc-here' => 'This file is from $1 and may be used by other projects. The description on its [$2 file description page] there is shown below.',
'shareddescriptionfollows' => '-', # do not translate or duplicate this message to other languages
'noimage' => 'No file by this name exists, but you can $1.',
'noimage-linktext' => 'upload one',