#16909 closed Bug (fixed)
django.utils.formats.get_format function uses wrong language
| Reported by: | defaultwombat | Owned by: | Jannis Leidel |
|---|---|---|---|
| Component: | Internationalization | Version: | 1.3 |
| Severity: | Normal | Keywords: | l10n get_format lang |
| Cc: | masterjakul@… | Triage Stage: | Accepted |
| Has patch: | no | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | no | UI/UX: | no |
Description
django/utils/formats.py
The lang argument in the get_format() function is not used for picking the right language module, as the get_format_modules() function always used the language from get_language().
Actually the language is only used for the cache key so the result of the wrong module will be cached.
As get_format_modules() is only used in get_format() and django.views.i18n.get_formats() I think its save to add an optinal lang=None argument to its definition.
Change History (3)
comment:1 by , 14 years ago
| Owner: | changed from to |
|---|---|
| Triage Stage: | Unreviewed → Accepted |
comment:2 by , 14 years ago
| Resolution: | → fixed |
|---|---|
| Status: | new → closed |
comment:3 by , 14 years ago
| Cc: | added |
|---|
Note:
See TracTickets
for help on using tickets.
In [16884]: