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