Details
Description
Forms with a translator do not translate element labels in the list of form errors. I believe the problem exists in Zend_Form_Decorator_FormErrors::renderLabel. Following a similar pattern to Zend_Form_Decorator_Label, the following patch should provide the functionality (patch against trunk r15870):
Index: library/Zend/Form/Decorator/FormErrors.php
===================================================================
— library/Zend/Form/Decorator/FormErrors.php (revision 15870)
+++ library/Zend/Form/Decorator/FormErrors.php (working copy)
@@ -351,6 +351,10 @@
$label = $element->getName();
}
+ if (null !== ($translator = $element->getTranslator())) {
+ $label = $translator->translate($label);
+ }
+
return $this->getMarkupElementLabelStart()
. $view->escape($label)
. $this->getMarkupElementLabelEnd();
Thanks
Sorry, patch doesn't seem to come out that well. I can provide a file if needed.