Issue Type: Bug Created: 2010-08-10T04:12:00.000+0000 Last Updated: 2011-04-06T17:56:24.000+0000 Status: Open Fix version(s): Reporter: Stefan Bradl (madrenegade) Assignee: Christian Albrecht (alab) Tags: - Zend_Form
Related issues: Attachments:
I have noticed that Zend_Navigation does not handle plural forms correctly. If you use a plural message id for the label element inside a xml navigation config file the label will not get translated and an empty label is shown.
Zend_Form also seems to have problems with this. When using a plural form for labels the following warning occurs: PHP Warning: trim() expects parameter 1 to be string, array given in /usr/share/php/Zend/Form/Decorator/Label.php on line 254
I recently noticed what the real problem could be:
I have a gettext translation with this entry: msgid "CATEGORY" msgid_plural "CATEGORIES" msgstr "Category" msgstr "Categories"
Now when you use "CATEGORIES" as a label for a form element or a navigation element the translation adapter is called with this string as messageId This messageId cannot be found because for plural translations an array is expected by the translate function but a string is given.
Posted by Kai Uwe (kaiuwe) on 2011-04-06T12:06:24.000+0000
You can use not only the messageId for plural, because Zend_Translate and Gettext from PHP doesn't support it.
Think out loud: The both methods Zend_Navigation_Page::setLabel() and Zend_Form_Element::setLabel() accept an array like Zend_Translate_Adapter::translate()?
Have you found an issue?
See the Overview section for more details.