Opened 4 years ago

Closed 4 years ago

Last modified 3 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: UI/UX:

Description (last modified by ramiro)

This is introduced in r15823

error is:

  File "/usr/lib/python2.6/gettext.py", 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 4 years ago by ramiro

  • Description modified (diff)
  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Accepted

comment:2 Changed 4 years ago by ramiro

  • Keywords blocker added
  • milestone set to 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 transifex.net.

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 4 years ago by ramiro

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 4 years ago by ramiro

  • Resolution set to fixed
  • Status changed from new to closed

Transifex team reports this also has been fixed in transifex.net. Closing.

comment:5 Changed 3 years ago by jacob

  • milestone 1.3 deleted

Milestone 1.3 deleted

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