Having thought about this a little more, I may have found in answer to my
own question. :-)

The reasoning would seem to be that, by overriding LANGUAGES but not
LANGUAGES_BIDI, you risk introducing an inconsistency between the language
code *format* in these two settings (a la LANGUAGE_CODE and the original
ticket that got this started). If that's correct, that seems fair to me
(and worth keeping this check), along with an update to the docs to clarify
this dependency and why it exists.

Tobias

On Tue, Apr 9, 2019, 8:06 AM Adam Johnson <m...@adamj.eu> wrote:

> Other ideas:
>
>    - Bypass the check in the case that LANGAUGES_BIDI is the same as the
>    one in global_settings - probably not the best idea, but would stop all
>    projects having to set LANGUAGES_BIDI = [] to avoid the check
>    - Change startproject so that LANGUAGES_BIDI is set up as the empty
>    list - removes some "included batteries" but helps users make a more
>    informed choice?
>
>
> On Tue, 9 Apr 2019 at 12:27, Adam Johnson <m...@adamj.eu> wrote:
>
>> Hi Matthias,
>>
>> I can see why this is annoying. At least the resolution is easy by
>> setting LANGUAGES_BIDI = []. I do agree that it should be in the release
>> notes, although it's quite hard to miss a new system check's output when
>> upgrading.
>>
>> I see it was only at the last review of the PR (
>> https://github.com/django/django/pull/11060 ) that the check in question
>> was upgraded from warning W005 to E005. I can see why a warning would make
>> sense, but at the same time a warning is still a message to the user and
>> resolved the same way, either by setting LANGUAGES_BIDI or adding it to
>> SILENCED_SYSTEM_CHECKS.
>>
>> I think I'm against removing the check, but pro anything that can make it
>> easier for users such as yourself - perhaps something as simple as a
>> suggestion in the error message to set LANGUAGES_BIDI = [] if you're not
>> using RTL languages?
>>
>> Thanks,
>>
>> Adam
>>
>> On Tue, 9 Apr 2019 at 11:22, Matthias Kestenholz <m...@feinheit.ch> wrote:
>>
>>> Hello everyone,
>>>
>>> The resolution of https://code.djangoproject.com/ticket/30241 in
>>> https://github.com/django/django/commit/4400d8296d268f5a8523cd02ddc33b12219b2535
>>> introduced a new and in my opinion backwards incompatible requirement
>>> through the system checks framework.
>>>
>>> Previously*, overriding LANGUAGES to restrict the list of available
>>> languages on a Django site worked. Now it's also necessary to override
>>> LANGUAGES_BIDI because there is a new system check (translation.E005) which
>>> verifies that there are no language codes in LANGUAGES_BIDI not in
>>> LANGUAGES as well.
>>>
>>> It is my strong opinion that enforcing this does not provide any
>>> benefits and has the downside of forcing almost everyone who overrides
>>> LANGUAGES to now add a new setting to their project to override
>>> LANGUAGES_BIDI as well with unclear benefits.
>>>
>>> Strictness is a good thing, but since LANGUAGES_BIDI is only ever used
>>> for membership checking (and never iterated over) I don't see the problem
>>> in keeping the default language codes from django/conf/global_settings.py
>>> in there even though some of those languages may not be available on a
>>> given installation anyway.
>>>
>>> The report in https://code.djangoproject.com/ticket/30342 was closed as
>>> wontfix that's why I'm writing to the list. Also, since system checks
>>> generally aren't mentioned in the release notes users will not be informed
>>> ahead of time about this change when reading the release notes.
>>>
>>> Anyone has any opinions to offer on this?
>>>
>>> Thanks,
>>> Matthias
>>>
>>> * At least as long as I'm using Django, probably for 11 years or
>>> something.
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Django developers (Contributions to Django itself)" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to django-developers+unsubscr...@googlegroups.com.
>>> To post to this group, send email to django-developers@googlegroups.com.
>>> Visit this group at https://groups.google.com/group/django-developers.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/django-developers/CANvPqgAy_HytsvmnOpPtrCP_969QhoncJaPUe%3D6pN-VYWMVcjA%40mail.gmail.com
>>> <https://groups.google.com/d/msgid/django-developers/CANvPqgAy_HytsvmnOpPtrCP_969QhoncJaPUe%3D6pN-VYWMVcjA%40mail.gmail.com?utm_medium=email&utm_source=footer>
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>
>> --
>> Adam
>>
>
>
> --
> Adam
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django developers (Contributions to Django itself)" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-developers+unsubscr...@googlegroups.com.
> To post to this group, send email to django-developers@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-developers.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-developers/CAMyDDM2WPCvDV5tGVE9z1FJRG1c2ZnT%2BBVwn%3Deqw4Zz0ZrbKOA%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-developers/CAMyDDM2WPCvDV5tGVE9z1FJRG1c2ZnT%2BBVwn%3Deqw4Zz0ZrbKOA%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/CAMGFDKTENFHLW9Ywc7eAg5hVNgJKJ2hGb2zQ_XAkviy8qSFw1g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to