def po2prop(self, posource): """helper that converts po source to .properties source without requiring files""" inputfile = wStringIO.StringIO(posource) inputpo = po.pofile(inputfile) convertor = po2prop.po2prop() outputprop = convertor.convertstore(inputpo) return outputprop
def po2prop(self, posource): """helper that converts po source to .properties source without requiring files""" inputfile = BytesIO(posource.encode()) inputpo = po.pofile(inputfile) convertor = po2prop.po2prop() outputprop = convertor.convertstore(inputpo) return outputprop