Opened 14 years ago

Closed 14 years ago

Last modified 13 years ago

#15024 closed (fixed)

The order of the list returned by django.utils.formats.get_format_modules changes since version 1.2.4

Reported by: David Reynolds Owned by: nobody
Component: Internationalization Version: 1.2
Severity: Keywords: blocker, regression
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

This manifests itself in the admin javascript date picker. The format for the date inserted by the 'Today' link changes every time I refresh the page.

If you look at the /admin/jsi18n/ URL and refresh it a few times you can see the formats varying on each refresh.

I have a fix, but I'm not sure if it is the best way to fix it (see attached patch)

VERSION: 1.2.4

Attachments (2)

format-module-ordering.diff (417 bytes ) - added by David Reynolds 14 years ago.
Initial patch
15024.diff (1.5 KB ) - added by Ramiro Morales 14 years ago.

Download all attachments as: .zip

Change History (10)

by David Reynolds, 14 years ago

Attachment: format-module-ordering.diff added

Initial patch

comment:1 by Russell Keith-Magee, 14 years ago

Resolution: worksforme
Status: newclosed

I can't reproduce this, and I can't think of any obvious reason why formats would be in unpredictable order; to the best of my knowledge, they're always stored and retrieved in list/tuple order.

If you can provide more complete reproduction instructions (possibly a project that duplicates the problem), please reopen.

comment:2 by David Reynolds, 14 years ago

Resolution: worksforme
Status: closedreopened

I can recreate it with a new project in a clean virtualenv. I think the key to what makes it change is setting the LANGUAGE_CODE to 'en-gb' - could you try that on your setup and see if you can recreate it?

comment:3 by David Reynolds, 14 years ago

My guess would be the ordering of django.conf.locale.en_GB and django.conf.locale.en is changing

comment:4 by Russell Keith-Magee, 14 years ago

Component: UncategorizedInternationalization
Keywords: blocker regression added
milestone: 1.3
Triage Stage: UnreviewedAccepted

Ok - confirmed with en_GB (i18n and l10n enabled); I couldn't reproduce with de_DE. It's also a regression from 1.2.3, making this a release blocker.

Still no idea why it would be happening, though...

by Ramiro Morales, 14 years ago

Attachment: 15024.diff added

comment:5 by Ramiro Morales, 14 years ago

Has patch: set

comment:6 by Ramiro Morales, 14 years ago

Resolution: fixed
Status: reopenedclosed

(In [15183]) Fixed #15024 -- Ensure that choice of L10N format module used is stable given a stable setup of format modules in ll/ and ll_CC/ dirs. Thanks David Reynolds for the report and suggestions leading to the solution.

comment:7 by Ramiro Morales, 14 years ago

(In [15184]) [1.2.X] Fixed #15024 -- Ensure that choice of L10N format module used is stable given a stable setup of format modules in ll/ and ll_CC/ dirs. Thanks David Reynolds for the report and suggestions leading to the solution.

Backport of [15183] from trunk.

comment:8 by Jacob, 13 years ago

milestone: 1.3

Milestone 1.3 deleted

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