Zend Framework

Zend Translate Adapter folder scan issue for variable strlen locale folders

Details

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

Description

Problem with using variable string length folder names when scanning the translate folder.

e.g.
$translate = new Zend_Translate('array',
$this->_root . '/data/locale/translate',
'en_GB',
array(
'scan' => Zend_Translate::LOCALE_DIRECTORY
)
);
It scans through the directory alphabetically, but ignores valid directories that are of shorter string length than the previously matched directory.

Zend_Translate_Adapter line 159:

if (strlen($prev) <= strlen($file)) {

e.g:
path/to/translate/en
path/to/translate/en_GB
path/to/translate/ja

ignores 'ja'. manually added required translation files (old method) for now.

Issue Links

Activity

Hide
Thomas Weidner added a comment -

Fixed with r17813

Show
Thomas Weidner added a comment - Fixed with r17813
Hide
Thomas Baumann added a comment -

Fix has not been released yet. In ZF 1.9.5, I still have the problem. See my Issue #8286.

Show
Thomas Baumann added a comment - Fix has not been released yet. In ZF 1.9.5, I still have the problem. See my Issue #8286.
Hide
Thomas Weidner added a comment -

You may note that this issue is marked as "fixed with next minor release".
This means 1.10.

When you are in need of this code then you must use SVN trunk.

Show
Thomas Weidner added a comment - You may note that this issue is marked as "fixed with next minor release". This means 1.10. When you are in need of this code then you must use SVN trunk.

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: