Example #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
Example #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
Example #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')