Opened 7 years ago
Closed 7 years ago
#30342 closed Bug (fixed)
Remove the LANGUAGES_BIDI<=LANGUAGES check.
| Reported by: | Matthias Kestenholz | Owned by: | Matthias Kestenholz |
|---|---|---|---|
| Component: | Core (System checks) | Version: | dev |
| Severity: | Release blocker | Keywords: | |
| Cc: | pope1ni | Triage Stage: | Accepted |
| Has patch: | yes | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | no | UI/UX: | no |
Description
(Adding Nick Pope to Cc: as author of the commit referenced below)
Since https://github.com/django/django/commit/4400d8296d268f5a8523cd02ddc33b12219b2535 there is a system check which verifies that LANGUAGES_BIDI is a subset of LANGUAGES. This breaks almost all installations of Django using a custom LANGUAGES list which do not also override LANGUAGES_BIDI -- probably many installations.
All of them will either have to add a LANGUAGES_BIDI override or silence translation.E005 when updating. If this is intentional then this change has to be mentioned in the release notes and documented somewhere.
However, I don't really see the need to verify that LANGUAGES_BIDI is a subset of LANGUAGES and propose that the easiest and also the best way to solve this is to remove the translation.E005 check again.
Here's a test which currently fails but shouldn't in my opinion:
diff --git a/tests/check_framework/test_translation.py b/tests/check_framework/test_translation.py
index 9a34b65c06..cea844988d 100644
--- a/tests/check_framework/test_translation.py
+++ b/tests/check_framework/test_translation.py
@@ -92,3 +92,7 @@ class TranslationCheckTests(SimpleTestCase):
self.assertEqual(check_language_settings_consistent(None), [
Error(msg, id='translation.E005'),
])
+
+ def test_languages_without_bidi(self):
+ with self.settings(LANGUAGE_CODE='en', LANGUAGES=[('en', 'English')]):
+ self.assertEqual(check_language_settings_consistent(None), [])
Change History (5)
comment:1 by , 7 years ago
| Resolution: | → wontfix |
|---|---|
| Status: | new → closed |
comment:2 by , 7 years ago
| Resolution: | wontfix |
|---|---|
| Severity: | Normal → Release blocker |
| Status: | closed → new |
| Triage Stage: | Unreviewed → Accepted |
Reopening, based on the django-developers discussion. I also think that backwards compatibility has priority over the check framework, so a solution has to be found.
comment:3 by , 7 years ago
The pull request removes the system check and amends the LANGUAGES_BIDI description to make it clear that LANGUAGES_BIDI isn't supposed to be a subset of LANGUAGES.
comment:4 by , 7 years ago
| Has patch: | set |
|---|---|
| Owner: | changed from to |
| Status: | new → assigned |
| Summary: | Remove the LANGUAGES_BIDI<=LANGUAGES check → Remove the LANGUAGES_BIDI<=LANGUAGES check. |
Thanks for the report, however there is not a valid use case for using
LANGUAGES_BIDIthat are not inLANGUAGES, that's why we added this check. I don't think that it is a big issue to overrideLANGUAGES_BIDI(when you overrideLANGUAGES) or silence this checks. We do not put system checks into release notes normally, IMO it's necessary.