Opened 16 years ago

Closed 16 years ago

Last modified 13 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: dev
Severity: Keywords:
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

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 16 years ago.

Download all attachments as: .zip

Change History (5)

by Ramiro Morales, 16 years ago

Attachment: t8584.diff added

comment:1 by Ramiro Morales, 16 years ago

Component: UncategorizedInternationalization
Has patch: set

comment:2 by Malcolm Tredinnick, 16 years ago

milestone: 1.0
Triage Stage: UnreviewedAccepted

comment:3 by Malcolm Tredinnick, 16 years ago

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 by Jacob, 13 years ago

milestone: 1.0

Milestone 1.0 deleted

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