Issues

ZF-6877: Zend_Form_Decorator_FormErrors does not use I18n on label

Issue Type: Bug Created: 2009-06-01T12:09:57.000+0000 Last Updated: 2011-07-27T10:39:13.000+0000 Status: Resolved Fix version(s): - 1.10.0 (27/Jan/10)

Reporter: Steve Lounsbury (stephenminded) Assignee: Thomas Weidner (thomas) Tags: - Zend_Form

Related issues: - ZF-6080

Attachments: - formerrors-label-translate.diff

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

Comments

Posted by Steve Lounsbury (stephenminded) on 2009-06-01T12:11:22.000+0000

Sorry, patch doesn't seem to come out that well. I can provide a file if needed.

Posted by Harro van der Klauw (oximoron) on 2009-06-13T10:19:34.000+0000

Hey Steve, There is an attach file function for issues.

Please use that to attach the patch.

Posted by Steve Lounsbury (stephenminded) on 2009-06-13T15:36:19.000+0000

Diff attached. Sorry, I didn't see the "attach a file" link at first.

Posted by Thomas Weidner (thomas) on 2009-11-13T12:11:23.000+0000

Given patch not correct. Fixed with r18965.

Have you found an issue?

See the Overview section for more details.

Copyright

© 2006-2016 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.

Contacts