コード例 #1
0
ファイル: test_po2dtd.py プロジェクト: cloph/translate
 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
コード例 #2
0
ファイル: test_po2dtd.py プロジェクト: ANKIT-KS/fjord
 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
コード例 #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)