Changeset View
Changeset View
Standalone View
Standalone View
scripts/xliffmerge.py
Show First 20 Lines • Show All 46 Lines • ▼ Show 20 Line(s) | |||||
47 | 47 | | |||
48 | 48 | | |||
49 | strings={} | 49 | strings={} | ||
50 | def getDocUnitsList(path): | 50 | def getDocUnitsList(path): | ||
51 | doc=QDomDocument() | 51 | doc=QDomDocument() | ||
52 | file=QFile(path) | 52 | file=QFile(path) | ||
53 | file.open(QIODevice.ReadOnly) | 53 | file.open(QIODevice.ReadOnly) | ||
54 | reader=QXmlSimpleReader() | 54 | reader=QXmlSimpleReader() | ||
55 | reader.setFeature('http://qtsoftware.com/xml/features/report-whitespace-only-CharData',True) | 55 | reader.setFeature('http://qt-project.org/xml/features/report-whitespace-only-CharData',True) | ||
56 | reader.setFeature('http://xml.org/sax/features/namespaces',False) | 56 | reader.setFeature('http://xml.org/sax/features/namespaces',False) | ||
57 | source=QXmlInputSource(file) | 57 | source=QXmlInputSource(file) | ||
58 | doc.setContent(source,reader) | 58 | doc.setContent(source,reader) | ||
59 | file.close() | 59 | file.close() | ||
60 | 60 | | |||
61 | units=doc.elementsByTagName("trans-unit") | 61 | units=doc.elementsByTagName("trans-unit") | ||
62 | 62 | | |||
63 | unitsList=[] | 63 | unitsList=[] | ||
▲ Show 20 Lines • Show All 321 Lines • Show Last 20 Lines |