ZF-5534: XLiff adapter always clear previous loaded source

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

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

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();

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.