// Fix update english key of translations in all files
This commit is contained in:
@@ -120,7 +120,7 @@ class AddressFormatCore extends ObjectModel
|
||||
$isValide = false;
|
||||
|
||||
if (!class_exists($className))
|
||||
$this->_errorFormatList[] = Tools::displayError('This class name doesn\'t exist').
|
||||
$this->_errorFormatList[] = Tools::displayError('This class name does not exist.').
|
||||
': '.$className;
|
||||
else
|
||||
{
|
||||
@@ -138,7 +138,7 @@ class AddressFormatCore extends ObjectModel
|
||||
}
|
||||
|
||||
if (!$isValide)
|
||||
$this->_errorFormatList[] = Tools::displayError('This property doesn\'t exist in the class or is forbidden').
|
||||
$this->_errorFormatList[] = Tools::displayError('This property does not exist in the class or is forbidden.').
|
||||
': '.$className.': '.$fieldName;
|
||||
|
||||
unset($obj);
|
||||
@@ -162,26 +162,26 @@ class AddressFormatCore extends ObjectModel
|
||||
{
|
||||
$totalNameUsed = count($associationName);
|
||||
if ($totalNameUsed > 2)
|
||||
$this->_errorFormatList[] = Tools::displayError('This assocation contains too much key name');
|
||||
$this->_errorFormatList[] = Tools::displayError('This association has too many elements.');
|
||||
else if ($totalNameUsed == 1)
|
||||
{
|
||||
$associationName[0] = strtolower($associationName[0]);
|
||||
if (in_array($associationName[0], self::$forbiddenPropertyList) ||
|
||||
!$this->_checkValidateClassField('Address', $associationName[0], false))
|
||||
$this->_errorFormatList[] = Tools::displayError('This name isn\'t allowed').': '.
|
||||
$this->_errorFormatList[] = Tools::displayError('This name is not allowed.').': '.
|
||||
$associationName[0];
|
||||
}
|
||||
else if ($totalNameUsed == 2)
|
||||
{
|
||||
if (empty($associationName[0]) || empty($associationName[1]))
|
||||
$this->_errorFormatList[] = Tools::displayError('Syntax error with this pattern').': '.$patternName;
|
||||
$this->_errorFormatList[] = Tools::displayError('Syntax error with this pattern.').': '.$patternName;
|
||||
else
|
||||
{
|
||||
$associationName[0] = ucfirst($associationName[0]);
|
||||
$associationName[1] = strtolower($associationName[1]);
|
||||
|
||||
if (in_array($associationName[0], self::$forbiddenClassList))
|
||||
$this->_errorFormatList[] = Tools::displayError('This name isn\'t allowed').': '.
|
||||
$this->_errorFormatList[] = Tools::displayError('This name is not allowed.').': '.
|
||||
$associationName[0];
|
||||
else
|
||||
{
|
||||
@@ -222,7 +222,7 @@ class AddressFormatCore extends ObjectModel
|
||||
$usedKeyList[] = $patternName;
|
||||
}
|
||||
else
|
||||
$this->_errorFormatList[] = Tools::displayError('This key is used too many times (once allowed)').
|
||||
$this->_errorFormatList[] = Tools::displayError('This key has already been used.').
|
||||
': '.$patternName;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -416,7 +416,7 @@ abstract class AdminTabCore
|
||||
{
|
||||
if (!$adminTab->viewAccess())
|
||||
{
|
||||
echo Tools::displayError('Access denied');
|
||||
echo Tools::displayError('Access denied.');
|
||||
return false;
|
||||
}
|
||||
if (!count($actions))
|
||||
@@ -865,7 +865,7 @@ abstract class AdminTabCore
|
||||
if (isset($value[0]) && !empty($value[0]))
|
||||
{
|
||||
if (!Validate::isDate($value[0]))
|
||||
$this->_errors[] = Tools::displayError('\'from:\' date format is invalid (YYYY-MM-DD)');
|
||||
$this->_errors[] = Tools::displayError('\'From:\' date format is invalid (YYYY-MM-DD)');
|
||||
else
|
||||
$sqlFilter .= ' AND '.$key.' >= \''.pSQL(Tools::dateFrom($value[0])).'\'';
|
||||
}
|
||||
@@ -873,7 +873,7 @@ abstract class AdminTabCore
|
||||
if (isset($value[1]) && !empty($value[1]))
|
||||
{
|
||||
if (!Validate::isDate($value[1]))
|
||||
$this->_errors[] = Tools::displayError('\'to:\' date format is invalid (YYYY-MM-DD)');
|
||||
$this->_errors[] = Tools::displayError('\'To:\' date format is invalid (YYYY-MM-DD)');
|
||||
else
|
||||
$sqlFilter .= ' AND '.$key.' <= \''.pSQL(Tools::dateTo($value[1])).'\'';
|
||||
}
|
||||
|
||||
+1
-1
@@ -103,7 +103,7 @@ class BackupCore
|
||||
$backupdir = realpath(_PS_ADMIN_DIR_.self::$backupDir);
|
||||
|
||||
if ($backupdir === false)
|
||||
die(Tools::displayError('Backups directory does not exist.'));
|
||||
die(Tools::displayError('\\"Backup\\" directory does not exist.'));
|
||||
|
||||
// Check the realpath so we can validate the backup file is under the backup directory
|
||||
if (!empty($filename))
|
||||
|
||||
+1
-1
@@ -2318,7 +2318,7 @@ class CartCore extends ObjectModel
|
||||
$carrier = self::$_carriers[$id_carrier];
|
||||
|
||||
if (!Validate::isLoadedObject($carrier))
|
||||
die(Tools::displayError('Fatal error: "no default carrier"'));
|
||||
die(Tools::displayError('Fatal error: \\"no default carrier\\"'));
|
||||
|
||||
if (!$carrier->active)
|
||||
return $shipping_cost;
|
||||
|
||||
@@ -340,7 +340,7 @@ class CartRuleCore extends ObjectModel
|
||||
if (!$this->active)
|
||||
return Tools::displayError('This voucher is disabled');
|
||||
if (!$this->quantity)
|
||||
return Tools::displayError('This voucher has already been used ');
|
||||
return Tools::displayError('This voucher has already been used');
|
||||
if (strtotime($this->date_from) > time())
|
||||
return Tools::displayError('This voucher is not valid yet');
|
||||
if (strtotime($this->date_to) < time())
|
||||
@@ -496,7 +496,7 @@ class CartRuleCore extends ObjectModel
|
||||
}
|
||||
|
||||
if ($cartTotal < $minimum_amount)
|
||||
return Tools::displayError('You do not reach the minimum amount required to use this voucher');
|
||||
return Tools::displayError('You have not reached the minimum amount required to use this voucher');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -78,10 +78,10 @@ class FileUploaderCore
|
||||
$pathinfo = pathinfo($this->file->getName());
|
||||
$these = implode(', ', $this->allowedExtensions);
|
||||
if (!isset($pathinfo['extension']))
|
||||
return array('error' => Tools::displayError('File has an invalid extension, it should be one of ').$these.'.');
|
||||
return array('error' => Tools::displayError('File has an invalid extension, it should be one of').$these.'.');
|
||||
$ext = $pathinfo['extension'];
|
||||
if ($this->allowedExtensions && !in_array(strtolower($ext), $this->allowedExtensions))
|
||||
return array('error' => Tools::displayError('File has an invalid extension, it should be one of ').$these.'.');
|
||||
return array('error' => Tools::displayError('File has an invalid extension, it should be one of').$these.'.');
|
||||
|
||||
return $this->file->save();
|
||||
|
||||
@@ -98,7 +98,7 @@ class QqUploadedFileForm
|
||||
{
|
||||
$product = new Product($_GET['id_product']);
|
||||
if (!Validate::isLoadedObject($product))
|
||||
return array('error' => Tools::displayError('Cannot add image because product add failed.'));
|
||||
return array('error' => Tools::displayError('Cannot add image because product creation failed.'));
|
||||
else
|
||||
{
|
||||
$image = new Image();
|
||||
@@ -182,7 +182,7 @@ class QqUploadedFileXhr
|
||||
{
|
||||
$product = new Product($_GET['id_product']);
|
||||
if (!Validate::isLoadedObject($product))
|
||||
return array('error' => Tools::displayError('Cannot add image because product add failed.'));
|
||||
return array('error' => Tools::displayError('Cannot add image because product creation failed.'));
|
||||
else
|
||||
{
|
||||
$image = new Image();
|
||||
|
||||
@@ -216,11 +216,11 @@ 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 Tools::displayError('Image is too large').' ('.($file['size'] / 1000).Tools::displayError('kB').'). '.Tools::displayError('Maximum allowed:').' '.($max_file_size / 1000).Tools::displayError('kB');
|
||||
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 Tools::displayError('Error while uploading image; please change your server\'s settings.').'('.Tools::displayError('Error code:').$file['error'].')';
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -43,7 +43,7 @@ abstract class ImportModuleCore extends Module
|
||||
if (!mysql_select_db($this->database, $this->_link))
|
||||
die(Tools::displayError('The database selection cannot be made.'));
|
||||
if (!mysql_query('SET NAMES \'utf8\'', $this->_link))
|
||||
die(Tools::displayError('PrestaShop Fatal error: no utf-8 support. Please check your server configuration.'));
|
||||
die(Tools::displayError('Fatal error: no UTF-8 support. Please check your server configuration.'));
|
||||
}
|
||||
else
|
||||
die(Tools::displayError('Link to database cannot be established.'));
|
||||
|
||||
@@ -339,7 +339,7 @@ class LocalizationPackCore
|
||||
|
||||
if (!$gz->extract(_PS_TRANSLATIONS_DIR_.'../', false))
|
||||
{
|
||||
$this->_errors[] = Tools::displayError('Cannot decompress the translation file of the language: ').(string)$attributes['iso_code'];
|
||||
$this->_errors[] = Tools::displayError('Cannot decompress the translation file for the following language: ').(string)$attributes['iso_code'];
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -378,7 +378,7 @@ class LocalizationPackCore
|
||||
$attributes = $data->attributes();
|
||||
if (!isset($varNames[strval($attributes['type'])]))
|
||||
{
|
||||
$this->_errors[] = Tools::displayError('Pack corrupted: wrong unit type.');
|
||||
$this->_errors[] = Tools::displayError('Localization pack corrupted: wrong unit type.');
|
||||
return false;
|
||||
}
|
||||
if (!Configuration::updateValue($varNames[strval($attributes['type'])], strval($attributes['value'])))
|
||||
@@ -410,17 +410,17 @@ class LocalizationPackCore
|
||||
{
|
||||
if (!Module::isInstalled($name))
|
||||
if (!$module->install())
|
||||
$this->_errors[] = Tools::displayError('An error has occured during the module installation: ').$name;
|
||||
$this->_errors[] = Tools::displayError('An error occurred while installing the module:').$name;
|
||||
}
|
||||
else
|
||||
if (Module::isInstalled($name))
|
||||
if (!$module->uninstall())
|
||||
$this->_errors[] = Tools::displayError('An error has occured during the module uninstall: ').$name;
|
||||
$this->_errors[] = Tools::displayError('An error occurred while uninstalling the module:').$name;
|
||||
|
||||
unset($module);
|
||||
}
|
||||
else
|
||||
$this->_errors[] = Tools::displayError('An error has occured, this module doesnt exists: ').$name;
|
||||
$this->_errors[] = Tools::displayError('An error has occurred, this module does not exist:').$name;
|
||||
}
|
||||
|
||||
return true;
|
||||
@@ -457,10 +457,10 @@ class LocalizationPackCore
|
||||
$group = new Group((int)_PS_DEFAULT_CUSTOMER_GROUP_);
|
||||
$group->price_display_method = (int)$attributes['price_display_method'];
|
||||
if (!$group->save())
|
||||
$this->_errors[] = Tools::displayError('An error has occured during the default group update');
|
||||
$this->_errors[] = Tools::displayError('An error has occurred during the default group update');
|
||||
}
|
||||
else
|
||||
$this->_errors[] = Tools::displayError('An error has occured during the default group update');
|
||||
$this->_errors[] = Tools::displayError('An error has occurred during the default group update');
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
+8
-8
@@ -60,23 +60,23 @@ class MailCore
|
||||
|
||||
if (!empty($from) && !Validate::isEmail($from))
|
||||
{
|
||||
Tools::dieOrLog(Tools::displayError('Error: parameter "from" is corrupted'), $die);
|
||||
Tools::dieOrLog(Tools::displayError('Error: parameter \\"from\\" is corrupted'), $die);
|
||||
return false;
|
||||
}
|
||||
if (!empty($fromName) && !Validate::isMailName($fromName))
|
||||
{
|
||||
Tools::dieOrLog(Tools::displayError('Error: parameter "fromName" is corrupted'), $die);
|
||||
Tools::dieOrLog(Tools::displayError('Error: parameter \\"fromName\\" is corrupted'), $die);
|
||||
return false;
|
||||
}
|
||||
if (!is_array($to) && !Validate::isEmail($to))
|
||||
{
|
||||
Tools::dieOrLog(Tools::displayError('Error: parameter "to" is corrupted'), $die);
|
||||
Tools::dieOrLog(Tools::displayError('Error: parameter \\"to\\" is corrupted'), $die);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!is_array($templateVars))
|
||||
{
|
||||
Tools::dieOrLog(Tools::displayError('Error: parameter "templateVars" is not an array'), $die);
|
||||
Tools::dieOrLog(Tools::displayError('Error: parameter \\"templateVars\\" is not an array'), $die);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -89,13 +89,13 @@ class MailCore
|
||||
|
||||
if (!Validate::isTplName($template))
|
||||
{
|
||||
Tools::dieOrLog(Tools::displayError('Error: invalid email template'), $die);
|
||||
Tools::dieOrLog(Tools::displayError('Error: invalid e-mail template'), $die);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!Validate::isMailSubject($subject))
|
||||
{
|
||||
Tools::dieOrLog(Tools::displayError('Error: invalid email subject'), $die);
|
||||
Tools::dieOrLog(Tools::displayError('Error: invalid e-mail subject'), $die);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -109,7 +109,7 @@ class MailCore
|
||||
$addr = trim($addr);
|
||||
if (!Validate::isEmail($addr))
|
||||
{
|
||||
Tools::dieOrLog(Tools::displayError('Error: invalid email address'), $die);
|
||||
Tools::dieOrLog(Tools::displayError('Error: invalid e-mail address'), $die);
|
||||
return false;
|
||||
}
|
||||
if (is_array($toName))
|
||||
@@ -179,7 +179,7 @@ class MailCore
|
||||
}
|
||||
else if (!file_exists($templatePath.$template.'.txt') || !file_exists($templatePath.$template.'.html'))
|
||||
{
|
||||
Tools::dieOrLog(Tools::displayError('Error - The following email template is missing:').' '.$templatePath.$template.'.txt', $die);
|
||||
Tools::dieOrLog(Tools::displayError('Error - The following e-mail template is missing:').' '.$templatePath.$template.'.txt', $die);
|
||||
return false;
|
||||
}
|
||||
$templateHtml = file_get_contents($templatePath.$template.'.html');
|
||||
|
||||
+2
-2
@@ -933,7 +933,7 @@ abstract class ModuleCore
|
||||
$memory_threshold = (Tools::isX86_64arch() ? 3 : 1.5);
|
||||
if (($memory_limit - $current_memory) <= ($memory_threshold * 1024 * 1024))
|
||||
{
|
||||
$errors[] = Tools::displayError('All modules cannot be loaded due to memory limit restriction reason, please increase your memory_limit value on your server configuration');
|
||||
$errors[] = Tools::displayError('All modules cannot be loaded due to memory limit restrictions, please increase your memory_limit value on your server configuration');
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -1121,7 +1121,7 @@ abstract class ModuleCore
|
||||
|
||||
if ($errors)
|
||||
{
|
||||
echo '<div class="alert error"><h3>'.Tools::displayError('The following module(s) couldn\'t be loaded').':</h3><ol>';
|
||||
echo '<div class="alert error"><h3>'.Tools::displayError('The following module(s) could not be loaded').':</h3><ol>';
|
||||
foreach ($errors as $error)
|
||||
echo '<li>'.$error.'</li>';
|
||||
echo '</ol></div>';
|
||||
|
||||
@@ -232,7 +232,7 @@ abstract class PaymentModuleCore extends Module
|
||||
if (!$order_creation_failed & isset($order->id))
|
||||
{
|
||||
if (!$secure_key)
|
||||
$message .= '<br />'.Tools::displayError('Warning : the secure key is empty, check your payment account before validation');
|
||||
$message .= '<br />'.Tools::displayError('Warning: the secure key is empty, check your payment account before validation');
|
||||
// Optional message to attach to this order
|
||||
if (isset($message) & !empty($message))
|
||||
{
|
||||
|
||||
@@ -269,7 +269,7 @@ class AdminControllerCore extends Controller
|
||||
1 => $this->l('Deletion successful'), 2 => $this->l('Selection successfully deleted'),
|
||||
3 => $this->l('Creation successful'), 4 => $this->l('Update successful'),
|
||||
5 => $this->l('Status update successful'), 6 => $this->l('Settings update successful'),
|
||||
7 => $this->l('Image successfully deleted'), 8 => $this->l('Module downloaded successfully'),
|
||||
7 => $this->l('Image successfully deleted'), 8 => $this->l('Module downloaded successfullyc'),
|
||||
9 => $this->l('Thumbnails successfully regenerated'), 10 => $this->l('Message sent to the customer'),
|
||||
11 => $this->l('Comment added'), 12 => $this->l('Module(s) installed successfully'),
|
||||
13 => $this->l('Module(s) uninstalled successfully'), 14 => $this->l('Language successfully copied'),
|
||||
@@ -277,12 +277,12 @@ class AdminControllerCore extends Controller
|
||||
17 => $this->l('Module removed successfully from hook'), 18 => $this->l('Upload successful'),
|
||||
19 => $this->l('Duplication completed successfully'), 20 => $this->l('Translation added successfully but the language has not been created'),
|
||||
21 => $this->l('Module reset successfully'), 22 => $this->l('Module deleted successfully'),
|
||||
23 => $this->l('Localization pack imported successfully'), 24 => $this->l('Refund Successful'),
|
||||
23 => $this->l('Localization pack imported successfully'), 24 => $this->l('Localization pack imported successfully'),
|
||||
25 => $this->l('Images successfully moved'),
|
||||
26 => $this->l('Cover selection saved'),
|
||||
27 => $this->l('Image shop association modified'),
|
||||
28 => $this->l('Zone affected to the selection successfully'),
|
||||
29 => $this->l('Upgrade succeed')
|
||||
28 => $this->l('Zone assigned to the selection successfully'),
|
||||
29 => $this->l('Upgrade successful')
|
||||
);
|
||||
if (!$this->identifier) $this->identifier = 'id_'.$this->table;
|
||||
if (!$this->_defaultOrderBy) $this->_defaultOrderBy = $this->identifier;
|
||||
@@ -425,7 +425,7 @@ class AdminControllerCore extends Controller
|
||||
if (isset($value[0]) && !empty($value[0]))
|
||||
{
|
||||
if (!Validate::isDate($value[0]))
|
||||
$this->errors[] = Tools::displayError('\'from:\' date format is invalid (YYYY-MM-DD)');
|
||||
$this->errors[] = Tools::displayError('\'From:\' date format is invalid (YYYY-MM-DD)');
|
||||
else
|
||||
$sql_filter .= ' AND '.pSQL($key).' >= \''.pSQL(Tools::dateFrom($value[0])).'\'';
|
||||
}
|
||||
@@ -433,7 +433,7 @@ class AdminControllerCore extends Controller
|
||||
if (isset($value[1]) && !empty($value[1]))
|
||||
{
|
||||
if (!Validate::isDate($value[1]))
|
||||
$this->errors[] = Tools::displayError('\'to:\' date format is invalid (YYYY-MM-DD)');
|
||||
$this->errors[] = Tools::displayError('\'To:\' date format is invalid (YYYY-MM-DD)');
|
||||
else
|
||||
$sql_filter .= ' AND '.pSQL($key).' <= \''.pSQL(Tools::dateTo($value[1])).'\'';
|
||||
}
|
||||
|
||||
@@ -342,7 +342,7 @@ class HelperListCore extends Helper
|
||||
protected function displayDuplicateLink($token = null, $id, $name = null)
|
||||
{
|
||||
$tpl = $this->createTemplate('list_action_duplicate.tpl');
|
||||
if (!array_key_exists('Duplicate', self::$cache_lang))
|
||||
if (!array_key_exists('Bad SQL query', self::$cache_lang))
|
||||
self::$cache_lang['Duplicate'] = $this->l('Duplicate', 'Helper');
|
||||
|
||||
if (!array_key_exists('Copy images too?', self::$cache_lang))
|
||||
@@ -449,7 +449,7 @@ class HelperListCore extends Helper
|
||||
self::$cache_lang['Delete'] = $this->l('Delete', 'Helper');
|
||||
|
||||
if (!array_key_exists('DeleteItem', self::$cache_lang))
|
||||
self::$cache_lang['DeleteItem'] = $this->l('Delete selected item ?', 'Helper');
|
||||
self::$cache_lang['DeleteItem'] = $this->l('Delete selected item?', 'Helper');
|
||||
|
||||
if (!array_key_exists('Name', self::$cache_lang))
|
||||
self::$cache_lang['Name'] = $this->l('Name:', 'Helper');
|
||||
|
||||
Reference in New Issue
Block a user