コード例 #1
0
ファイル: test_po2mozlang.py プロジェクト: lambacck/translate
 def po2lang(self, posource):
     """helper that converts po source to .lang source without requiring files"""
     inputfile = wStringIO.StringIO(posource)
     inputpo = po.pofile(inputfile)
     convertor = po2mozlang.po2lang(mark_active=False)
     outputlang = convertor.convertstore(inputpo)
     return bytes(outputlang).decode('utf-8')
コード例 #2
0
ファイル: test_po2mozlang.py プロジェクト: Veterini/translate
 def po2lang(self, posource):
     """helper that converts po source to .lang source without requiring files"""
     inputfile = wStringIO.StringIO(posource)
     inputpo = po.pofile(inputfile)
     convertor = po2mozlang.po2lang(mark_active=False)
     outputlang = convertor.convertstore(inputpo)
     return bytes(outputlang).decode('utf-8')
コード例 #3
0
ファイル: test_po2mozlang.py プロジェクト: cc-archive/pootle
 def po2lang(self, posource):
     """helper that converts po source to .lang source without requiring files"""
     inputfile = wStringIO.StringIO(posource)
     inputpo = po.pofile(inputfile)
     convertor = po2mozlang.po2lang()
     outputlang = convertor.convertstore(inputpo)
     return outputlang
コード例 #4
0
 def po2lang(self, posource):
     """helper that converts po source to .lang source without requiring files"""
     inputfile = wStringIO.StringIO(posource)
     inputpo = po.pofile(inputfile)
     convertor = po2mozlang.po2lang()
     outputlang = convertor.convertstore(inputpo)
     return outputlang