Merge pull request #2095 from CheeseSucker/patch-1

Fixed a translation issue for File.INVALIDEXCEPTION
This commit is contained in:
Ingo Schommer 2013-06-14 00:51:15 -07:00
commit 975e09643f

View File

@ -875,14 +875,11 @@ class File extends DataObject {
if(!in_array(strtolower($extension), $allowed)) {
$exts = $allowed;
sort($exts);
$message = sprintf(
_t(
$message = _t(
'File.INVALIDEXTENSION',
'Extension is not allowed (valid: %s)',
'Argument 1: Comma-separated list of valid extensions'
),
wordwrap(implode(', ',$exts))
'Extension is not allowed (valid: {extensions})',
'Argument 1: Comma-separated list of valid extensions',
array('extensions' => wordwrap(implode(', ',$exts)))
);
return new ValidationResult(false, $message);
}