From: Niklas Laxström Date: Sun, 6 Jul 2008 18:26:34 +0000 (+0000) Subject: * Allow plural in filetype-banned-type, filetype-unwanted-type X-Git-Tag: 1.31.0-rc.0~46689 X-Git-Url: http://git.cyclocoop.org/url?a=commitdiff_plain;h=df7d3132892166a39f27f333b11c6731585ef730;p=lhc%2Fweb%2Fwiklou.git * Allow plural in filetype-banned-type, filetype-unwanted-type --- diff --git a/includes/specials/SpecialUpload.php b/includes/specials/SpecialUpload.php index 6c238544cc..2b3873a8b6 100644 --- a/includes/specials/SpecialUpload.php +++ b/includes/specials/SpecialUpload.php @@ -279,7 +279,7 @@ class UploadForm { * @access private */ function processUpload(){ - global $wgUser, $wgOut, $wgFileExtensions; + global $wgUser, $wgOut, $wgFileExtensions, $wgLang; $details = null; $value = null; $value = $this->internalProcessUpload( $details ); @@ -331,7 +331,8 @@ class UploadForm { implode( wfMsgExt( 'comma-separator', array( 'escapenoentities' ) ), $wgFileExtensions - ) + ), + $wgLang->formatNum( count($wgFileExtensions) ) ) ); break; @@ -515,6 +516,7 @@ class UploadForm { global $wgCheckFileExtensions; if ( $wgCheckFileExtensions ) { if ( !$this->checkFileExtension( $finalExt, $wgFileExtensions ) ) { + global $wgLang; $warning .= '
  • ' . wfMsgExt( 'filetype-unwanted-type', array( 'parseinline' ), @@ -522,7 +524,8 @@ class UploadForm { implode( wfMsgExt( 'comma-separator', array( 'escapenoentities' ) ), $wgFileExtensions - ) + ), + $wgLang->formatNum( count($wgFileExtensions) ) ) . '
  • '; } } diff --git a/languages/messages/MessagesEn.php b/languages/messages/MessagesEn.php index 1493a7acb4..24d4da70a4 100644 --- a/languages/messages/MessagesEn.php +++ b/languages/messages/MessagesEn.php @@ -1632,8 +1632,10 @@ To include a file in a page, use a link in the form Please rename the file and try uploading it again.', 'badfilename' => 'File name has been changed to "$1".', 'filetype-badmime' => 'Files of the MIME type "$1" are not allowed to be uploaded.', -'filetype-unwanted-type' => "'''\".\$1\"''' is an unwanted file type. Preferred file types are \$2.", -'filetype-banned-type' => "'''\".\$1\"''' is not a permitted file type. Permitted file types are \$2.", +'filetype-unwanted-type' => "'''\".\$1\"''' is an unwanted file type. +Preferred {{PLURAL:\$3|file type is|file types are}} \$2.", +'filetype-banned-type' => "'''\".\$1\"''' is not a permitted file type. +Permitted {{PLURAL:\$3|file type is|file types are}} \$2.", 'filetype-missing' => 'The file has no extension (like ".jpg").', 'large-file' => 'It is recommended that files are no larger than $1; this file is $2.',