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

List:       pykde
Subject:    Re: [PyQt] Internationalisation
From:       Phil Thompson <phil () riverbankcomputing ! com>
Date:       2011-12-12 17:41:27
Message-ID: 2c6da4706553c16db9e7c2719c1e0758 () localhost
[Download RAW message or body]

On Mon, 12 Dec 2011 16:50:25 +0000, Jeremy Sanders
<jeremy@jeremysanders.net> wrote:
> Hi - are most people using gettext or Qt for their internationalisation?
> 
> I played with pylupdate, but it doesn't always find the strings. For 
> instance I can't do something like
> 
> def mytr(text):
>   return QApplication.translate("myclass", text)
> 
> class myclass:
>  ....
>  def __init__(self):
>    foo = mytr("hello")
> 
> I wonder whether it is worth making a simple Python-based version of 
> pylupdate. It could use the ast module to get a tree of the python code
to 
> find calls to translation functions. The user could mark their
translation 
> function with something in the docstring for the parser to interpret.

It's been on my TODO list for some time to do exactly that (except I would
pass the names of translation functions as command line arguments).

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