Esempio n. 1
0
 def txt2po(self, txtsource, template=None):
     """helper that converts txt source to po source without requiring files"""
     inputfile = wStringIO.StringIO(txtsource)
     inputtxt = txt.TxtFile(inputfile)
     convertor = txt2po.txt2po()
     outputpo = convertor.convertstore(inputtxt)
     return outputpo
Esempio n. 2
0
 def doku2po(self, txtsource, template=None):
     """helper that converts dokuwiki source to po source without requiring files."""
     inputfile = wStringIO.StringIO(txtsource)
     inputtxt = txt.TxtFile(inputfile, flavour="dokuwiki")
     convertor = txt2po.txt2po()
     outputpo = convertor.convertstore(inputtxt)
     return outputpo