PO Parser should allow things like msgstr "" "foo" in the same line

Bug #54239 reported by Carlos Perelló Marín
2
Affects Status Importance Assigned to Milestone
Launchpad itself
Triaged
Medium
Unassigned

Bug Description

At the moment, our parser will reject message with this schema:

msgid "Foo"
msgstr "" "Bar"

Gettext accepts it as a good message so we should do the same.

The error we get is:

Traceback (most recent call last):
  File "/srv/launchpad.net/production/launchpad/cronscripts/../lib/canonical/launchpad/database/pofile.py", line 612, in importFromQueue
    entry_to_import.is_published)
  File "/srv/launchpad.net/production/launchpad/cronscripts/../lib/canonical/launchpad/components/poimport.py", line 79, in import_po
    parser.write(file.read())
  File "/srv/launchpad.net/production/launchpad/cronscripts/../lib/canonical/launchpad/components/poparser.py", line 655, in write
    self.parse_line(line)
  File "/srv/launchpad.net/production/launchpad/cronscripts/../lib/canonical/launchpad/components/poparser.py", line 881, in parse_line
    l = self._parse_quoted_string(l)
  File "/srv/launchpad.net/production/launchpad/cronscripts/../lib/canonical/launchpad/components/poparser.py", line 786, in _parse_quoted_string
    "extra content found after string")
POSyntaxError: extra content found after string

Changed in rosetta:
importance: Untriaged → Medium
status: Unconfirmed → Confirmed
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.