* (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 ==
/* 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 ) ) );
}
/**
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>';
}
}
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 ) );
}
}
'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.',
'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.',
'minlength',
'illegalfilename',
'badfilename',
- 'badfiletype',
+ 'filetype-badtype',
+ 'filetype-badmime',
+ 'filetype-missing',
'large-file',
'largefileserver',
'emptyfile',