#17662: Adds percentage filter to humanize module
-------------------------------------+-------------------------------------
     Reporter:  eire1130             |                    Owner:  nobody
         Type:  New feature          |                   Status:  new
    Component:  contrib.humanize     |                  Version:  master
     Severity:  Normal               |               Resolution:
     Keywords:  humanize             |             Triage Stage:  Design
    Has patch:  1                    |  decision needed
  Needs tests:  0                    |      Needs documentation:  0
Easy pickings:  1                    |  Patch needs improvement:  1
                                     |                    UI/UX:  0
-------------------------------------+-------------------------------------

Comment (by fakotb):

 This was left alone for a long time, but it may be a nice feature to have.
 So I'm updating this ticket to let everybody know what the status is.

 According to core developer jezdez, the context will not be available for
 template filters for some time. However it's already possible to use
 context in a template tag. So if we create a percentage template tag
 instead of a filter it's possible to take into account localization.

 Here is a page that specifies how a percentage should be written in
 different languages:
 
http://www.unicode.org/cldr/charts/by_type/patterns.numbers.html#17acd127f9139476
 The good news is that the % sign never changes. The placement of this sign
 however differs per language, which makes things quite complicated. As
 said before it is not good to use Pythons format. Not because Django still
 wants to support 2.5 (it doesn't), but because the way format works
 depends on the locale of the installation and not the locale set in
 Django.

 It would be nice to also support permille if we're putting effort in
 supporting percentage.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/17662#comment:9>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to