ZF-7180: Zend_Captcha validation messages are not static which makes them harder to translate

Issue Type: Improvement Created: 2009-07-02T02:26:14.000+0000 Last Updated: 2010-04-07T17:55:46.000+0000 Status: Resolved Fix version(s): Reporter: Aron Rotteveel (arondeparon) Assignee: Stanislav Malyshev (stas) Tags: - Zend_Captcha

Related issues: Attachments:


I use one translate adapter for all my forms, but cannot seem to translate the captcha error messages.

For example, it's really easy to be able to define

Zend_Validate_NotEmpty::IS_EMPTY => 'Some localized errormessage'

but this seems impossible with the current CAPTCHA adapter.


Posted by Stanislav Malyshev (stas) on 2009-11-24T17:04:33.000+0000

I'm not sure I understand the problem... Captcha adapters do have message templates, e.g. recaptcha:

protected $_messageTemplates = array(
    self::MISSING_VALUE => 'Missing captcha fields',
    self::ERR_CAPTCHA   => 'Failed to validate captcha',
    self::BAD_CAPTCHA   => 'Captcha value is wrong: %value%',

vs. NotEmpty

protected $_messageTemplates = array(
    self::IS_EMPTY => "Value is required and can't be empty",
    self::INVALID  => "Invalid type given, value should be float, string, array, boolean or integer",

So what exactly is missing for you there?

Posted by Stanislav Malyshev (stas) on 2010-04-07T17:55:46.000+0000

The problem not clear, please reopen with clarification if needed.

Have you found an issue?

See the Overview section for more details.


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

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