def po2ts(self, posource): """helper that converts po source to ts source without requiring files""" inputfile = wStringIO.StringIO(posource) inputpo = po.pofile(inputfile) convertor = po2ts.po2ts() outputts = convertor.convertstore(inputpo) return outputts
def po2ts(self, posource): """helper that converts po source to ts source without requiring files""" inputfile = wStringIO.StringIO(posource) inputpo = po.pofile(inputfile) convertor = po2ts.po2ts() output = wStringIO.StringIO() convertor.convertstore(inputpo, output) return output.getvalue().decode('utf-8')