Issue #11 resolved

Multiline entries are not getting updated

Diego Búrigo Zacarão
created an issue

{{{

!python

import polib po = polib.pofile('tests/test_utf8.po')

po.find("Ensure this value has at least %(min)d characters (it has %(length)d).") <POEntry instance at dde810>

po.find("Ensure this value has at least %(min)d characters (it has %(length)d).")

entry.msgstr = '' + entry.msgid + ''

print entry.msgstr Ensure this value has at least %(min)d characters (it has %(length)d).

print entry

: newforms/fields.py:118

, python-format

msgid "Ensure this value has at least %(min)d characters (it has %(length)d)." msgstr "" "Asegúrese de que su texto tiene al menos %(min)d caracteres (actualmente " "tiene %(length)d)."

}}}

Here is a diff for testing it:

{{{

!diff

diff -r ec920a7a1df8 polib.py --- a/polib.py Sat Oct 02 12:09:45 2010 +0200 +++ b/polib.py Mon Oct 04 09:19:10 2010 -0300 @@ -112,6 +112,13 @@ True >>> po.encoding == po_content.encoding True + >>> po = polib.pofile('tests/test_utf8.po') + >>> entry = entry = po.find("Ensure this value has at least %(min)d characters (it has %(length)d).") + >>> entry.msgstr = entry.msgstr=entry.msgid + '' + >>> '' in entry.msgstr + True + >>> '**' in entry.str() # It's failing: print entry.__str__() to check the output. True is expected. + True """ if kwargs.get('autodetect_encoding', True) == True: enc = detect_encoding(pofile) }}}

It seems a pretty important bug, but I couldn't find a fix for it in the short amount of time. :/