From 7907d20da7af4c2945fa2ced2963eb938bee4f3c Mon Sep 17 00:00:00 2001 From: Tim Kung Date: Tue, 29 Mar 2016 13:38:24 +1300 Subject: [PATCH] BUG changing all cases of filesize spelling to file size --- filesystem/Upload.php | 4 ++-- forms/UploadField.php | 4 ++-- javascript/lang/en_GB.js | 4 ++-- javascript/lang/fr.js | 4 ++-- javascript/lang/src/en.js | 4 ++-- javascript/lang/src/en_GB.js | 4 ++-- javascript/lang/src/fr.js | 4 ++-- lang/en.yml | 6 +++--- tests/filesystem/UploadTest.php | 4 ++-- 9 files changed, 19 insertions(+), 19 deletions(-) diff --git a/filesystem/Upload.php b/filesystem/Upload.php index 36e93c5ef..13b652d36 100644 --- a/filesystem/Upload.php +++ b/filesystem/Upload.php @@ -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); //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; } } diff --git a/forms/UploadField.php b/forms/UploadField.php index 57926dc77..7347426ad 100644 --- a/forms/UploadField.php +++ b/forms/UploadField.php @@ -944,7 +944,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'])) ); } @@ -1435,7 +1435,7 @@ class UploadField_ItemHandler extends RequestHandler { if(!$file) return $this->httpError(404); if($file instanceof Folder) return $this->httpError(403); if(!$file->canEdit()) return $this->httpError(403); - + // Get form components $fields = $this->parent->getFileEditFields($file); $actions = $this->parent->getFileEditActions($file); diff --git a/javascript/lang/en_GB.js b/javascript/lang/en_GB.js index 3f526fe61..276c39c27 100644 --- a/javascript/lang/en_GB.js +++ b/javascript/lang/en_GB.js @@ -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", diff --git a/javascript/lang/fr.js b/javascript/lang/fr.js index 98a095480..1cdc808e3 100644 --- a/javascript/lang/fr.js +++ b/javascript/lang/fr.js @@ -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", diff --git a/javascript/lang/src/en.js b/javascript/lang/src/en.js index e8c0b5ad6..e41ce9c80 100644 --- a/javascript/lang/src/en.js +++ b/javascript/lang/src/en.js @@ -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", diff --git a/javascript/lang/src/en_GB.js b/javascript/lang/src/en_GB.js index e8c0b5ad6..e41ce9c80 100644 --- a/javascript/lang/src/en_GB.js +++ b/javascript/lang/src/en_GB.js @@ -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", diff --git a/javascript/lang/src/fr.js b/javascript/lang/src/fr.js index 5c11b5136..d5f4e5999 100644 --- a/javascript/lang/src/fr.js +++ b/javascript/lang/src/fr.js @@ -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", diff --git a/lang/en.yml b/lang/en.yml index 5cc8afeff..3a2ace1e9 100644 --- a/lang/en.yml +++ b/lang/en.yml @@ -168,15 +168,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' diff --git a/tests/filesystem/UploadTest.php b/tests/filesystem/UploadTest.php index f0235dce9..e56415985 100644 --- a/tests/filesystem/UploadTest.php +++ b/tests/filesystem/UploadTest.php @@ -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;