def build_mo_files(self): """Build mo files from po and put it into LC_MESSAGES """ tmp = [] os.path.walk(locale_dir, po_find, tmp) for (path, t) in tmp: full_path = os.path.join(path , "LC_MESSAGES", "umit.mo") self.mkpath(os.path.dirname(full_path)) self.announce("Compiling %s -> %s" % (t[0],full_path)) msgfmt.make(t[0], full_path, False) # like guess os.path.walk(locale_dir, mo_find, data_files)
def _generate(self, lang): msgfmt.MESSAGES = {} # reset cache (see issue96) infile = os.path.join(PO_PATH, lang, 'LC_MESSAGES', 'crunchyfrog.po') outfile = os.path.join(PO_PATH, lang, 'LC_MESSAGES', 'crunchyfrog.mo') msgfmt.make(infile, outfile)