[-] FO : #PSCFV-2151 : Translations of errors are connected width sprintf()

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@15265 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
lLefevre
2012-05-14 11:45:41 +00:00
parent f3ad820a08
commit 897c6acb82
21 changed files with 830 additions and 761 deletions
+11 -3
View File
@@ -216,11 +216,15 @@ class ImageManagerCore
public static function validateUpload($file, $max_file_size = 0)
{
if ((int)$max_file_size > 0 && $file['size'] > (int)$max_file_size)
return Tools::displayError('Image is too large').' ('.($file['size'] / 1000).Tools::displayError('kB').'). '.Tools::displayError('Maximum allowed:').' '.($max_file_size / 1000).Tools::displayError('kB');
return sprintf(
Tools::displayError('Image is too large (%1$d kB). Maximum allowed: %2$d kB'),
$file['size'] / 1000,
$max_file_size / 1000
);
if (!ImageManager::isRealImage($file['tmp_name'], $file['type']))
return Tools::displayError('Image format not recognized, allowed formats are: .gif, .jpg, .png');
if ($file['error'])
return Tools::displayError('Error while uploading image; please change your server\'s settings.').'('.Tools::displayError('Error code:').$file['error'].')';
return sprintf(Tools::displayError('Error while uploading image; please change your server\'s settings. (Error code: %s)'), $file['error']);
return false;
}
@@ -234,7 +238,11 @@ class ImageManagerCore
public static function validateIconUpload($file, $max_file_size = 0)
{
if ((int)$max_file_size > 0 && $file['size'] > $max_file_size)
return Tools::displayError('Image is too large').' ('.($file['size'] / 1000).'ko). '.Tools::displayError('Maximum allowed:').' '.($max_file_size / 1000).'ko';
return sprintf(
Tools::displayError('Image is too large (%1$d kB). Maximum allowed: %2$d kB'),
$file['size'] / 1000,
$max_file_size / 1000
);
if (substr($file['name'], -4) != '.ico')
return Tools::displayError('Image format not recognized, allowed formats are: .ico');
if ($file['error'])