ZF-8286: Zend_Framework directory scan skips small locales

Issue Type: Bug Created: 2009-11-11T05:27:17.000+0000 Last Updated: 2009-11-11T06:04:56.000+0000 Status: Resolved Fix version(s): - 1.10.0 (27/Jan/10)

Reporter: Thomas Baumann (t11n) Assignee: Thomas Weidner (thomas) Tags: - Zend_Translate

Related issues: - ZF-7130



In Rev 9511 there was a patch applied to Zend_Translate_Adapter that should speed up directory scanning.

It says: @rev9511 Zend_Translate: - increased scanning on degraded locales - added tests for file and directory scanning (ZF-3070)

With this patch all directories whose names are shorter than the one before are skipped. I assume that the author assumed skipping 'en' if 'en_GB' has been read already. This will not work out, though.

My case is as follows: I have translations for the following locales: 'de', 'en_GB', 'en_US'. There is a directory for each locale. According to my debugging the folder 'de' will never get read, as en_GB or en_US get read before. I also cannot switch to de_DE, as Zend_Locale does not provide translations for that locale. Only for 'de', 'de_AT' and 'de_CH'. Also, I can imagine that this may cause trouble if one uses locales 'syr', 'de', 'en' and 'fr' for instance. As I see it, at some point the locales having two letters will be skipped, once locale 'syr' has been read.

For me the workaround is to only use 'de' and 'en' instead of 'de', 'en_GB' and 'en_US'. I will also not be able to use 'de' mixed with 'de_AT'. As you will see, this is not satisfying.

Please have a look into the matter.

Thanks, Thomas


Posted by Thomas Weidner (thomas) on 2009-11-11T05:47:15.000+0000

How did you test on 1.6.1, 1.7.3 or 1.8.4 ???

Posted by Thomas Weidner (thomas) on 2009-11-11T05:50:28.000+0000

Duplicated by ZF-7130

Posted by Thomas Weidner (thomas) on 2009-11-11T05:51:11.000+0000

Already fixed within trunk since r17813 (25. Aug)

Posted by Thomas Baumann (t11n) on 2009-11-11T06:04:56.000+0000

I did not test all the versions, only 1.9.5. But I saw the issue is probably open since 1.5.3, because of the revision number.

Thanks for the quick reply!

Have you found an issue?

See the Overview section for more details.


© 2006-2017 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.