wichert / lingua

Translation toolkit for Python
Other
45 stars 32 forks source link

Aborting due to parse error, with a dict as a method argument (in chameleon) #62

Closed betabug-sw closed 8 years ago

betabug-sw commented 8 years ago

Creating a chameleon page template, with only this content:

${some_method(_('abc'), {'a':'b'})}

and running pot-create -o failure.pot minimal_failure.pt, results in an error:

Aborting due to parse error in ./minimal_failure.pt[2]: some_method(_('abc'), {'a':'b'

(Yes, the error stops right there, the closing } of the dict is not there.)

If we change our example to replace the dict with a dict(), like this:

${some_method(_('abc'), dict(a='b'))}

Then the parsing will continue successfully.

(lingua==3.10, Chameleon==2.22, pyramid==1.6a2)

wichert commented 8 years ago

I've pushed a fix. Can you test if this resolved your problem?

betabug-sw commented 8 years ago

Thank you! This fix resolved the problem!