[PyQt] Pylupdate4 does not parse tr(u"") ?

Detlev Offenbach detlev at die-offenbachs.de
Fri Jun 10 18:46:48 BST 2011


On Freitag, 10. Juni 2011, Giuseppe Corbelli wrote:
> Hi all
> I have a couple of classes like these:
> 
> class CAntibiogram_AlarmData(WaspCore.Common.Alarm.CAlarmData):
>     __alarm_name__ = "ALARM_Antibiogram_Table"
>     __defaults__ = {
>         'name': None,
>         'address': (1602, 0x4000),
>         'description': tr("Sezione allarmi TAVOLA ANTIBIOGRAMMA"),
>         'section_name': _section_name,
>         'section_description': tr("Tavola Antibiogramma"),
>         'active': False
>     }
> 
> 
> class C1667_0AlarmData(WaspCore.Common.Alarm.CAlarmData):
>     __alarm_name__ = "ALARM_1667.0"
>     __defaults__ = {
>         'name': None,
>         'address': (1667, 0x0001),
>         'description': tr(u"Richiesto ciclo con brodi di arricchimento"),
>         'section_name': _section_name,
>         'section_description': tr(u"Tavola Antibiogramma"),
>         'active': True
>     }
> 
> 
> When I run
> pylupdate4 -verbose WaspCore/Alarms/BATable.py -ts test.ts
> I get
> Updating 'test.ts'...
>     Found 2 source texts (0 new and 2 already existing)
> 
> So it seems that pylupdate4 does NOT parse tr(u"") stuff. Is it by design?
> Sorry but I can't dive into it at present.
> 
> Python 2.6.6
> QT 4.7.1
> PyQt 4.8.3
> Linux 2.6

Have you tried it with trUtf8()?

Detlev
-- 
Detlev Offenbach
detlev at die-offenbachs.de


More information about the PyQt mailing list