Merge pull request #5241 from timkung/pulls/upload-validator-filesize-spelling

BUG changing all cases of filesize spelling to file size
This commit is contained in:
Ingo Schommer 2016-03-29 16:15:27 +13:00
commit 7ba4b5b6ef
9 changed files with 18 additions and 18 deletions

View File

@ -128,7 +128,7 @@ class Upload extends Controller {
}
if(!$tmpFile['size']) {
$this->errors[] = _t('File.NOFILESIZE', 'Filesize is zero bytes.');
$this->errors[] = _t('File.NOFILESIZE', 'File size is zero bytes.');
return false;
}
@ -213,7 +213,7 @@ class Upload extends Controller {
$this->extend('onAfterLoad', $this->file, $tmpFile); //to allow extensions to e.g. create a version after an upload
return true;
} else {
$this->errors[] = _t('File.NOFILESIZE', 'Filesize is zero bytes.');
$this->errors[] = _t('File.NOFILESIZE', 'File size is zero bytes.');
return false;
}
}

View File

@ -946,7 +946,7 @@ class UploadField extends FileField {
$config['maxFileSize'] = $allowedMaxFileSize;
$config['errorMessages']['maxFileSize'] = _t(
'File.TOOLARGESHORT',
'Filesize exceeds {size}',
'File size exceeds {size}',
array('size' => File::format_size($config['maxFileSize']))
);
}

View File

@ -29,8 +29,8 @@ if(typeof(ss) == 'undefined' || typeof(ss.i18n) == 'undefined') {
"UploadField.NOTMPFOLDER": "Missing a temporary folder",
"UploadField.WRITEFAILED": "Failed to write file to disk",
"UploadField.STOPEDBYEXTENSION": "File upload stopped by extension",
"UploadField.TOOLARGE": "Filesize is too large",
"UploadField.TOOSMALL": "Filesize is too small",
"UploadField.TOOLARGE": "File size is too large",
"UploadField.TOOSMALL": "File size is too small",
"UploadField.INVALIDEXTENSION": "Extension is not allowed",
"UploadField.MAXNUMBEROFFILESSIMPLE": "Max number of files exceeded",
"UploadField.UPLOADEDBYTES": "Uploaded bytes exceed file size",

View File

@ -29,8 +29,8 @@ if(typeof(ss) == 'undefined' || typeof(ss.i18n) == 'undefined') {
"UploadField.NOTMPFOLDER": "Missing a temporary folder",
"UploadField.WRITEFAILED": "Failed to write file to disk",
"UploadField.STOPEDBYEXTENSION": "File upload stopped by extension",
"UploadField.TOOLARGE": "Filesize is too large",
"UploadField.TOOSMALL": "Filesize is too small",
"UploadField.TOOLARGE": "File size is too large",
"UploadField.TOOSMALL": "File size is too small",
"UploadField.INVALIDEXTENSION": "Extension is not allowed",
"UploadField.MAXNUMBEROFFILESSIMPLE": "Max number of files exceeded",
"UploadField.UPLOADEDBYTES": "Uploaded bytes exceed file size",

View File

@ -24,8 +24,8 @@
"UploadField.NOTMPFOLDER": "Missing a temporary folder",
"UploadField.WRITEFAILED": "Failed to write file to disk",
"UploadField.STOPEDBYEXTENSION": "File upload stopped by extension",
"UploadField.TOOLARGE": "Filesize is too large",
"UploadField.TOOSMALL": "Filesize is too small",
"UploadField.TOOLARGE": "File size is too large",
"UploadField.TOOSMALL": "File size is too small",
"UploadField.INVALIDEXTENSION": "Extension is not allowed",
"UploadField.MAXNUMBEROFFILESSIMPLE": "Max number of files exceeded",
"UploadField.UPLOADEDBYTES": "Uploaded bytes exceed file size",

View File

@ -24,8 +24,8 @@
"UploadField.NOTMPFOLDER": "Missing a temporary folder",
"UploadField.WRITEFAILED": "Failed to write file to disk",
"UploadField.STOPEDBYEXTENSION": "File upload stopped by extension",
"UploadField.TOOLARGE": "Filesize is too large",
"UploadField.TOOSMALL": "Filesize is too small",
"UploadField.TOOLARGE": "File size is too large",
"UploadField.TOOSMALL": "File size is too small",
"UploadField.INVALIDEXTENSION": "Extension is not allowed",
"UploadField.MAXNUMBEROFFILESSIMPLE": "Max number of files exceeded",
"UploadField.UPLOADEDBYTES": "Uploaded bytes exceed file size",

View File

@ -24,8 +24,8 @@
"UploadField.NOTMPFOLDER": "Missing a temporary folder",
"UploadField.WRITEFAILED": "Failed to write file to disk",
"UploadField.STOPEDBYEXTENSION": "File upload stopped by extension",
"UploadField.TOOLARGE": "Filesize is too large",
"UploadField.TOOSMALL": "Filesize is too small",
"UploadField.TOOLARGE": "File size is too large",
"UploadField.TOOSMALL": "File size is too small",
"UploadField.INVALIDEXTENSION": "Extension is not allowed",
"UploadField.MAXNUMBEROFFILESSIMPLE": "Max number of files exceeded",
"UploadField.UPLOADEDBYTES": "Uploaded bytes exceed file size",

View File

@ -177,15 +177,15 @@ en:
JsType: 'Javascript file'
Mp3Type: 'MP3 audio file'
MpgType: 'MPEG video file'
NOFILESIZE: 'Filesize is zero bytes.'
NOFILESIZE: 'File size is zero bytes.'
NOVALIDUPLOAD: 'File is not a valid upload'
Name: Name
PLURALNAME: Files
PdfType: 'Adobe Acrobat PDF file'
PngType: 'PNG image - good general-purpose format'
SINGULARNAME: File
TOOLARGE: 'Filesize is too large, maximum {size} allowed'
TOOLARGESHORT: 'Filesize exceeds {size}'
TOOLARGE: 'File size is too large, maximum {size} allowed'
TOOLARGESHORT: 'File size exceeds {size}'
TiffType: 'Tagged image format'
Title: Title
WavType: 'WAV audo file'

View File

@ -770,8 +770,8 @@ class UploadTest_Validator extends Upload_Validator implements TestOnly {
$arg = File::format_size($this->getAllowedMaxFileSize($ext));
$this->errors[] = _t(
'File.TOOLARGE',
'Filesize is too large, maximum {size} allowed',
'Argument 1: Filesize (e.g. 1MB)',
'File size is too large, maximum {size} allowed',
'Argument 1: File size (e.g. 1MB)',
array('size' => $arg)
);
return false;