This is a bug in the code.
The messagekeys should be unique like in all other classes.

A simple solution would be to rename the 'invalid' to 'invalidupca' and 'invalidean13'.

Just open a issue in jira so the related developer can fix is.

Greetings
Thomas Weidner, I18N Team Leader, Zend Framework
http://www.thomasweidner.com

----- Original Message ----- From: "Václav Vaník" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Monday, August 11, 2008 11:18 AM
Subject: [fw-general] Unable to translate correct Barcode error message



Hi,

I think 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.

Is it bug or feature? :)
--
View this message in context: http://www.nabble.com/Unable-to-translate-correct-Barcode-error-message-tp18922356p18922356.html Sent from the Zend Framework mailing list archive at Nabble.com.

Reply via email to