Truncated plural forms

Bug #2322 reported by Dan Damian
38
Affects Status Importance Assigned to Milestone
Launchpad itself
Fix Released
Critical
Carlos Perelló Marín

Bug Description

In ubuntu-doc/aboutubuntu, the Romanian plural forms expression seems to be truncated:
" (n == 1 ? 0: (((n %"
instead of
" (n == 1 ? 0 : (((n % 100 > 19) || ((n % 100 == 0) && (n != 0))) ? 2 : 1))"

In the exported .po file, the plural forms is splitted on two lines:
"Plural-Forms: nplurals=3; plural=(n == 1 ? 0: (((n %\n"
"100 > 19) || ((n % 100 == 0) && (n != 0))) ? 2: 1))\n"

...which results in a gettext error:
$ msgfmt -c ro.po
ro.po:7: invalid plural expression

See:
https://launchpad.net/distros/ubuntu/breezy/+sources/ubuntu-docs/+pots/aboutubuntu/ro/+translate

Revision history for this message
Dan Damian (dand) wrote :

Due to uploading a corrected po file, aboutubuntu was fixed.

The problem can be seen at the moment in faqguide:
https://launchpad.net/distros/ubuntu/breezy/+sources/ubuntu-docs/+pots/faqguide/ro/+translate

Changed in rosetta:
assignee: nobody → carlos
Revision history for this message
Carlos Perelló Marín (carlos) wrote :

This seems to be a bug caused by a bad .po upload.

We should try to fix/detect those problems on import time.

Changed in rosetta:
assignee: carlos → nobody
status: New → Accepted
Revision history for this message
Dafydd Harries (daf) wrote :

It's possible that these bad uploads happen when users upload a file that was exported from Rosetta. Hence it might be an export problem rather than an import problem.

This bug seems a bit similar to #1786.

Revision history for this message
Michael Vogt (mvo) wrote :

We have seen this on edgy recently and it breaks update-manager. It would be really good if this could be fixed/worked around before the release.

Revision history for this message
Michael Vogt (mvo) wrote :

Bug #64132 is the ubuntu bugreport for this problem.

Changed in rosetta:
assignee: nobody → carlos
importance: Medium → Critical
Changed in rosetta:
status: Confirmed → In Progress
Revision history for this message
Carlos Perelló Marín (carlos) wrote :

I just fixed the import to export valid plural forms, this is not the right fix because this bug is produced by our import code that stores broken headers when it's too long (the case with the plural form expression). Anyway, exports should have the right value now. This only applies to language packs to have it fixed before Edgy release, it will apply too to manual export request from the web UI once it passes our QA process.

Revision history for this message
Carlos Perelló Marín (carlos) wrote :

The problem is fixed for Edgy, I'm going to ask for a review of this fix and move it into production to apply it with manual export requests.

Just as a note, this bug was introduced by bug #66958

Changed in rosetta:
status: In Progress → Fix Committed
Changed in rosetta:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.