[schema categorization] new NO_I18NCONTEXT set usable to somewhat control c-c i18n
--- 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:
--- 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((