Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
Minor
-
Resolution: Fixed
-
Affects Version/s: 1.7.8, 1.8.0, 1.8.1, Next Major Release
-
Fix Version/s: 1.10.6
-
Component/s: Zend_Dojo, Zend_Form, Zend_Validate
-
Labels:None
Description
Not found translations are logged in the translators translate() Method if the translations does not exist.
Zend/Validate/Abstract.php, Zend/Form/Element/Multi.php and Zend/Dojo/Form/Element/DijitMulti.php first check if there is an existing translation with isTranslated() and only if theres a translation the translate() Method is called. If the translation does not exist, the translation won't be logged because of the missing call of translate()!
I've two ways to solve this problem:
- change Zend_Validate_Abstract etc. to just call translate() instead of checking if there is an existing translation
or
- enable logging of missing translations in method isTranslated() in Zend_Translate
Maybe there are more components affected by this issue.
This problem is still open in version 1.10.4.
Reproducing it is quite simple, just create a Zend_Form_Element_Select field with a translator enabled and no translation done and add a few values in it.
At line 311 in Zend_Form_Element_Multi, you'll see that this code is called :
and Zend_Translate_Adapter->isTranslated() method doesn't log anything before returning false.
So all the values in that select field won't figure in the missing translations log.