plural-forms parsing rejects commas though msgfmt supports them

Bug #337725 reported by Colin Watson
2
Affects Status Importance Assigned to Milestone
Launchpad itself
Triaged
Low
Unassigned

Bug Description

Launchpad mailed me an "Import problem" message as follows:

  On 2009-03-04 11:52+0000 (39 minutes ago), you uploaded a file with
  Tagalog (tl) translations for debconf in Ubuntu Jaunty package "debconf"
  to Launchpad.

  We were unable to import the file because of errors in its format:

  Invalid nplurals declaration in header: '2, plural=n>1' (should be a
  number).

  If you use gettext, you can check your file for correct formatting with
  the 'msgfmt -c' command. Please fix any errors raised by msgfmt and
  upload the file again. If you check the file and you don't find any
  error in it, please look for an answer or file a question at
  https://answers.launchpad.net/rosetta/

  For your convenience, you can get the file you uploaded at:
  http://launchpadlibrarian.net/23417401/tl.po

The offending line is:

  "Plural-Forms: nplurals=2, plural=n>1;\n"

While the gettext documentation does say that this should be "Plural-Forms: nplurals=2; plural=n>1;\n" instead, I don't think gettext itself actually cares, and certainly 'msgfmt -c' as recommended by Launchpad's mail doesn't report any errors. Perhaps you could make this a little less strict, and permit comma-separation too?

Revision history for this message
Данило Шеган (danilo) wrote :

That's right, gettext doesn't seem to care, so we should allow it as well.

Changed in rosetta:
importance: Undecided → Medium
status: New → Triaged
Revision history for this message
Данило Шеган (danilo) wrote :

And just to clarify, I've checked that comma actually works.

summary: - plural-forms parsing too strict
+ plural-forms parsing rejects commas though msgfmt supports them
Changed in launchpad:
importance: Medium → Low
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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