r47394 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r47393‎ | r47394 | r47395 >
Date:23:18, 17 February 2009
Author:demon
Status:deferred (Comments)
Tags:
Comment:
(bug 14980) Make shareduploadwiki(-desc) a param to sharedupload. Also RELEASE-NOTES for adding repo names.
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
@@ -481,17 +481,18 @@
482482
483483 $descUrl = $this->img->getDescriptionUrl();
484484 $descText = $this->img->getDescriptionText();
485 - $s = "<div class='sharedUploadNotice'>" . wfMsgWikiHtml( 'sharedupload' );
 485+ $msg = '';
486486 if( $descUrl ) {
487487 $sk = $wgUser->getSkin();
488488 $link = $sk->makeExternalLink( $descUrl, wfMsg( 'shareduploadwiki-linktext' ) );
489489 $msg = ( $descText ) ? 'shareduploadwiki-desc' : 'shareduploadwiki';
490490 $msg = wfMsgExt( $msg, array( 'parseinline', 'replaceafter' ), $link );
491 - if( $msg != '-' ) {
492 - # Show message only if not voided by local sysops
493 - $s .= $msg;
 491+ if( $msg == '-' ) {
 492+ $msg = '';
494493 }
495494 }
 495+ $s = "<div class='sharedUploadNotice'>";
 496+ $s .= wfMsgWikiHtml( 'sharedupload', $this->img->getRepo()->getDisplayName(), $msg );
496497 $s .= "</div>";
497498 $wgOut->addHTML( $s );
498499
Index: trunk/phase3/languages/messages/MessagesEn.php
@@ -1969,9 +1969,9 @@
19701970 'morelinkstoimage' => 'View [[Special:WhatLinksHere/$1|more links]] to this file.',
19711971 'redirectstofile' => 'The following {{PLURAL:$1|file redirects|$1 files redirect}} to this file:',
19721972 'duplicatesoffile' => 'The following {{PLURAL:$1|file is a duplicate|$1 files are duplicates}} of this file ([[Special:FileDuplicateSearch/$2|more details]]):',
1973 -'sharedupload' => 'This file is a shared upload and may be used by other projects.',
 1973+'sharedupload' => 'This file is from $1 and may be used by other projects. $2', // $1 is the repo name, $2 is shareduploadwiki(-desc)
19741974 'shareduploadwiki' => 'Please see the $1 for further information.',
1975 -'shareduploadwiki-desc' => 'The description on its $1 on the shared repository is shown below.',
 1975+'shareduploadwiki-desc' => 'The description on its $1 on is shown below.',
19761976 'shareduploadwiki-linktext' => 'file description page',
19771977 'shareddescriptionfollows' => '-', # do not translate or duplicate this message to other languages
19781978 'noimage' => 'No file by this name exists, but you can $1.',
Index: trunk/phase3/RELEASE-NOTES
@@ -107,6 +107,9 @@
108108 next section anyway.
109109 * Added $wgRateLimitsExcludedIPs, to allow specific IPs to be whitelisted from
110110 rate limits.
 111+* (bug 14981) Shared repositories can now have display names, located at
 112+ Mediawiki:Shared-repo-name-REPONAME, where REPONAME is the name in
 113+ $wgForeignFileRepos
111114
112115 === Bug fixes in 1.15 ===
113116 * (bug 16968) Special:Upload no longer throws useless warnings.
@@ -184,6 +187,8 @@
185188 * (bug 17506) Exceptions within exceptions now respect $wgShowExceptionDetails
186189 * Fixed excessive job queue utilisation
187190 * File dupe messages for remote repos are now shown only once.
 191+* (bug 14980) Messages 'shareduploadwiki' and 'shareduploadwiki-desc' are now
 192+ used as a parameter in 'sharedupload' for easier styling and customization.
188193
189194 == API changes in 1.15 ==
190195 * (bug 16858) Revamped list=deletedrevs to make listing deleted contributions

Comments

#Comment by UV (talk | contribs)   20:34, 27 March 2009

Apparently, the message sharedupload does not support the GRAMMAR magic word. See bugzilla:18190.

#Comment by Nikerabbit (talk | contribs)   08:22, 28 March 2009

Fixed in r48951.

Status & tagging log