Opened 8 years ago

Closed 8 years ago

Last modified 5 years ago

#8584 closed (fixed)

Corner case for get_language_for_request function in translation

Reported by: Ramiro Morales Owned by: nobody
Component: Internationalization Version: master
Severity: Keywords:
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

As I understand the problem would show itself if the following, rather strange, conditions are met:

  • User language preference specify xx-YY
  • xx_YY l10n is supported by the Django installation (i.e. it's listed in settings.LANGUAGE)
  • The actual xx_YY/LC_MESSAGES/django.mo is missing from the project, or the Django installation itself
  • xx is listed in in settings.LANGUAGE
  • xx/LC_MESSAGES/django.mo file exists

In this scenario, Django won't use the xx translation.

PS: Also, pyflakes points out there is an unused import of settings in line 61 of the same file.

Attachments (1)

t8584.diff (717 bytes) - added by Ramiro Morales 8 years ago.

Download all attachments as: .zip

Change History (5)

Changed 8 years ago by Ramiro Morales

Attachment: t8584.diff added

comment:1 Changed 8 years ago by Ramiro Morales

Component: UncategorizedInternationalization
Has patch: set

comment:2 Changed 8 years ago by Malcolm Tredinnick

milestone: 1.0
Triage Stage: UnreviewedAccepted

comment:3 Changed 8 years ago by Malcolm Tredinnick

Resolution: fixed
Status: newclosed

(In [8606]) Fixed #8584 -- Fixed a case where the wrong locale might be made active in the
locale detection loop. Thanks, Ramiro Morales.

comment:4 Changed 5 years ago by Jacob

milestone: 1.0

Milestone 1.0 deleted

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