From df7d3132892166a39f27f333b11c6731585ef730 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Niklas=20Laxstr=C3=B6m?= Date: Sun, 6 Jul 2008 18:26:34 +0000 Subject: [PATCH] * Allow plural in filetype-banned-type, filetype-unwanted-type --- includes/specials/SpecialUpload.php | 9 ++++++--- languages/messages/MessagesEn.php | 6 ++++-- 2 files changed, 10 insertions(+), 5 deletions(-) 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.', -- 2.20.1