Esempio n. 1
0
 def po2dtd(self, posource, remove_untranslated=False):
     """helper that converts po source to dtd source without requiring files"""
     inputfile = wStringIO.StringIO(posource)
     inputpo = po.pofile(inputfile)
     convertor = po2dtd.po2dtd(remove_untranslated=remove_untranslated)
     outputdtd = convertor.convertstore(inputpo)
     return outputdtd
Esempio n. 2
0
 def po2dtd(self, posource, remove_untranslated=False):
     """helper that converts po source to dtd source without requiring files"""
     inputfile = wStringIO.StringIO(posource)
     inputpo = po.pofile(inputfile)
     convertor = po2dtd.po2dtd(remove_untranslated=remove_untranslated)
     outputdtd = convertor.convertstore(inputpo)
     return outputdtd
Esempio n. 3
0
 def po2dtd(posource, remove_untranslated=False):
     """helper that converts po source to dtd source without requiring files"""
     inputfile = BytesIO(posource.encode())
     inputpo = po.pofile(inputfile)
     convertor = po2dtd.po2dtd(remove_untranslated=remove_untranslated)
     return convertor.convertstore(inputpo)