#28709: makemessages creates faulty .po file
------------------------------------------------+------------------------
               Reporter:  Davor Teskera         |          Owner:  nobody
                   Type:  Uncategorized         |         Status:  new
              Component:  Internationalization  |        Version:  1.11
               Severity:  Normal                |       Keywords:
           Triage Stage:  Unreviewed            |      Has patch:  0
    Needs documentation:  0                     |    Needs tests:  0
Patch needs improvement:  0                     |  Easy pickings:  0
                  UI/UX:  0                     |
------------------------------------------------+------------------------
 invoking
 {{{
 makemessages -l en
 }}}
 creates a faulty .po file that contains this line
 {{{
 "Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
 }}}
 invoking it for other languages that i have tested creates a valid file
 eg. for -l hr
 {{{
 "Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
 "%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n"
 }}}

 if you afterwards call compilemessages your app will raise exceptions
 {{{
 ValueError: invalid token in plural form: EXPRESSION
 }}}

-- 
Ticket URL: <https://code.djangoproject.com/ticket/28709>
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/051.50f6b2d1f1e4e77bc20bb629aa74665d%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to