Opened 17 years ago
Closed 14 years ago
#6392 closed New feature (fixed)
django.contrib.humanize should be locale aware
Reported by: | Marc Fargas | Owned by: | Jannis Leidel |
---|---|---|---|
Component: | Internationalization | Version: | dev |
Severity: | Normal | 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
Currently "humanize" assumes that the decimal separator is "." and "," for (dunno name) what you put every three digits.
In some languages (europe) it's just the reverse. Maybe 'humanize' could be aware of the current language. Otherwise humanize is nonsense on Europe and almost anywhere outside US ;)
Attachments (3)
Change History (14)
comment:1 by , 17 years ago
Triage Stage: | Unreviewed → Design decision needed |
---|
comment:2 by , 16 years ago
Has patch: | set |
---|---|
Owner: | changed from | to
Status: | new → assigned |
Here's an initial patch. I only have access to a Linux machine via a virtual machine, so I'd appreciate it if somebody with a non-en_US locale that implements different thousands/decimal separators could run the test and verify that it works.
I think this ticket conflicts with #9037.
comment:3 by , 16 years ago
Keywords: | i18n-rf added |
---|
comment:4 by , 15 years ago
Component: | Contrib apps → Internationalization |
---|---|
Owner: | changed from | to
Patch needs improvement: | set |
Status: | assigned → new |
Triage Stage: | Design decision needed → Accepted |
Ok, the patch needs an update after we added locale-aware formatting.
comment:5 by , 15 years ago
Patch needs improvement: | unset |
---|
comment:6 by , 15 years ago
I'm still not entirely sure if this is the right approach, any ideas would be much appreciated.
comment:7 by , 14 years ago
Keywords: | i18n-rf removed |
---|
comment:8 by , 14 years ago
Severity: | → Normal |
---|---|
Type: | → New feature |
comment:9 by , 14 years ago
Easy pickings: | unset |
---|---|
Patch needs improvement: | set |
6392.diff fails to apply cleanly on to trunk
comment:10 by , 14 years ago
Patch needs improvement: | unset |
---|
Looking over the patch, I'm not sure what, if anything is wrong with the approach. It seems like doing correct humanization across languages is a big win.
It would probably be easy enough to have the decimal and thousands separators translated.