equal
deleted
inserted
replaced
77 if form: |
77 if form: |
78 key = key + '_' + form |
78 key = key + '_' + form |
79 # ensure unicode |
79 # ensure unicode |
80 # added .lower() in case no translation are available |
80 # added .lower() in case no translation are available |
81 return unicode(req._(key)).lower() |
81 return unicode(req._(key)).lower() |
82 __builtins__['display_name'] = deprecated('display_name should be imported from cubicweb.schema')(display_name) |
82 __builtins__['display_name'] = deprecated('[3.4] display_name should be imported from cubicweb.schema')(display_name) |
83 |
83 |
84 def ERSchema_display_name(self, req, form=''): |
84 def ERSchema_display_name(self, req, form=''): |
85 """return a internationalized string for the entity/relation type name in |
85 """return a internationalized string for the entity/relation type name in |
86 a given form |
86 a given form |
87 """ |
87 """ |
947 return orig_set_statement_type(self, bw_normalize_etype(etype)) |
947 return orig_set_statement_type(self, bw_normalize_etype(etype)) |
948 stmts.Select.set_statement_type = bw_set_statement_type |
948 stmts.Select.set_statement_type = bw_set_statement_type |
949 |
949 |
950 # XXX deprecated |
950 # XXX deprecated |
951 from yams.constraints import format_constraint |
951 from yams.constraints import format_constraint |
|
952 format_constraint = deprecated('[3.4] use RichString instead of format_constraint')(format_constraint) |
952 from yams.buildobjs import RichString |
953 from yams.buildobjs import RichString |
953 PyFileReader.context['format_constraint'] = format_constraint |
954 PyFileReader.context['format_constraint'] = format_constraint |