Issue #21 invalid

msgid string with Double quotes within not returned by polib.pofile

Anonymous created an issue

po = polib.pofile(fp) There were some missing strings, which turned out to have embedded double quotes in the string. Here is an example: "Sufficient space is not available to import exams from device on \"%s\"."

Comments (2)

  1. David Jean Louis repo owner

    Hi,

    I highly doubt it is a bug, this kind of use case is well tested, and anyway I don't reproduce the issue, see my test session below:

    $ cat test.po
    msgid ""
    msgstr ""
    "Content-Type: text/plain; charset=UTF-8\n"
    
    msgid "some string \"%s\""
    msgstr "une chaîne \"%s\""
    
    $ python 
    Python 2.6.6 (r266:84292, Sep 15 2010, 15:52:39) 
    [GCC 4.4.5] on linux2
    Type "help", "copyright", "credits" or "license" for more information.
    >>> import polib
    >>> po = polib.pofile('test.po')
    >>> print po
    msgid ""
    msgstr "Content-Type: text/plain; charset=UTF-8\n"
    
    msgid "some string \"%s\""
    msgstr "une chaîne \"%s\""
    
    >>> print po[0].msgid, po[0].msgstr
    some string "%s" une chaîne "%s"
    
    

    If you still think it's a polib issue, please provide a reproducible test case.

    -- David

  2. Log in to comment