[i18n] do not add context information for metadata relations 3.5
authorAdrien Di Mascio <Adrien.DiMascio@logilab.fr>
Thu, 17 Sep 2009 11:45:20 +0200
branch3.5
changeset 3281 bea1bde00fbc
parent 3280 c1f5625f2fea
child 3282 29d561abe8a7
[i18n] do not add context information for metadata relations
devtools/devctl.py
--- a/devtools/devctl.py	Thu Sep 17 11:31:38 2009 +0200
+++ b/devtools/devctl.py	Thu Sep 17 11:45:20 2009 +0200
@@ -20,7 +20,9 @@
 from logilab.common.shellutils import ASK
 from logilab.common.clcommands import register_commands
 
-from cubicweb import CW_SOFTWARE_ROOT as BASEDIR, BadCommandUsage, underline_title
+from cubicweb import (CW_SOFTWARE_ROOT as BASEDIR, BadCommandUsage,
+                      underline_title)
+from cubicweb.schema import META_RTYPES
 from cubicweb.__pkginfo__ import version as cubicwebversion
 from cubicweb.toolsutils import Command, copy_skeleton
 from cubicweb.web import uicfg
@@ -150,10 +152,12 @@
         relations = schema.relations()
     for rschema in sorted(set(relations)):
         rtype = rschema.type
-        for subjschema in rschema.subjects():
-            add_msg(w, rtype, subjschema.type)
-            # bw compat, necessary until all translation of relation are done properly...
+        # bw compat, necessary until all translation of relation are done properly...
         add_msg(w, rtype)
+        # add context information only for non-metadata rtypes
+        if rschema not in META_RTYPES:
+            for subjschema in rschema.subjects():
+                add_msg(w, rtype, subjschema.type)
         done.add(rtype)
         if not (schema.rschema(rtype).is_final() or rschema.symetric):
             for objschema in rschema.objects():