[PyQt] [i18n] Can't understand contexts

Anonymous gforgx at lavabit.com
Sun Jul 19 01:28:39 BST 2009


Hi,

I develop my application using PyQt4.

First I've decided to put all messages those are subject to be translated  
into a separate file, let's call it msg.py like:

ADD_ACTION = QCoreApplication.translate('here goes context', 'Add', '', 1)
# ...

and etc. and init QApplication and setup translators in main source file  
before import-ing msg.py.

Is it possible to put something as context argument so translations will  
actually work for all classes or is there any way to disable
context chack?

P.S. Even when I put class name for class that exists in main source file  
and is already declared into context arg, e. g. "QtInterface"
or "AddAction" anything doesn't get translated.

Thanks!

-- 
Написано в почтовом клиенте браузера Opera: http://www.opera.com/mail/



More information about the PyQt mailing list