Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 1.5.1
-
Fix Version/s: 1.10.0
-
Component/s: Zend_Validate
-
Labels:None
Description
Several Zend_Validate sub-classes use non-unique messageTemplate keys, making it impossible to provide translations.
'invalid'
Zend_Validate_Barcode_UpcA
Zend_Validate_Barcode_Ean13
'invalidLength'
Zend_Validate_Barcode_UpcA
Zend_Validate_Barcode_Ean13
'stringEmpty'
Zend_Validate_Alpha
Zend_Validate_Alnum
Zend_Validate_Digits
Since the messageTemplate keys are what is used to look up translation strings, these cannot all be translated properly. Implementing standard practice of prefixing these keys with a class name would help resolve the issue, but could break existing setups, ie:
barcodeUpcAInvalid
barcodeEan13Invalid
barcodeUpcAInvalidLength
barcodeEan13InvalidLength
alphaStringEmpty
alnumStringEmpty
digitsStringEmpty
etc.
Many others are not currently prefixed in this way, but are still unique and so do not trigger this issue at present.
Issue Links
| This issue is dependecy of: | ||||
| ZF-3920 | Unable to translate correct Barcode error message |
|
|
|
| ZF-4514 | language packs |
|
|
|
| This issue is duplicated by: | ||||
| ZF-5945 | Zend_Validate_Barcode_Ean13 and Zend_Validate_Barcode_UpcA error messages should handle differents keys |
|
|
|
| This issue is related to: | ||||
| ZF-6764 | Minor misconception in Zend_Validate messages processing |
|
|
|
| ZF-2397 | Zend_Validate classes should have consistent values for error message constants |
|
|
|
If we'd like to address this, maybe we can coordinate with Thomas on it?