#35389: stringformat filter in template breaks numeric localization
-------------------------------------+-------------------------------------
Reporter: Danic | Owner: nobody
Type: Bug | Status: closed
Component: Template system | Version: 5.0
Severity: Normal | Resolution: invalid
Keywords: locale, | Triage Stage:
localization | Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak):
* resolution: => invalid
* status: new => closed
Comment:
It's explicitly
[
https://docs.djangoproject.com/en/stable/ref/templates/builtins/#stringformat
documented] that `stringformat`:
> ''Formats the variable according to the argument, a **string formatting
specifier**. This specifier uses the **printf-style String Formatting
syntax**, with the exception that the leading “%” is dropped.''
and in Python docs you will find that `.` is always used as a decimal
separate. `localize/unlocalize` doesn't affect strings so everything works
as expected.
--
Ticket URL: <
https://code.djangoproject.com/ticket/35389#comment:1>