#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 mhozza):

 Replying to [comment:5 Michal Čihař]:
 > It would be necessary to avoid merging of the catalogs and perform
 lookup over several catalogs. With merging, the lookup in the catalog can
 not respect plural equation defined in the file. With Czech language I
 believe this is issue only because of a bug in the plural form (see
 below), but there are language were several different plural forms are
 widely used (for example
 [https://hosted.weblate.org/languages/lv/#information Latvian], where they
 have same number of plurals, but reverse ordering of the strings in one of
 them).
 >
 >
 > Going back to Czech locale, the plural equation for Czech (which you
 apparently got from Transifex) doesn't make sense at all, because it
 defines 4 plural forms, but it never evaluates to 2 because `n % 1` is
 always 0:
 >
 > `(n == 1 && n % 1 == 0) ? 0 : (n >= 2 && n <= 4 && n % 1 == 0) ? 1: (n %
 1 != 0 ) ? 2 : 3`
 >
 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.

 > So the correct fix here would be revert to original formula and blame
 Transifex to fix this. Probably some damage was done to the plurals
 translation meanwhile...
 >
 > PS: I've seen such messed up plurals already in several projects which
 have decided to migrate from Transifex to [https://weblate.org/ Weblate]
 (which I develop), not sure if anybody has reported this to them.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/30439#comment:50>
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.25cb93cff9a325f7dd0ab2d7eef476e9%40djangoproject.com.

Reply via email to