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

Giuseppe Corbelli giuseppe.corbelli at copanitalia.com
Fri Jun 10 09:52:44 BST 2011


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

-- 
            Giuseppe Corbelli
WASP Software Engineer, Copan Italia S.p.A
Phone: +390303666104  Fax: +390302659932
E-mail: giuseppe.corbelli at copanitalia.com


More information about the PyQt mailing list