Index: trunk/phase3/includes/ImagePage.php |
— | — | @@ -483,20 +483,18 @@ |
484 | 484 | |
485 | 485 | $descUrl = $this->img->getDescriptionUrl(); |
486 | 486 | $descText = $this->img->getDescriptionText(); |
| 487 | + |
| 488 | + $wrap = "<div class='sharedUploadNotice'>\n$1\n</div>"; |
| 489 | + $repo = $this->img->getRepo()->getDisplayName(); |
| 490 | + |
487 | 491 | $msg = ''; |
488 | | - if( $descUrl ) { |
489 | | - $sk = $wgUser->getSkin(); |
490 | | - $link = $sk->makeExternalLink( $descUrl, wfMsg( 'shareduploadwiki-linktext' ) ); |
491 | | - $msg = ( $descText ) ? 'shareduploadwiki-desc' : 'shareduploadwiki'; |
492 | | - $msg = wfMsgExt( $msg, array( 'parseinline', 'replaceafter' ), $link ); |
493 | | - if( $msg == '-' ) { |
494 | | - $msg = ''; |
495 | | - } |
| 492 | + if( $descUrl && $descText && wfMsgNoTrans( 'sharedupload-desc-here' ) !== '-' ) { |
| 493 | + $wgOut->wrapWikiMsg( $wrap, array( 'sharedupload-desc-here', $repo, $descUrl ) ); |
| 494 | + } elseif ( $descUrl && wfMsgNoTrans( 'sharedupload-desc-there' ) !== '-' ) { |
| 495 | + $wgOut->wrapWikiMsg( $wrap, array( 'sharedupload-desc-there', $repo, $descUrl ) ); |
| 496 | + } else { |
| 497 | + $wgOut->wrapWikiMsg( $wrap, array( 'sharedupload', $repo ), ''/*BACKCOMPAT*/ ); |
496 | 498 | } |
497 | | - $s = "<div class='sharedUploadNotice'>"; |
498 | | - $s .= wfMsgWikiHtml( 'sharedupload', $this->img->getRepo()->getDisplayName(), $msg ); |
499 | | - $s .= "</div>"; |
500 | | - $wgOut->addHTML( $s ); |
501 | 499 | |
502 | 500 | if( $descText ) { |
503 | 501 | $this->mExtraDescription = $descText; |
Index: trunk/phase3/languages/messages/MessagesEn.php |
— | — | @@ -1990,10 +1990,9 @@ |
1991 | 1991 | 'morelinkstoimage' => 'View [[Special:WhatLinksHere/$1|more links]] to this file.', |
1992 | 1992 | 'redirectstofile' => 'The following {{PLURAL:$1|file redirects|$1 files redirect}} to this file:', |
1993 | 1993 | 'duplicatesoffile' => 'The following {{PLURAL:$1|file is a duplicate|$1 files are duplicates}} of this file ([[Special:FileDuplicateSearch/$2|more details]]):', |
1994 | | -'sharedupload' => 'This file is from $1 and may be used by other projects. $2', # $1 is the repo name, $2 is shareduploadwiki(-desc) |
1995 | | -'shareduploadwiki' => 'Please see the $1 for further information.', |
1996 | | -'shareduploadwiki-desc' => 'The description on its $1 there is shown below.', |
1997 | | -'shareduploadwiki-linktext' => 'file description page', |
| 1994 | +'sharedupload' => 'This file is from $1 and may be used by other projects.', |
| 1995 | +'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.', |
| 1996 | +'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.', |
1998 | 1997 | 'shareddescriptionfollows' => '-', # do not translate or duplicate this message to other languages |
1999 | 1998 | 'noimage' => 'No file by this name exists, but you can $1.', |
2000 | 1999 | 'noimage-linktext' => 'upload one', |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -295,6 +295,7 @@ |
296 | 296 | selection |
297 | 297 | * The svn-version version numbers on Special:Version have been removed |
298 | 298 | * (bug 17374) Special:Export no longer exports two copies of the same page |
| 299 | +* (bug 18190) Proper parsing in MediaWiki:Sharedupload message |
299 | 300 | |
300 | 301 | == API changes in 1.15 == |
301 | 302 | * (bug 16858) Revamped list=deletedrevs to make listing deleted contributions |