devtools/devctl.py
changeset 8665 e65af61bde7d
parent 8620 61c4bdd70dd8
child 8666 1dd655788ece
equal deleted inserted replaced
8664:29652410c317 8665:e65af61bde7d
    95             if mod.__file__.startswith(path):
    95             if mod.__file__.startswith(path):
    96                 del sys.modules[name]
    96                 del sys.modules[name]
    97                 break
    97                 break
    98     # fresh rtags
    98     # fresh rtags
    99     from cubicweb import rtags
    99     from cubicweb import rtags
   100     from cubicweb.web import uicfg
   100     from cubicweb.web.views import uicfg
   101     rtags.RTAGS[:] = []
   101     rtags.RTAGS[:] = []
   102     reload(uicfg)
   102     reload(uicfg)
   103 
   103 
   104 def generate_schema_pot(w, cubedir=None):
   104 def generate_schema_pot(w, cubedir=None):
   105     """generate a pot file with schema specific i18n messages
   105     """generate a pot file with schema specific i18n messages
   127 
   127 
   128 
   128 
   129 def _generate_schema_pot(w, vreg, schema, libconfig=None):
   129 def _generate_schema_pot(w, vreg, schema, libconfig=None):
   130     from copy import deepcopy
   130     from copy import deepcopy
   131     from cubicweb.i18n import add_msg
   131     from cubicweb.i18n import add_msg
   132     from cubicweb.web import uicfg
   132     from cubicweb.web.views import uicfg
   133     from cubicweb.schema import NO_I18NCONTEXT, CONSTRAINTS
   133     from cubicweb.schema import NO_I18NCONTEXT, CONSTRAINTS
   134     w('# schema pot file, generated on %s\n'
   134     w('# schema pot file, generated on %s\n'
   135       % datetime.now().strftime('%Y-%m-%d %H:%M:%S'))
   135       % datetime.now().strftime('%Y-%m-%d %H:%M:%S'))
   136     w('# \n')
   136     w('# \n')
   137     w('# singular and plural forms for each entity type\n')
   137     w('# singular and plural forms for each entity type\n')