Zend Framework

Zend_Framework directory scan skips small locales

Details

  • Type: Bug Bug
  • Status: Resolved Resolved
  • Priority: Critical Critical
  • Resolution: Duplicate
  • Affects Version/s: 1.6.0, 1.6.1, 1.6.2, 1.7.0, 1.7.1, 1.7.2, 1.7.3, 1.7.4, 1.7.5, 1.7.6, 1.7.7, 1.7.8, 1.8.0, 1.8.1, 1.8.2, 1.8.3, 1.8.4, 1.9.0, 1.9.1, 1.9.2, 1.9.3, 1.9.4, 1.9.5
  • Fix Version/s: 1.10.0
  • Component/s: Zend_Translate
  • Labels:
    None

Description

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

Issue Links

Activity

Hide
Thomas Weidner added a comment -

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

Show
Thomas Weidner added a comment - How did you test on 1.6.1, 1.7.3 or 1.8.4 ???
Hide
Thomas Weidner added a comment -

Duplicated by ZF-7130

Show
Thomas Weidner added a comment - Duplicated by ZF-7130
Hide
Thomas Weidner added a comment -

Already fixed within trunk since r17813 (25. Aug)

Show
Thomas Weidner added a comment - Already fixed within trunk since r17813 (25. Aug)
Hide
Thomas Baumann added a comment -

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!

Show
Thomas Baumann added a comment - 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!

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: