#12230: to_locale not working with sr_Latn ----------------------------------+----------------------------------------- Reporter: janos | Owner: nobody Status: new | Milestone: 1.2 Component: Internationalization | Version: 1.1 Keywords: | Stage: Unreviewed Has_patch: 1 | ----------------------------------+----------------------------------------- There is a bug in function to_locale in django/utils/translation/trans_real.py when trying to get locale for sr- latn language.
{{{ In [1]: from django.utils.translation import to_locale In [2]: to_locale('sr-latn') Out[2]: 'sr_LATN' }}} The output should be 'sr_Latn'. It is an exception that is overlooked when new language has been added. Because of the wrong caption Django won't recognize 'sr_Latn' folder with translations when searching trough 'locale' folders. Patch that I have provided solves the problem, but there could be a different condition under if. -- Ticket URL: <http://code.djangoproject.com/ticket/12230> Django <http://code.djangoproject.com/> The Web framework for perfectionists with deadlines. -- You received this message because you are subscribed to the Google Groups "Django updates" group. To post to this group, send email to django-upda...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-updates?hl=.