ZF-4985: Zend_Form_Element_File does not translate error message when translator is set at the form level

Description

There was a similar ticket opened which was marked as resolved (ZF-4150), but I am still having the error in ZF 1.7

When setting a translator at the form level, the error messages are all translated for all elements except for the File element

Code to reproduce error, submit the form without selecting a file and you will see the error message remains un-translated:


$form = new Zend_Form();

$translate = new Zend_Translate('array', array(
    Zend_Validate_File_Upload::NO_FILE => 'Test translation',
), 'en');
Zend_Form::setDefaultTranslator($translate);

$form->setAttrib('enctype', 'multipart/form-data');

$form->addElement('file', 'upload', array(
    'label' => 'Upload',
    'required' => true
));

$form->addElement('submit', 'save', array(
    'label' => 'Upload'
));

if ($this->getRequest()->isPost() && $form->isValid($_POST)) {
    // process form
}

$this->view->form = $form;

Comments

Feature only integrated at adapter and validator level for now.

Feature added with r12728