Opened 11 years ago

Last modified 10 years ago

#25223 closed New feature

Getting DjangoTranslation that doesn't exist should return None — at Initial Version

Reported by: Sander van Leeuwen Owned by: nobody
Component: Internationalization Version: 1.8
Severity: Normal Keywords:
Cc: desecho@… Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Getting a DjangoTranslation that doesn't exist used to return None.

Since ​this commit it raises an IOError when using an unavailable language.

​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'

Change History (0)

Note: See TracTickets for help on using tickets.
Back to Top