1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-26 03:22:37 +02:00

[ticket/13904] Add language entries for error messages in upload class

PHPBB3-13904
This commit is contained in:
Marc Alexander
2015-09-09 10:43:12 +02:00
parent 327e36a4d6
commit 70ad0c6a8f
4 changed files with 9 additions and 8 deletions
phpBB
tests/files

@@ -105,11 +105,13 @@ $lang = array_merge($lang, array(
'AVATAR_EMPTY_FILEUPLOAD' => 'The uploaded avatar file is empty.', 'AVATAR_EMPTY_FILEUPLOAD' => 'The uploaded avatar file is empty.',
'AVATAR_INVALID_FILENAME' => '%s is an invalid filename.', 'AVATAR_INVALID_FILENAME' => '%s is an invalid filename.',
'AVATAR_NOT_UPLOADED' => 'Avatar could not be uploaded.', 'AVATAR_NOT_UPLOADED' => 'Avatar could not be uploaded.',
'AVATAR_NO_TEMP_DIR' => 'Temporary folder could not be found or is not writable.',
'AVATAR_NO_SIZE' => 'The width or height of the linked avatar could not be determined. Please enter them manually.', 'AVATAR_NO_SIZE' => 'The width or height of the linked avatar could not be determined. Please enter them manually.',
'AVATAR_PARTIAL_UPLOAD' => 'The specified file was only partially uploaded.', 'AVATAR_PARTIAL_UPLOAD' => 'The specified file was only partially uploaded.',
'AVATAR_PHP_SIZE_NA' => 'The avatars filesize is too large.<br />The maximum allowed filesize set in php.ini could not be determined.', 'AVATAR_PHP_SIZE_NA' => 'The avatars filesize is too large.<br />The maximum allowed filesize set in php.ini could not be determined.',
'AVATAR_PHP_SIZE_OVERRUN' => 'The avatars filesize is too large. The maximum allowed upload size is %1$d %2$s.<br />Please note this is set in php.ini and cannot be overridden.', 'AVATAR_PHP_SIZE_OVERRUN' => 'The avatars filesize is too large. The maximum allowed upload size is %1$d %2$s.<br />Please note this is set in php.ini and cannot be overridden.',
'AVATAR_REMOTE_UPLOAD_TIMEOUT' => 'The specified avatar could not be uploaded because the request timed out.', 'AVATAR_REMOTE_UPLOAD_TIMEOUT' => 'The specified avatar could not be uploaded because the request timed out.',
'AVATAR_PHP_UPLOAD_STOPPED' => 'A PHP extension has stopped the file upload.',
'AVATAR_URL_INVALID' => 'The URL you specified is invalid.', 'AVATAR_URL_INVALID' => 'The URL you specified is invalid.',
'AVATAR_URL_NOT_FOUND' => 'The file specified could not be found.', 'AVATAR_URL_NOT_FOUND' => 'The file specified could not be found.',
'AVATAR_WRONG_FILESIZE' => 'The avatars filesize must be between 0 and %1$d %2$s.', 'AVATAR_WRONG_FILESIZE' => 'The avatars filesize must be between 0 and %1$d %2$s.',

@@ -176,8 +176,10 @@ $lang = array_merge($lang, array(
'NO_POLL_TITLE' => 'You have to enter a poll title.', 'NO_POLL_TITLE' => 'You have to enter a poll title.',
'NO_POST' => 'The requested post does not exist.', 'NO_POST' => 'The requested post does not exist.',
'NO_POST_MODE' => 'No post mode specified.', 'NO_POST_MODE' => 'No post mode specified.',
'NO_TEMP_DIR' => 'Temporary folder could not be found or is not writable.',
'PARTIAL_UPLOAD' => 'The uploaded file was only partially uploaded.', 'PARTIAL_UPLOAD' => 'The uploaded file was only partially uploaded.',
'PHP_UPLOAD_STOPPED' => 'A PHP extension has stopped the file upload.',
'PHP_SIZE_NA' => 'The attachments file size is too large.<br />Could not determine the maximum size defined by PHP in php.ini.', 'PHP_SIZE_NA' => 'The attachments file size is too large.<br />Could not determine the maximum size defined by PHP in php.ini.',
'PHP_SIZE_OVERRUN' => 'The attachments file size is too large, the maximum upload size is %1$d %2$s.<br />Please note this is set in php.ini and cannot be overridden.', 'PHP_SIZE_OVERRUN' => 'The attachments file size is too large, the maximum upload size is %1$d %2$s.<br />Please note this is set in php.ini and cannot be overridden.',
'PLACE_INLINE' => 'Place inline', 'PLACE_INLINE' => 'Place inline',

@@ -245,15 +245,12 @@ class upload
break; break;
case UPLOAD_ERR_NO_TMP_DIR: case UPLOAD_ERR_NO_TMP_DIR:
$error = 'Temporary folder could not be found. Please check your PHP installation.';
break;
case UPLOAD_ERR_CANT_WRITE: case UPLOAD_ERR_CANT_WRITE:
$error = 'Cant write to temporary folder.'; $error = $this->language->lang($this->error_prefix . 'NO_TEMP_DIR');
break; break;
case UPLOAD_ERR_EXTENSION: case UPLOAD_ERR_EXTENSION:
$error = 'A PHP extension has stopped the file upload.'; $error = $this->language->lang($this->error_prefix . 'PHP_UPLOAD_STOPPED');
break; break;
default: default:

@@ -110,9 +110,9 @@ class phpbb_files_upload_test extends phpbb_test_case
array(UPLOAD_ERR_FORM_SIZE, 'WRONG_FILESIZE'), array(UPLOAD_ERR_FORM_SIZE, 'WRONG_FILESIZE'),
array(UPLOAD_ERR_PARTIAL, 'PARTIAL_UPLOAD'), array(UPLOAD_ERR_PARTIAL, 'PARTIAL_UPLOAD'),
array(UPLOAD_ERR_NO_FILE, 'NOT_UPLOADED'), array(UPLOAD_ERR_NO_FILE, 'NOT_UPLOADED'),
array(UPLOAD_ERR_NO_TMP_DIR, 'Temporary folder could not be found. Please check your PHP installation.'), array(UPLOAD_ERR_NO_TMP_DIR, 'NO_TEMP_DIR'),
array(UPLOAD_ERR_CANT_WRITE, 'Cant write to temporary folder.'), array(UPLOAD_ERR_CANT_WRITE, 'NO_TEMP_DIR'),
array(UPLOAD_ERR_EXTENSION, 'A PHP extension has stopped the file upload.'), array(UPLOAD_ERR_EXTENSION, 'PHP_UPLOAD_STOPPED'),
array(9, false), array(9, false),
); );
} }