Ejemplo n.º 1
0
 def po2xliff(self, posource, sourcelanguage="en", targetlanguage=None):
     """helper that converts po source to xliff source without requiring files"""
     postore = po.pofile(posource.encode("utf-8"))
     convertor = po2xliff.po2xliff()
     outputxliff = convertor.convertstore(postore,
                                          None,
                                          sourcelanguage=sourcelanguage,
                                          targetlanguage=targetlanguage)
     return poxliff.PoXliffFile(outputxliff)
Ejemplo n.º 2
0
 def po2xliff(self, posource, sourcelanguage='en', targetlanguage=None):
     """helper that converts po source to xliff source without requiring files"""
     postore = po.pofile(posource)
     convertor = po2xliff.po2xliff()
     outputxliff = convertor.convertstore(postore, None, sourcelanguage=sourcelanguage, targetlanguage=targetlanguage)
     return poxliff.PoXliffFile(outputxliff)