#25223: Getting DjangoTranslation that doesn't exist should return None
--------------------------------------+--------------------
     Reporter:  svleeuwen             |      Owner:  nobody
         Type:  Bug                   |     Status:  new
    Component:  Internationalization  |    Version:  1.8
     Severity:  Normal                |   Keywords:
 Triage Stage:  Unreviewed            |  Has patch:  0
Easy pickings:  0                     |      UI/UX:  0
--------------------------------------+--------------------
 Getting a DjangoTranslation that doesn't exist used to return None.

 Since
 
[https://github.com/django/django/commit/a5f6cbce07b5f3ab48d931e3fd1883c757fb9b45
 #diff-5682903b7aed1649cdb7095331e90d0d this commit] it raises an IOError
 when using an unavailable language.

 
[https://github.com/django/django/blob/a5f6cbce07b5f3ab48d931e3fd1883c757fb9b45/tests/i18n/tests.py#L1344
 This test] suggests this is wanted behaviour.

 But it should be possible to add a language that is not available in
 `django/conf/locale/` right?

 To reproduce, use a `LANGUAGE_CODE` unavailable in `django/conf/locale/`.

 For instance:
 `LANGUAGE_CODE = 'sd-PK'`

 run `python manage.py validate`

 This will raise:
 `IOError: [Errno 2] No translation file found for domain: u'django'`

--
Ticket URL: <https://code.djangoproject.com/ticket/25223>
Django <https://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 unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/052.37bcb3daf3f3bacd00c63d5213f9ce9f%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to