Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
Minor
-
Resolution: Fixed
-
Affects Version/s: 1.5.3
-
Fix Version/s: 1.10.0
-
Component/s: Zend_Validate
-
Labels:None
Description
I found a bug in Zend_Validate_Barcode_UpcA and Zend_Validate_Barcode_Ean13.
These validators have same constant value for error messages:
class Zend_Validate_Barcode_UpcA
..
protected $_messageTemplates = array(
self::INVALID => "'%value%' is an invalid UPC-A barcode",
self::INVALID_LENGTH => "'%value%' should be 12 characters",
);
..
class Zend_Validate_Barcode_Ean13
...
protected $_messageTemplates = array(
self::INVALID => "'%value%' is an invalid EAN-13 barcode",
self::INVALID_LENGTH => "'%value%' should be 13 characters",
);
...
So I am unable to translate right error message with e.g. Tmx adapter because translation ids are identical.
A simple solution would be to rename the 'invalid' to 'invalidupca' and 'invalidean13'.
I cannot fix this issue without a BC break. I have postponed it for now, until Matthew can tell me more.