#25223: Allow default language to be one unsupported by django if the local project has the required translation catalog -------------------------------------+------------------------------------- Reporter: svleeuwen | Owner: nobody Type: New feature | Status: new Component: | Version: 1.8 Internationalization | Severity: Normal | Resolution: Keywords: | Triage Stage: | Unreviewed Has patch: 0 | Needs documentation: 0 Needs tests: 0 | Patch needs improvement: 0 Easy pickings: 0 | UI/UX: 0 -------------------------------------+------------------------------------- Changes (by svleeuwen):
* type: Bug => New feature Old description: > 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 a language that's not available in django. > > [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'` New description: Update: Changed from bug to feature request. See beck's comments below. --- 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 a language that's not available in django. [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#comment:4> 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/067.05e253e8a1199d5c17442ca466b4a4b1%40djangoproject.com. For more options, visit https://groups.google.com/d/optout.