Django

Code

Ticket #8584 (closed: fixed)

Opened 3 months ago

Last modified 3 months ago

Corner case for get_language_for_request function in translation

Reported by: ramiro Assigned to: nobody
Milestone: 1.0 Component: Internationalization
Version: SVN Keywords:
Cc: Triage Stage: Accepted
Has patch: 1 Needs documentation: 0
Needs tests: 0 Patch needs improvement: 0

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

t8584.diff (0.7 kB) - added by ramiro on 08/26/08 20:18:19.

Change History

08/26/08 20:18:19 changed by ramiro

  • attachment t8584.diff added.

08/26/08 20:18:48 changed by ramiro

  • needs_better_patch changed.
  • has_patch set to 1.
  • component changed from Uncategorized to Internationalization.
  • needs_tests changed.
  • needs_docs changed.

08/26/08 20:21:36 changed by mtredinnick

  • stage changed from Unreviewed to Accepted.
  • milestone set to 1.0.

08/27/08 00:10:21 changed by mtredinnick

  • status changed from new to closed.
  • resolution set to fixed.

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


Add/Change #8584 (Corner case for get_language_for_request function in translation)




Change Properties
Action