| Kongregate Registration for Free Flash Games and Chat with solprovider | |
![]() |
Validation Popups do not use i18n | |
|
This article is about fixing Cocoon's Forms block to use i18n for error messages.
The Cocoon Forms block adds functionality for processing Forms. Just copy the cocoon-2.1.6-src/cocoon-2.1.6/src/blocks/forms/samples/resources directory inside Lenya. I recommend apache-lenya-1.2.2/build/lenya/webapp/lenya/resources/forms. It changes validation messages from displaying text to displaying an exclamation mark as a link to the message. That is a really bad interface decision, but I left it. There is a bug in that code so the error messages are not processed by i18n. This is the fix:
FILE: forms-field-styling.xsl ADD: xmlns:i18n="http://apache.org/cocoon/i18n/2.1"
to the xsl:stylesheet tag to avoid the error: The prefix "i18n" for element "i18n:text" is not bound.
FIND: <xsl:template match="fi:validation-message">
REPLACE WITH: <xsl:template match="fi:validation-message">
|