#27486: intword and filesizeformat filters shouldn't pass non-integers to 
gettext
-------------------------------------+-------------------------------------
     Reporter:  Tim Graham           |                    Owner:  Tim
         Type:                       |  Graham
  Cleanup/optimization               |                   Status:  assigned
    Component:  Template system      |                  Version:  master
     Severity:  Normal               |               Resolution:
     Keywords:                       |             Triage Stage:  Accepted
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------

Comment (by Claude Paroz):

 The exact rule about pluralizing floats/decimals depends on the language,
 so whether we floor or ceil the number before passing it to `ngettext`
 we'll do the right thing for some languages and wrong for others. This is
 a known limitation of the `gettext` spec (in C, `ngettext` is only
 accepting integers). We should make a choice and then document the
 limitation.

 It would not be impossible to try providing a language-specific hook in
 the LANG_INFO structure and call that hook when converting floats to ints.

--
Ticket URL: <https://code.djangoproject.com/ticket/27486#comment:1>
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].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/067.808c615b61774f1a5bf8f4acf217ecbb%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to