Zend Framework

QT and LOCALE_DIRECTORY load only the last file

Details

  • Type: Bug Bug
  • Status: Resolved Resolved
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: None
  • Fix Version/s: 1.6.0
  • Component/s: Zend_Translate
  • Labels:
    None

Description

Qt linguist file with the option array('scan' => Zend_Translate::LOCALE_DIRECTORY)

Only the data of the last file of the same locale is keep in the adapter.
Because, at the load of the file the array _translate is reset.

106 case 'ts':
107 $this->_translate[$this->_target] = array();
108 break;

http://framework.zend.com/code/browse/Zend_Framework/trunk/library/Zend/Translate/Adapter/Qt.php?r=8064#l107

How to reproduce
code :

$translate = new Zend_Translate(Zend_Translate::AN_QT, $this->appDir . '/application/languages',
null,
array('scan' => Zend_Translate::LOCALE_DIRECTORY));

folder strucuture :

languages/
fr_BE/
application.ts
validate.ts
nl_BE/
application.ts
validate.ts

Activity

Hide
Davide Mendolia added a comment -

patch file

Show
Davide Mendolia added a comment - patch file
Hide
Thomas Weidner added a comment -

Already fixed with r9394.
Patch incomplete and ignored.

Show
Thomas Weidner added a comment - Already fixed with r9394. Patch incomplete and ignored.
Hide
Wil Sinclair added a comment -

Updating for the 1.6.0 release.

Show
Wil Sinclair added a comment - Updating for the 1.6.0 release.

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved:

Time Tracking

Estimated:
Not Specified
Original Estimate - Not Specified
Remaining:
0m
Remaining Estimate - 0 minutes
Logged:
10m
Time Spent - 10 minutes