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)
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)