[-] 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
+5 -2
View File
@@ -287,8 +287,11 @@ class SupplyOrderDetailCore extends ObjectModel
/* Checks maximum fields sizes */
foreach ($this->fieldsSize as $field => $max_length)
if ($value = $this->{$field} && Tools::strlen($value) > $max_length)
$errors[] = '<b>'.SupplyOrderDetail::displayFieldName($field, get_class($this), $htmlentities)
.'</b> '.Tools::displayError('is too long.').' ('.Tools::displayError('Maximum length:').' '.$max_length.')';
$errors[] = sprintf(
Tools::displayError('%1$s is too long. Maximum length: %2$d'),
SupplyOrderDetail::displayFieldName($field, get_class($this), $htmlentities),
$max_length
);
/* Checks fields validity */
foreach ($this->fieldsValidate as $field => $function)