// Fix replace \\" by " in english keys and change french keys for errors files

This commit is contained in:
lLefevre
2012-03-15 08:31:12 +00:00
parent 18bb023205
commit 4f86c0d0ac
14 changed files with 163 additions and 161 deletions
+2 -2
View File
@@ -591,7 +591,7 @@ class AdminImagesControllerCore extends AdminController
$this->errors[] = Tools::displayError('Server timed out, the watermark may not have been applied to all images.');
if (!count($this->errors))
if ($this->_regenerateNoPictureImages($proc['dir'], $formats, $languages))
$this->errors[] = Tools::displayError('Cannot write \\"No picture\\" image to').' ('.$proc['type'].') '.Tools::displayError('images folder. Please check the folder\'s writing permissions.');
$this->errors[] = Tools::displayError('Cannot write "No picture" image to').' ('.$proc['type'].') '.Tools::displayError('images folder. Please check the folder\'s writing permissions.');
}
}
return (count($this->errors) > 0 ? false : true);
@@ -621,7 +621,7 @@ class AdminImagesControllerCore extends AdminController
$this->max_execution_time = (int)ini_get('max_execution_time');
$result = Image::moveToNewFileSystem($this->max_execution_time);
if ($result === 'timeout')
$this->errors[] = Tools::displayError('Not all images have been moved, server timed out before finishing. Click on \\"Move images\\" again to resume moving images');
$this->errors[] = Tools::displayError('Not all images have been moved, server timed out before finishing. Click on "Move images" again to resume moving images');
else if ($result === false)
$this->errors[] = Tools::displayError('Error: some or all images could not be moved.');
}
+2 -2
View File
@@ -2177,14 +2177,14 @@ class AdminImportControllerCore extends AdminController
If your server configuration allows it, you may add a directive in your .htaccess, for example:')
.'<br/><a href="'.$this->context->link->getAdminLink('AdminMeta').'" >
<code>php_value upload_max_filesize 20M</code> '.
Tools::displayError('(click to open \\"Generators\\" tab)').'</a>';
Tools::displayError('(click to open "Generators" tab)').'</a>';
break;
case UPLOAD_ERR_FORM_SIZE:
$this->errors[] = Tools::displayError('The uploaded file exceeds the post_max_size directive in php.ini.
If your server configuration allows it, you may add a directive in your .htaccess, for example:')
.'<br/><a href="'.$this->context->link->getAdminLink('AdminMeta').'" >
<code>php_value post_max_size 20M</code> '.
Tools::displayError('(click to open \\"Generators\\" tab)').'</a>';
Tools::displayError('(click to open "Generators" tab)').'</a>';
break;
break;
case UPLOAD_ERR_PARTIAL:
@@ -339,7 +339,7 @@ class AdminLanguagesControllerCore extends AdminController
else
{
$this->validateRules();
$this->errors[] = Tools::displayError('Flag and \\"No picture\\" image fields are required.');
$this->errors[] = Tools::displayError('Flag and "No picture" image fields are required.');
}
}
else
@@ -408,20 +408,20 @@ class AdminLanguagesControllerCore extends AdminController
if (!ImageManager::resize($tmp_name, _PS_IMG_DIR_.'p/'.$language.'.jpg'))
$this->errors[] = Tools::displayError('An error occurred while copying no-picture image to your product folder.');
if (!ImageManager::resize($tmp_name, _PS_IMG_DIR_.'c/'.$language.'.jpg'))
$this->errors[] = Tools::displayError('An error occurred while copying \\"No picture\\" image to your category folder.');
$this->errors[] = Tools::displayError('An error occurred while copying "No picture" image to your category folder.');
if (!ImageManager::resize($tmp_name, _PS_IMG_DIR_.'m/'.$language.'.jpg'))
$this->errors[] = Tools::displayError('An error occurred while copying \\"No picture\\" image to your manufacturer folder');
$this->errors[] = Tools::displayError('An error occurred while copying "No picture" image to your manufacturer folder');
else
{
$images_types = ImageType::getImagesTypes('products');
foreach ($images_types as $k => $image_type)
{
if (!ImageManager::resize($tmp_name, _PS_IMG_DIR_.'p/'.$language.'-default-'.stripslashes($image_type['name']).'.jpg', $image_type['width'], $image_type['height']))
$this->errors[] = Tools::displayError('An error occurred while resizing \\"No picture\\" image to your product directory.');
$this->errors[] = Tools::displayError('An error occurred while resizing "No picture" image to your product directory.');
if (!ImageManager::resize($tmp_name, _PS_IMG_DIR_.'c/'.$language.'-default-'.stripslashes($image_type['name']).'.jpg', $image_type['width'], $image_type['height']))
$this->errors[] = Tools::displayError('An error occurred while resizing \\"No picture\\" image to your category directory.');
$this->errors[] = Tools::displayError('An error occurred while resizing "No picture" image to your category directory.');
if (!ImageManager::resize($tmp_name, _PS_IMG_DIR_.'m/'.$language.'-default-'.stripslashes($image_type['name']).'.jpg', $image_type['width'], $image_type['height']))
$this->errors[] = Tools::displayError('An error occurred while resizing \\"No picture\\" image to your manufacturer directory.');
$this->errors[] = Tools::displayError('An error occurred while resizing "No picture" image to your manufacturer directory.');
}
}
unlink($tmp_name);
@@ -150,7 +150,7 @@ class AdminLocalizationControllerCore extends AdminController
$pack = @Tools::file_get_contents('http://api.prestashop.com/download/localization/'.$version.'/'.Tools::getValue('iso_localization_pack').'.xml');
if (!$pack && !($pack = @Tools::file_get_contents(dirname(__FILE__).'/../../localization/'.Tools::getValue('iso_localization_pack').'.xml')))
$this->errors[] = Tools::displayError('Cannot load localization pack (from prestashop.com and from your local folder \\"localization\\")');
$this->errors[] = Tools::displayError('Cannot load localization pack (from prestashop.com and from your local folder "localization")');
if (!$selection = Tools::getValue('selection'))
$this->errors[] = Tools::displayError('Please select at least one item to import.');
@@ -657,7 +657,7 @@ class AdminPerformanceControllerCore extends AdminController
if ($algo)
{
if (!function_exists('mcrypt_encrypt'))
$this->errors[] = Tools::displayError('PHP \\"Mcrypt\\" extension is not activated on this server.');
$this->errors[] = Tools::displayError('PHP "Mcrypt" extension is not activated on this server.');
else
{
if (!strstr($settings, '_RIJNDAEL_KEY_'))
@@ -2751,7 +2751,7 @@ class AdminProductsControllerCore extends AdminController
if (!file_exists($exists_file)
&& !empty($product->productDownload->display_filename)
&& !empty($product->cache_default_attribute))
$msg = sprintf(Tools::displayError('This file \\"%s\\" is missing'), $product->productDownload->display_filename);
$msg = sprintf(Tools::displayError('This file "%s" is missing'), $product->productDownload->display_filename);
else
$msg = '';
@@ -2785,7 +2785,7 @@ class AdminProductsControllerCore extends AdminController
$exists_file2 = realpath(_PS_DOWNLOAD_DIR_).'/'.$product_download_attribute->filename;
if (!file_exists($exists_file2) && !empty($product_download_attribute->id_product_attribute))
{
$msg = sprintf(Tools::displayError('This file \\"%s\\" is missing'), $product_download_attribute->display_filename);
$msg = sprintf(Tools::displayError('This file "%s" is missing'), $product_download_attribute->display_filename);
$error .= '<p class="alert" id="file_missing">
<b>'.$msg.' :<br/>
'.realpath(_PS_DOWNLOAD_DIR_).'/'.$product_download_attribute->filename.'</b>
@@ -68,7 +68,7 @@ class AdminTranslationsControllerCore extends AdminController
$this->content .= $this->{$method_name}(Tools::strtolower(Tools::getValue('lang')));
else
{
$this->errors[] = sprintf(Tools::displayError('\\"%s\\" does not exist. Maybe you typed the URL manually.'), $type);
$this->errors[] = sprintf(Tools::displayError('"%s" does not exist. Maybe you typed the URL manually.'), $type);
$this->content .= $this->initMain();
}
}