Beispiel #1
0
 def compile_message_catalogs(self):
     for fname in self.list_message_catalogs():
         dest = fname.replace('.po', '.mo')
         msgfmt.make(fname, dest)
         if os.path.exists(dest):
             print 'Compiled %s OK' % fname
         else:
             print 'Compilation of %s failed!' % fname
Beispiel #2
0
 def compile_message_catalogs(self):
     for fname in self.list_message_catalogs():
         dest = fname.replace('.po','.mo')
         msgfmt.make(fname, dest)
         if os.path.exists(dest):
             print 'Compiled %s OK' % fname
         else:
             print 'Compilation of %s failed!' % fname
Beispiel #3
0
 def compile_message_catalogs(self, locale='*'):
     """ works for single locale or all locales - just for efficiency when recompiling a single locale
     """
     for fname in glob.glob(self.locale_dir +'/'+ locale + '/LC_MESSAGES/*.po'):
         dest = fname.replace('.po','.mo')
         msgfmt.make(fname, dest)
         if os.path.exists(dest):
             print 'Compiled %s OK' % fname
         else:
             print 'Compilation of %s failed!' % fname
Beispiel #4
0
 def compile_message_catalogs(self, locale="*"):
     """ works for single locale or all locales - just for efficiency when recompiling a single locale
     """
     for fname in glob.glob(self.locale_dir + "/" + locale + "/LC_MESSAGES/*.po"):
         dest = fname.replace(".po", ".mo")
         msgfmt.make(fname, dest)
         if os.path.exists(dest):
             print "Compiled %s OK" % fname
         else:
             print "Compilation of %s failed!" % fname