BUG changing all cases of filesize spelling to file size

This commit is contained in:
Tim Kung 2016-03-29 13:38:24 +13:00
parent 7867c51388
commit 7907d20da7
9 changed files with 19 additions and 19 deletions

View File

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

View File

@ -944,7 +944,7 @@ class UploadField extends FileField {
$config['maxFileSize'] = $allowedMaxFileSize; $config['maxFileSize'] = $allowedMaxFileSize;
$config['errorMessages']['maxFileSize'] = _t( $config['errorMessages']['maxFileSize'] = _t(
'File.TOOLARGESHORT', 'File.TOOLARGESHORT',
'Filesize exceeds {size}', 'File size exceeds {size}',
array('size' => File::format_size($config['maxFileSize'])) array('size' => File::format_size($config['maxFileSize']))
); );
} }
@ -1435,7 +1435,7 @@ class UploadField_ItemHandler extends RequestHandler {
if(!$file) return $this->httpError(404); if(!$file) return $this->httpError(404);
if($file instanceof Folder) return $this->httpError(403); if($file instanceof Folder) return $this->httpError(403);
if(!$file->canEdit()) return $this->httpError(403); if(!$file->canEdit()) return $this->httpError(403);
// Get form components // Get form components
$fields = $this->parent->getFileEditFields($file); $fields = $this->parent->getFileEditFields($file);
$actions = $this->parent->getFileEditActions($file); $actions = $this->parent->getFileEditActions($file);

View File

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

View File

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

View File

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

View File

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

View File

@ -168,15 +168,15 @@ en:
JsType: 'Javascript file' JsType: 'Javascript file'
Mp3Type: 'MP3 audio file' Mp3Type: 'MP3 audio file'
MpgType: 'MPEG video file' MpgType: 'MPEG video file'
NOFILESIZE: 'Filesize is zero bytes.' NOFILESIZE: 'File size is zero bytes.'
NOVALIDUPLOAD: 'File is not a valid upload' NOVALIDUPLOAD: 'File is not a valid upload'
Name: Name Name: Name
PLURALNAME: Files PLURALNAME: Files
PdfType: 'Adobe Acrobat PDF file' PdfType: 'Adobe Acrobat PDF file'
PngType: 'PNG image - good general-purpose format' PngType: 'PNG image - good general-purpose format'
SINGULARNAME: File SINGULARNAME: File
TOOLARGE: 'Filesize is too large, maximum {size} allowed' TOOLARGE: 'File size is too large, maximum {size} allowed'
TOOLARGESHORT: 'Filesize exceeds {size}' TOOLARGESHORT: 'File size exceeds {size}'
TiffType: 'Tagged image format' TiffType: 'Tagged image format'
Title: Title Title: Title
WavType: 'WAV audo file' 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)); $arg = File::format_size($this->getAllowedMaxFileSize($ext));
$this->errors[] = _t( $this->errors[] = _t(
'File.TOOLARGE', 'File.TOOLARGE',
'Filesize is too large, maximum {size} allowed', 'File size is too large, maximum {size} allowed',
'Argument 1: Filesize (e.g. 1MB)', 'Argument 1: File size (e.g. 1MB)',
array('size' => $arg) array('size' => $arg)
); );
return false; return false;