Zend Framework

unlogic code in addTranslation func

Details

  • Type: Bug Bug
  • Status: Resolved Resolved
  • Priority: Critical Critical
  • Resolution: Not an Issue
  • Affects Version/s: 1.9.3
  • Fix Version/s: 1.9.4
  • Component/s: Zend_Translate
  • Labels:
    None

Description

source: Zend/Translate/Adapter.php
code:
if (strpos($directory, DIRECTORY_SEPARATOR . $this->_options['ignore']) !== false) {
// ignore files matching first characters from option 'ignore' and all files below
continue;
}

bug on win platform, because project uses tmx scan and this folder:
d:\.work\...\languages

resolution:
DIRECTORY_SEPARATOR to '/'
or
if ($this->_options['ignore'] != '') {}

Activity

Hide
Thomas Weidner added a comment -

Any why should this code be unlogic ?

Simply look into the manual to know how this option works. Just because you don't read, it does not mean that it does not work as expected.

Manual: http://framework.zend.com/manual/en/zend.translate.additional.html

All directories and files beginning with this prefix will be ignored when searching for files. This value defaults to '.' which leads to the behavior that all hidden files will be ignored. Setting this value to 'tmp' would mean that directories and files like 'tmpImages' and 'tmpFiles' would be ignored as well as all subsequent directories

Show
Thomas Weidner added a comment - Any why should this code be unlogic ? Simply look into the manual to know how this option works. Just because you don't read, it does not mean that it does not work as expected. Manual: http://framework.zend.com/manual/en/zend.translate.additional.html
All directories and files beginning with this prefix will be ignored when searching for files. This value defaults to '.' which leads to the behavior that all hidden files will be ignored. Setting this value to 'tmp' would mean that directories and files like 'tmpImages' and 'tmpFiles' would be ignored as well as all subsequent directories
Hide
Thomas Weidner added a comment -

Closing as non-issue

Show
Thomas Weidner added a comment - Closing as non-issue

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: