r48951 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r48950‎ | r48951 | r48952 >
Date:08:21, 28 March 2009
Author:nikerabbit
Status:ok
Tags:
Comment:
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/ImagePage.php (modified) (history)
  • /trunk/phase3/languages/messages/MessagesEn.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/ImagePage.php
@@ -483,20 +483,18 @@
484484
485485 $descUrl = $this->img->getDescriptionUrl();
486486 $descText = $this->img->getDescriptionText();
 487+
 488+ $wrap = "<div class='sharedUploadNotice'>\n$1\n</div>";
 489+ $repo = $this->img->getRepo()->getDisplayName();
 490+
487491 $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*/ );
496498 }
497 - $s = "<div class='sharedUploadNotice'>";
498 - $s .= wfMsgWikiHtml( 'sharedupload', $this->img->getRepo()->getDisplayName(), $msg );
499 - $s .= "</div>";
500 - $wgOut->addHTML( $s );
501499
502500 if( $descText ) {
503501 $this->mExtraDescription = $descText;
Index: trunk/phase3/languages/messages/MessagesEn.php
@@ -1990,10 +1990,9 @@
19911991 'morelinkstoimage' => 'View [[Special:WhatLinksHere/$1|more links]] to this file.',
19921992 'redirectstofile' => 'The following {{PLURAL:$1|file redirects|$1 files redirect}} to this file:',
19931993 '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.',
19981997 'shareddescriptionfollows' => '-', # do not translate or duplicate this message to other languages
19991998 'noimage' => 'No file by this name exists, but you can $1.',
20001999 'noimage-linktext' => 'upload one',
Index: trunk/phase3/RELEASE-NOTES
@@ -295,6 +295,7 @@
296296 selection
297297 * The svn-version version numbers on Special:Version have been removed
298298 * (bug 17374) Special:Export no longer exports two copies of the same page
 299+* (bug 18190) Proper parsing in MediaWiki:Sharedupload message
299300
300301 == API changes in 1.15 ==
301302 * (bug 16858) Revamped list=deletedrevs to make listing deleted contributions

Status & tagging log