[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pykde
Subject:    Re: [PyQt] pylupdate4 bug?
From:       Phil Thompson <phil () riverbankcomputing ! com>
Date:       2009-11-15 14:04:58
Message-ID: fd9994b9b86b69bdfa94fe9772cdecfe () localhost
[Download RAW message or body]

On Sat, 14 Nov 2009 16:28:36 +0100, Michele Petrazzo - Unipex
<michele.petrazzo@unipex.it> wrote:
> Hi,
> just discovered that pylupdate4 has a problem with empty docstring. If I
> forgot to write at least one character inside the docstring space,
> pylupdate4 stops to look for new string translation.
> 
> class Main(Qtclass):
>      def __init__(self):
>          """"""
> 
>      def test(self):
>          """simple docstring"""
>          return self.trUtf8("test")
> 
> generate:
> 
> pylupdate4: main.py:9: Unterminated string
> pylupdate4: Updating 'i18n/i18nit.ts'...
> pylupdate4:     Found 0 source texts (0 new and 0 already existing)
> 
> adding a simgle char ("a") to the first docstring:
> 
> pylupdate4: Updating 'i18n/i18nit.ts'...
> pylupdate4:     Found 1 source text (1 new and 0 already existing)

Fixing this properly is very risky as the parsing code isn't the greatest
in the world. Instead I've clarified the error message.

One day I'll get round to a Python version of pylupdate which uses the
interpreter to do the parsing.

Thanks,
Phil
_______________________________________________
PyQt mailing list    PyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic