Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#31141 closed Bug (fixed)

translation.E004 shouldn't be raised on sublanguages when a base language is available.

Reported by: Enrique Matías Sánchez Owned by: Mariusz Felisiak
Component: Core (System checks) Version: 3.0
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

According to Django documentation:

If a base language is available but the sublanguage specified is not, Django uses the base language. For example, if a user specifies de-at (Austrian German) but Django only has de available, Django uses de.

However, when using Django 3.0.2, if my settings.py has

LANGUAGE_CODE = "de-at"

I get this error message:

SystemCheckError: System check identified some issues:

ERRORS:
?: (translation.E004) You have provided a value for the LANGUAGE_CODE setting that is not in the LANGUAGES setting.

If using

LANGUAGE_CODE = "es-ar"

Django works fine (es-ar is one of the translations provided out of the box).

Change History (5)

comment:1 by Mariusz Felisiak, 5 years ago

Cc: pope1ni added
Component: InternationalizationCore (System checks)
Severity: NormalRelease blocker
Summary: Language does not fall back to base language if LANGUAGE_CODE not in LANGUAGEStranslation.E004 shouldn't be raised on sublanguages when a base language is available.
Triage Stage: UnreviewedAccepted

Thanks for this report.

Regression in 4400d8296d268f5a8523cd02ddc33b12219b2535.

comment:2 by Mariusz Felisiak, 5 years ago

Owner: changed from nobody to Mariusz Felisiak
Status: newassigned

comment:3 by Mariusz Felisiak, 5 years ago

Has patch: set

comment:4 by GitHub <noreply@…>, 5 years ago

Resolution: fixed
Status: assignedclosed

In 53d8646:

Fixed #31141 -- Relaxed system check of translation settings for sublanguages.

Regression in 4400d8296d268f5a8523cd02ddc33b12219b2535.

Thanks Enrique Matías Sánchez for the report.

comment:5 by Mariusz Felisiak <felisiak.mariusz@…>, 5 years ago

In 0379da59:

[3.0.x] Fixed #31141 -- Relaxed system check of translation settings for sublanguages.

Regression in 4400d8296d268f5a8523cd02ddc33b12219b2535.

Thanks Enrique Matías Sánchez for the report.
Backport of 53d8646f799de7f92ab9defe9dc56c6125448102 from master

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