Issues

ZF-5534: XLiff adapter always clear previous loaded source

Issue Type: Bug Created: 2009-01-13T06:14:26.000+0000 Last Updated: 2009-01-14T22:37:42.000+0000 Status: Resolved Fix version(s): - 1.8.0 (30/Apr/09)

Reporter: Cédric Déserville (cdeserville) Assignee: Thomas Weidner (thomas) Tags: - Zend_Translate

Related issues: Attachments:

Description

With the example below, only the datas of the last loaded file is kept in the adapter because, during loading the file the array _translate is always reset.

$translate = new Zend_Translate('xliff', APP_PATH."/language/fr");

I think that line below (on Zend_Translate_Adapter_Xliff) must be executed only if the "clear" option is set to true. 125 $this->_translate[$this->_source] = array(); 126 $this->_translate[$this->_target] = array();

Comments

Posted by Thomas Weidner (thomas) on 2009-01-13T07:03:06.000+0000

Why should someone load the same translation file twice but with changed content ?

Posted by Cédric Déserville (cdeserville) on 2009-01-13T07:35:19.000+0000

In our application, we use Zend_Translate with scanning directory option.

Example : My directory APP_PATH."/language/fr" have 4 files : - common.xliff (for all common translation like hello, date ...) - form.xliff (for all Zend_Validate message) - index.xliff (for my Index controller message) - test.xliff (for my Test controller message

When i make : $translate = new Zend_Translate('xliff', APP_PATH."/language/fr");

I expect that $translate contains datas of all my xliff files instead of the last loaded files (test.xliff).

that's why I think that line below (on Zend_Translate_Adapter_Xliff) must be executed only if the "clear" option is set to true. 125 $this->_translate[$this->_source] = array(); 126 $this->_translate[$this->_target] = array();

Posted by Thomas Weidner (thomas) on 2009-01-14T22:36:26.000+0000

I see no problem.

The looked at the code you are referring to but it does not exist in trunk. So the related issue can not occur in the next release.

I think we can resolve this issue as it was already addressed before.

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