José Matos wrote:

> For python 3 the strings are now unicode strings and so all works:
> 
> $ ipython3 --no-banner
> 
> In [1]: type( "123%s" % "")
> Out[1]: str
> 
> In [2]: type( "123%s" % u"")
> Out[2]: str
> 
> So a safe bet would be to prefix all the strings with an u, overkill sure
> but it will surely work. :-D

Many thanks for the explanation, now I understand what happens. I took your 
+1 and committed a version that works both with python2 and python3. I 
tested that by regenerating po/lyx.pot and lib/layouttranslations with 
python 2.7.9 and the unmodified script, python 2.7.9 and the modified 
script, and python 3.4.2 and the modified script. All three runs produced 
the same results.


Georg

Reply via email to