def lang2po(self, source): """helper that converts .lang source to po source without requiring files""" inputfile = wStringIO.StringIO(source) inputlang = lang.LangStore(inputfile) convertor = mozlang2po.lang2po() outputpo = convertor.convertstore(inputlang) return outputpo