def ts2po(self, tssource): converter = ts2po.ts2po() tsfile = wStringIO.StringIO(tssource) outputpo = converter.convertfile(tsfile) print("The generated po:") print(bytes(outputpo)) return outputpo
def ts2po(self, tssource): converter = ts2po.ts2po() tsfile = BytesIO(tssource.encode()) outputpo = converter.convertfile(tsfile) print("The generated po:") print(bytes(outputpo)) return outputpo