translation exports do not respect nplurals properly

Bug #228719 reported by Dennis Schridde
36
This bug affects 6 people
Affects Status Importance Assigned to Milestone
Launchpad itself
Triaged
High
Unassigned

Bug Description

For nplurals=3 Launchpad sometimes just creates 2 plural forms, which gives this gettext error:
rm -f pl.gmo && /usr/bin/gmsgfmt -c --statistics -o pl.gmo pl.po
pl.po:7: nplurals = 3...
pl.po:12256: ...but some messages have only 2 plural forms
/usr/bin/gmsgfmt: found 1 fatal error

Affected was for example: https://translations.launchpad.net/warzone2100/2.1/+pots/warzone2100/pl/+translate

Revision history for this message
Diogo Matsubara (matsubara) wrote :

Setting to incomplete and assigning to Jeroen.

Jeroen, please help triage this one and set it back to Confirmed, Triaged, Invalid or Won't Fix as appropriate.

Changed in rosetta:
assignee: nobody → jtv
status: New → Incomplete
Revision history for this message
Dennis Schridde (devurandom) wrote :

"Incomplete" as in information missing? Can I provide something in addition?

Revision history for this message
Dennis Schridde (devurandom) wrote :

Attached is a file Launchpad(-librarian) generated from this translation:
https://translations.launchpad.net/warzone2100/2.1/+pots/warzone2100/pl/+translate

Revision history for this message
Dennis Schridde (devurandom) wrote :

Attached is a file Launchpad(-librarian) generated from this translation:
https://translations.launchpad.net/warzone2100/2.1/+pots/warzone2100/pl/+translate

Error message:
rm -f pl.gmo && /usr/bin/gmsgfmt -c --statistics -o pl.gmo pl.po
pl.po:7: nplurals = 3...
pl.po:12263: ...but some messages have only 2 plural forms
/usr/bin/gmsgfmt: found 1 fatal error

Revision history for this message
Jeroen T. Vermeulen (jtv) wrote :

This appears to be an export bug when translation forms are missing: out of the 3 forms this translation uses, if form 2 is not translated, it is not included in the export. For an untranslated message, 2 rather than 3 empty msgstrs are generated.

This is probably something to do with how the exporter finds out how many forms to export: it looks as if it exports up to and including the highest translated form, and in the problem cases, picks a bad default number of forms (either when there is no highest translated form, or when it's <2, or when it's below the language's highest form; I can't say from this example).

Changed in rosetta:
importance: Undecided → High
status: Incomplete → Confirmed
Changed in rosetta:
assignee: Jeroen T. Vermeulen (jtv) → nobody
summary: - Launchpad translations does not respect nplurals properly
+ translation exports do not respect nplurals properly
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

Related questions

Remote bug watches

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