Opened 8 years ago

Closed 8 years ago

Last modified 7 years ago

#15634 closed (fixed)

Malformed Plural-Forms for HR locale

Reported by: bmihelac Owned by: nobody
Component: Translations Version: master
Severity: Keywords: blocker
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description (last modified by Ramiro Morales)

This is introduced in r15823

error is:

  File "/usr/lib/python2.6/", line 126, in c2py
    return eval('lambda n: int(%s)' % plural)
  File "<string>", line 1
    lambda n: int(test(n%10==1  and  n%100!=11 ,  0 , test( n%10>=2  and  n%" "10<=4  and  (n%100<10  or  n%100>=20) ,  1 ,  2)))
SyntaxError: invalid syntax

Change History (5)

comment:1 Changed 8 years ago by Ramiro Morales

Description: modified (diff)
Triage Stage: UnreviewedAccepted

comment:2 Changed 8 years ago by Ramiro Morales

Keywords: blocker added
milestone: 1.3

This seems to be a bug in Transifex when it export the plural forms formula to a .po file and the formula is long enough to cause splitting in certain position. The \" tokens in the two lines involved are superfluous and produce errors at run-time when this locale is selected.

Removing them and re-generating the .mo files solves this particular problem.

I'd like to propose to fix this in that way (i.e overriding the .po contents with an old style process: manual edit of .po files plus compilation to .mo with msgfmt) to avoid delaying the release waiting for a fix for the Transifex team and a re-export from

W can overwrite the .po files with content form Transifex once this is fixed there. Fortunately the manual changes touch this plural-field meta information field and not real translations so the risk of breaking something when we merge thing back later are pretty low.

Also, the translation team has 100% translation coverage and it wouldn't be nice to ship 1.3 with a broken translation.

I've reported this in the #transifex IRC channel and will open a ticket in their Trac instance.

comment:3 Changed 8 years ago by Ramiro Morales

In [15875]:

Fixed plural forms formula for the Croatian (hr) localization by manually overriding the header of affected .po files and re-generating .mo files, this seems to be a quirck in Transifex export to PO functionality. Thanks bmihelac fot the report. Refs #15634.

comment:4 Changed 8 years ago by Ramiro Morales

Resolution: fixed
Status: newclosed

Transifex team reports this also has been fixed in Closing.

comment:5 Changed 7 years ago by Jacob

milestone: 1.3

Milestone 1.3 deleted

Note: See TracTickets for help on using tickets.
Back to Top