Esempio n. 1
0
 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
Esempio n. 2
0
 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
Esempio n. 3
0
 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')