Ejemplo n.º 1
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(mark_active=False)
     outputlang = convertor.convertstore(inputpo)
     return bytes(outputlang).decode('utf-8')
Ejemplo n.º 2
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(mark_active=False)
     outputlang = convertor.convertstore(inputpo)
     return bytes(outputlang).decode('utf-8')
Ejemplo n.º 3
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
Ejemplo n.º 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