# HG changeset patch # User Sylvain Thénault # Date 1286981242 -7200 # Node ID 103774c8c2159c34e1b4284f1a4759f704081578 # Parent 2e3dabe00987e008be8d3d88dc5581c847836f56 [schema categorization] new NO_I18NCONTEXT set usable to somewhat control c-c i18n diff -r 2e3dabe00987 -r 103774c8c215 devtools/devctl.py --- a/devtools/devctl.py Wed Oct 13 16:46:54 2010 +0200 +++ b/devtools/devctl.py Wed Oct 13 16:47:22 2010 +0200 @@ -122,8 +122,7 @@ from copy import deepcopy from cubicweb.i18n import add_msg from cubicweb.web import uicfg - from cubicweb.schema import META_RTYPES, WORKFLOW_RTYPES, CONSTRAINTS - no_context_rtypes = META_RTYPES | WORKFLOW_RTYPES + from cubicweb.schema import NO_I18NCONTEXT, CONSTRAINTS w('# schema pot file, generated on %s\n' % datetime.now().strftime('%Y-%m-%d %H:%M:%S')) w('# \n') @@ -212,13 +211,13 @@ else: librschema = libschema.rschema(rtype) # add context information only for non-metadata rtypes - if rschema not in no_context_rtypes: + if rschema not in NO_I18NCONTEXT: libsubjects = librschema and librschema.subjects() or () for subjschema in rschema.subjects(): if not subjschema in libsubjects: add_msg(w, rtype, subjschema.type) if not (schema.rschema(rtype).final or rschema.symmetric): - if rschema not in no_context_rtypes: + if rschema not in NO_I18NCONTEXT: libobjects = librschema and librschema.objects() or () for objschema in rschema.objects(): if not objschema in libobjects: diff -r 2e3dabe00987 -r 103774c8c215 schema.py --- a/schema.py Wed Oct 13 16:46:54 2010 +0200 +++ b/schema.py Wed Oct 13 16:47:22 2010 +0200 @@ -62,6 +62,8 @@ # cwproperty 'for_user', )) | WORKFLOW_RTYPES +NO_I18NCONTEXT = META_RTYPES | WORKFLOW_RTYPES +NO_I18NCONTEXT.add('require_permission') # set of entity and relation types used to build the schema SCHEMA_TYPES = set((