#30439: Translations issues on Django upgrade due to unexpected changes in 
plural
forms
-------------------------------------+-------------------------------------
     Reporter:  Michal Čihař         |                    Owner:  Claude
                                     |  Paroz
         Type:  Bug                  |                   Status:  closed
    Component:                       |                  Version:  2.2
  Internationalization               |
     Severity:  Normal               |               Resolution:  fixed
     Keywords:                       |             Triage Stage:  Ready for
                                     |  checkin
    Has patch:  1                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------

Comment (by Michal Čihař):

 Replying to [comment:50 Michal Hozza]:
 > This is actually not true. `n%1 != 0` for decimal numbers. I believe
 Czech has a special plural form for decimal numbers, similarly to Slovak,
 so the formula is correct.

 Yes, but the Gettext logic is integer only, so it cannot evaluate
 decimals. So while it's theoretically correct, it doesn't make sense with
 Gettext where the expression is evaluated as integers because for every
 integer, `n%1 == 0`.

 This is how it ends up being evaluated:

 {{{
 >>> from gettext import c2py
 >>> c2py('n%1')(1.5)
 0
 }}}

 But this is really off-topic here, this is just special case where plural
 rules can be different, there are languages where the differences are
 intentional depending on scope of the translation and this is now handled
 properly by Django.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/30439#comment:51>
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/063.25d46b745e1e27a773874da669615c5a%40djangoproject.com.

Reply via email to