#33771 closed Bug (invalid)
Localized thousand separator
Reported by: | srunow | Owned by: | nobody |
---|---|---|---|
Component: | Template system | Version: | 4.0 |
Severity: | Normal | Keywords: | thousand separator template |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
Using thousand separator with |intcomma (USING_THOUSAND_SEPARATOR is not set) and additional |floatformat: leads to wrong localized output.
context = {"exfloat": 1000.01, "exint": 1000} [...] {{ exfloat|intcomma }} # output: 1.000,01 -> correct {{ exfloat|floatformat:2|intcomma }} # output: 1,000,01 -> wrong {{ exfloat|floatformat:-2|intcomma }} # output: 1,000,01 -> wrong {{ exint|intcomma }} # output: 1.000 -> correct {{ exint|floatformat:2|intcomma }} # output: 1,000,00 -> wrong {{ exint|floatformat:-2|intcomma }} # output: 1.000 -> correct
Localization is German, no possible setting following the documentation is fixing this.
Change History (2)
comment:1 by , 3 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:2 by , 3 years ago
Resolution: | fixed → invalid |
---|
Note:
See TracTickets
for help on using tickets.
The solution is "2g" for example, as described in documentation. Referal to floatformat on localizing sites containing information about thousand separator may be advised. Found the answer after looking up the implementation and was wondering, why the docs didn't state that (but found it now).