def make_templates():
 if (not os.path.exists('email')):
  os.makedirs('email')
 for path in glob.glob(os.path.join(MO_DIR, '*')):
  lng = os.path.split(path)[1]
  if (lng != 'en'):
   print ('Create email template for %s' % lng)
   trans = gettext.translation(DOMAIN_E, MO_DIR, [lng], fallback=False, codeset='latin-1')
   trans.install(unicode=True, names=['lgettext'])
   translate_tmpl('email', lng)
   translate_tmpl('rss', lng)
   translate_tmpl('badfetch', lng)
   mo_path = os.path.normpath(('%s/%s%s/%s.mo' % (MO_DIR, path, MO_LOCALE, DOMAIN_E)))
   if os.path.exists(mo_path):
    os.remove(mo_path)

def make_templates ( ) : if ( not os . path . exists ( 'email' ) ) : os . makedirs ( 'email' ) for path in glob . glob ( os . path . join ( MO_DIR , '*' ) ) : lng = os . path . split ( path ) [ 1 ] if ( lng != 'en' ) : print ( 'Create email template for %s' % lng ) trans = gettext . translation ( DOMAIN_E , MO_DIR , [ lng ] , fallback = False , codeset = 'latin-1' ) trans . install ( unicode = True , names = [ 'lgettext' ] ) translate_tmpl ( 'email' , lng ) translate_tmpl ( 'rss' , lng ) translate_tmpl ( 'badfetch' , lng ) mo_path = os . path . normpath ( ( '%s/%s%s/%s.mo' % ( MO_DIR , path , MO_LOCALE , DOMAIN_E ) ) ) if os . path . exists ( mo_path ) : os . remove ( mo_path )
create email templates .