r90582 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r90581‎ | r90582 | r90583 >
Date:13:35, 22 June 2011
Author:mgrabovsky
Status:ok (Comments)
Tags:
Comment:
Follow-up r90369: Add third parameter to filetype-unwanted-type (for PLURAL)

Also use params() insted of numParams() on an ocassion, as it's not really needed there
Modified paths:
  • /trunk/phase3/includes/specials/SpecialUpload.php (modified) (history)
  • /trunk/phase3/includes/upload/UploadBase.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/upload/UploadBase.php
@@ -532,7 +532,7 @@
533533 if ( $wgCheckFileExtensions ) {
534534 if ( !$this->checkFileExtension( $this->mFinalExtension, $wgFileExtensions ) ) {
535535 $warnings['filetype-unwanted-type'] = array( $this->mFinalExtension,
536 - $wgLang->commaList( $wgFileExtensions ) );
 536+ $wgLang->commaList( $wgFileExtensions ), count( $wgFileExtensions ) );
537537 }
538538 }
539539
Index: trunk/phase3/includes/specials/SpecialUpload.php
@@ -609,9 +609,9 @@
610610 // in a bit unlogical parameter sequence, but does not break
611611 // old translations
612612 if ( isset( $details['blacklistedExt'] ) ) {
613 - $msg->numParams( count( $details['blacklistedExt'] ) );
 613+ $msg->params( count( $details['blacklistedExt'] ) );
614614 } else {
615 - $msg->numParams( 1 );
 615+ $msg->params( 1 );
616616 }
617617
618618 $this->showUploadError( $msg->parse() );

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r90369(bug 29325) Setting $wgStrictFileExtensions to false gives incorrect warning...mgrabovsky21:27, 18 June 2011

Comments

#Comment by Siebrand (talk | contribs)   15:09, 22 June 2011

Best change the English message in MessagesEn.php, too.

#Comment by Raymond (talk | contribs)   15:13, 22 June 2011

As far as I see it is ok already:

'''".$1"''' is an unwanted file type. Preferred {{PLURAL:$3|file type is|file types are}} $2.

Status & tagging log