Ejemplo n.º 1
0
 def merge2dtd(dtdsource, posource):
     """helper that merges po translations to dtd source without requiring files"""
     inputfile = BytesIO(posource.encode())
     inputpo = po.pofile(inputfile)
     templatefile = BytesIO(dtdsource.encode())
     templatedtd = dtd.dtdfile(templatefile)
     convertor = po2dtd.redtd(templatedtd)
     return convertor.convertstore(inputpo)
Ejemplo n.º 2
0
 def merge2dtd(self, dtdsource, posource):
     """helper that merges po translations to dtd source without requiring files"""
     inputfile = wStringIO.StringIO(posource)
     inputpo = po.pofile(inputfile)
     templatefile = wStringIO.StringIO(dtdsource)
     templatedtd = dtd.dtdfile(templatefile)
     convertor = po2dtd.redtd(templatedtd)
     outputdtd = convertor.convertstore(inputpo)
     return outputdtd
Ejemplo n.º 3
0
 def merge2dtd(self, dtdsource, posource):
     """helper that merges po translations to dtd source without requiring files"""
     inputfile = wStringIO.StringIO(posource)
     inputpo = po.pofile(inputfile)
     templatefile = wStringIO.StringIO(dtdsource)
     templatedtd = dtd.dtdfile(templatefile)
     convertor = po2dtd.redtd(templatedtd)
     outputdtd = convertor.convertstore(inputpo)
     return outputdtd