Issues

ZF-7937: Translate helper doesn't apply "options" if no translator is defined

Issue Type: Improvement Created: 2009-09-23T09:35:31.000+0000 Last Updated: 2009-09-23T14:01:24.000+0000 Status: Resolved Fix version(s): - 1.10.0 (27/Jan/10)

Reporter: Sergi PĂ©rez (jangoo) Assignee: Thomas Weidner (thomas) Tags: - Zend_View

Related issues: Attachments:

Description

When no translator is defined,

translate("this is a string %s", $string);

does not work, because it returns the $messageid itself. If no translator is defined, Zend_View_Helper_Translate::translate() should return

vsprintf($messageid, $options) to avoid this problem.

Comments

Posted by Matthew Weier O'Phinney (matthew) on 2009-09-23T09:47:00.000+0000

Assigning to Thomas.

Posted by Thomas Weidner (thomas) on 2009-09-23T13:05:23.000+0000

But translate returns the messageid as is, which is expected behaviour.

When you have no option defined you will get a warning with your change which is more problematic than knowing that no translator is attached.

Posted by Thomas Weidner (thomas) on 2009-09-23T14:00:36.000+0000

Changed from bug to improvement

Posted by Thomas Weidner (thomas) on 2009-09-23T14:01:24.000+0000

Feature implemented with r18387

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