Issues

ZF-11665: The translated message in the folder of resources to Zend_Validate_Db_Abstract is different from that declared in the class.

Issue Type: Bug Created: 2011-08-12T17:26:06.000+0000 Last Updated: 2011-08-15T19:42:05.000+0000 Status: Resolved Fix version(s): - 1.11.10 (04/Aug/11)

Reporter: João Paulo de Oliveira Faria (jpfaria) Assignee: Thomas Weidner (thomas) Tags: - Zend_Translate

  • Zend_Validate
  • validating

Related issues: Attachments:

Description

On resource Zend_Validate.php is as follows:

<pre class="literal">
...
// Zend_Validate_Db_Abstract
"No record matching %value% was found" => "Não foram encontrados registros para %value%",
"A record matching %value% was found" => "Um registro foi encontrado para %value%",
...

And on Zend_Validate_Db_Abstract.php is as follows:

<pre class="literal">
...
   protected $_messageTemplates = array(
        self::ERROR_NO_RECORD_FOUND => "No record matching '%value%' was found",
        self::ERROR_RECORD_FOUND    => "A record matching '%value%' was found",
   );
...

There are only two methods to resolve this problem.

1 - Change the message on the array in all appeals to:

<pre class="literal">
...
// Zend_Validate_Db_Abstract
"No record matching '%value%' was found" => "Não foram encontrados registros para '%value%'",
"A record matching '%value%' was found" => "Um registro foi encontrado para '%value%'",
...

2 - Change the message on the array in Zend_Validate_Db_Abstract.php (I would do this):

<pre class="literal">
...
   protected $_messageTemplates = array(
        self::ERROR_NO_RECORD_FOUND => "No record matching '%value%' was found",
        self::ERROR_RECORD_FOUND    => "A record matching '%value%' was found",
   );
...

Comments

Posted by Thomas Weidner (thomas) on 2011-08-13T17:48:00.000+0000

Issue not reproduceable.

In trunk, branch and also within release 1.11.10 both messages from the abstract validator and the original resource file are equal.

See http://framework.zend.com/code/filedetails.php/… and http://framework.zend.com/code/filedetails.php/… for details.

Posted by João Paulo de Oliveira Faria (jpfaria) on 2011-08-15T14:37:48.000+0000

On the repository http://framework.zend.com/svn/framework/… the problem still persists.

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