* (bug 8728) MediaWiki:Badfiletype splitted into 3 messages
authorRaimond Spekking <raymond@users.mediawiki.org>
Thu, 1 Mar 2007 15:33:05 +0000 (15:33 +0000)
committerRaimond Spekking <raymond@users.mediawiki.org>
Thu, 1 Mar 2007 15:33:05 +0000 (15:33 +0000)
RELEASE-NOTES
includes/SpecialUpload.php
languages/messages/MessagesDe.php
languages/messages/MessagesEn.php
maintenance/language/messages.inc

index 7bb2701..3a8231f 100644 (file)
@@ -242,6 +242,7 @@ lighter making things easier to read.
 * (bug 3953) Work around poor display of parenthesis in the in other
   languages section of MonoBook skin
 * (bug 8539) Enable PLURAL option for another message of recentchanges.
+* (bug 8728) MediaWiki:Badfiletype splitted into 3 messages
 
 == Languages updated ==
 
index a07d76f..0715ea0 100644 (file)
@@ -347,10 +347,12 @@ class UploadForm {
                /* Don't allow users to override the blacklist (check file extension) */
                global $wgStrictFileExtensions;
                global $wgFileExtensions, $wgFileBlacklist;
-               if( $this->checkFileExtensionList( $ext, $wgFileBlacklist ) ||
-                       ($wgStrictFileExtensions &&
-                               !$this->checkFileExtension( $finalExt, $wgFileExtensions ) ) ) {
-                       return $this->uploadError( wfMsgHtml( 'badfiletype', htmlspecialchars( $finalExt ) ) );
+               if ($finalExt == '') {
+                       return $this->uploadError( wfMsgExt( 'filetype-missing', array ( 'parseinline' ) ) );
+               } elseif ( $this->checkFileExtensionList( $ext, $wgFileBlacklist ) ||
+                               ($wgStrictFileExtensions &&
+                                       !$this->checkFileExtension( $finalExt, $wgFileExtensions ) ) ) {
+                       return $this->uploadError( wfMsgExt( 'filetype-badtype', array ( 'parseinline' ), htmlspecialchars( $finalExt ), implode ( ', ', $wgFileExtensions ) ) );
                }
 
                /**
@@ -393,7 +395,7 @@ class UploadForm {
                        global $wgCheckFileExtensions;
                        if ( $wgCheckFileExtensions ) {
                                if ( ! $this->checkFileExtension( $finalExt, $wgFileExtensions ) ) {
-                                       $warning .= '<li>'.wfMsgHtml( 'badfiletype', htmlspecialchars( $finalExt ) ).'</li>';
+                                       $warning .= '<li>'.wfMsgExt( 'filetype-badtype', array ( 'parseinline' ), htmlspecialchars( $finalExt ), implode ( ', ', $wgFileExtensions ) ).'</li>';
                                }
                        }
 
@@ -927,7 +929,7 @@ class UploadForm {
                        global $wgMimeTypeBlacklist;
                        if( isset($wgMimeTypeBlacklist) && !is_null($wgMimeTypeBlacklist)
                                && $this->checkFileExtension( $mime, $wgMimeTypeBlacklist ) ) {
-                               return new WikiErrorMsg( 'badfiletype', htmlspecialchars( $mime ) );
+                               return new WikiErrorMsg( 'filetype-badmime', htmlspecialchars( $mime ) );
                        }
                }
 
index ec1ddff..0118426 100644 (file)
@@ -941,7 +941,10 @@ Bitte beachten Sie, dass, genau wie bei normalen Seiteninhalten, andere Benutzer
 'minlength'                   => 'Dateinamen müssen mindestens drei Buchstaben lang sein.',
 'illegalfilename'             => 'Der Dateiname „$1“ enthält mindestens ein nicht erlaubtes Zeichen. Bitte benennen Sie die Datei um und versuchen Sie diese erneut hochzuladen.',
 'badfilename'                 => 'Der Dateiname wurde in „$1“ geändert.',
-'badfiletype'                 => '„.$1“ ist kein empfohlenes Dateiformat.',
+'filetype-badmime'            => 'Dateien mit dem MIME-Typ „$1“ dürfen nicht hochgeladen werden.',
+'filetype-badtype'            => "'''„.$1“''' ist ein unerwünschtes Dateiformat.
+: Erlaubt sind: $2",
+'filetype-missing'            => "Die hochzuladende Datei hat keine Erweiterung (z. B. „.jpg“).",
 'large-file'                  => 'Die Dateigröße sollte nach Möglichkeit $1 nicht überschreiten. Diese Datei ist $2 groß.',
 'largefileserver'             => 'Die Datei ist größer als die vom Server eingestellte Maximalgröße.',
 'emptyfile'                   => 'Die hochgeladene Datei ist leer. Der Grund kann ein Tippfehler im Dateinamen sein. Bitte kontrollieren Sie, ob Sie die Datei wirklich hochladen wollen.',
index 6f2900b..ed6d569 100644 (file)
@@ -1326,7 +1326,10 @@ To include the image in a page, use a link in the form
 'minlength'            => 'File names must be at least three letters.',
 'illegalfilename'      => 'The filename "$1" contains characters that are not allowed in page titles. Please rename the file and try uploading it again.',
 'badfilename'  => 'File name has been changed to "$1".',
-'badfiletype'  => "\".$1\" is not a recommended image file format.",
+'filetype-badmime'            => 'Files of the MIME type "$1" are not allowed to be uploaded.',
+'filetype-badtype'            => "'''\".$1\"''' is an unwanted file type
+: List of allowed file types: $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.',
 'largefileserver' => 'This file is bigger than the server is configured to allow.',
 'emptyfile'            => 'The file you uploaded seems to be empty. This might be due to a typo in the file name. Please check whether you really want to upload this file.',
index f0265e5..aee57fa 100644 (file)
@@ -746,7 +746,9 @@ $wgMessageStructure = array(
                'minlength',
                'illegalfilename',
                'badfilename',
-               'badfiletype',
+               'filetype-badtype',
+               'filetype-badmime',
+               'filetype-missing',
                'large-file',
                'largefileserver',
                'emptyfile',