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 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:


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/ is missing from the project, or the Django installation itself
  • xx is listed in in settings.LANGUAGE
  • xx/LC_MESSAGES/ 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 8 years ago.

Download all attachments as: .zip

Change History (5)

Changed 8 years ago by ramiro

comment:1 Changed 8 years ago by ramiro

  • Component changed from Uncategorized to Internationalization
  • Has patch set
  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset

comment:2 Changed 8 years ago by mtredinnick

  • milestone set to 1.0
  • Triage Stage changed from Unreviewed to Accepted

comment:3 Changed 8 years ago by mtredinnick

  • Resolution set to fixed
  • Status changed from new to closed

(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 deleted

Milestone 1.0 deleted

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