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

This commit is contained in:
lLefevre
2012-05-14 11:45:41 +00:00
parent 97a37ff566
commit 83703dc4ee
21 changed files with 830 additions and 761 deletions
+5 -2
View File
@@ -867,8 +867,11 @@ abstract class ObjectModelCore
// Checking for maximum fields sizes
if (isset($data['size']) && ($value = Tools::getValue($field, $this->{$field})) && Tools::strlen($value) > $data['size'])
$errors[] = '<b>'.self::displayFieldName($field, get_class($this), $htmlentities).'</b> '.Tools::displayError('is too long.')
.' ('.Tools::displayError('Maximum length:').' '.$data['size'].')';
$errors[] = sprintf(
Tools::displayError('%1$s is too long. Maximum length: %2$d'),
self::displayFieldName($field, get_class($this), $htmlentities),
$data['size']
);
// Checking for fields validity
// Hack for postcode required for country which does not have postcodes