Commit 2eac29f2 authored by Sylvain Thénault's avatar Sylvain Thénault
Browse files

Replace confusing <unauthorizedW by... nothing

Related to #16684053
parent acfd23149a9e
......@@ -63,9 +63,6 @@ msgstr ""
msgid "<no value specified>"
msgstr ""
msgid "<unauthorized>"
msgstr ""
msgid "Alternative"
msgstr ""
......
......@@ -63,9 +63,6 @@ msgstr "<unité libre>"
msgid "<no value specified>"
msgstr "<valeur libre>"
msgid "<unauthorized>"
msgstr "<non autorisé>"
msgid "Alternative"
msgstr "Choix"
......
......@@ -18,7 +18,7 @@ from copy import deepcopy
from yams import BASE_TYPES
from cubicweb import tags, neg_role, _
from cubicweb import tags, neg_role
from cubicweb.utils import UStringIO
from cubicweb.web import formfields as ff
# XXX alias to avoid side effect: uicfg will become our uicfg submodule. Not necessary with 3.23?
......@@ -96,7 +96,7 @@ def rtags_from_rtype_role_targets(etype, rtype_role_targets):
vid = 'seda.reledit.complexlink'
rec.tag_object_of(('*', rtype, '*'),
{'rvid': vid,
'novalue_label': _('<unauthorized>')})
'novalue_label': ' '})
rsection.tag_relation(relation, 'attributes')
ordered.append((rtype, role))
display_ctrl = cwuicfg.DisplayCtrlRelationTags(__module__=__name__)
......
......@@ -66,7 +66,7 @@ for rtype, role in at_ordered_fields:
simplified_section = 'hidden'
rec.tag_object_of(('*', rtype, 'SEDAArchiveTransfer'),
{'rvid': 'seda.reledit.text',
'novalue_label': _('<unauthorized>')})
'novalue_label': ' '})
# hide extra-fields from main form, as their appearance depends on the simplified_profile
# switch
afs.tag_object_of(('*', rtype, 'SEDAArchiveTransfer'), 'main', 'hidden')
......
......@@ -284,7 +284,7 @@ au_ref_pvs.tag_subject_of(
'attributes')
rec.tag_subject_of(('SEDAArchiveUnit', 'seda_alt_archive_unit_archive_unit_ref_id', '*'),
{'rvid': 'seda.reledit.simplelink',
'novalue_label': _('<unauthorized>')})
'novalue_label': ' '})
class RefArchiveUnitSimpleLinkToEntityAttributeView(EntityView):
......@@ -899,7 +899,7 @@ for rtype, role in content_ordered_fields:
if rtype == 'seda_description_level':
novalue_label = _('<no value specified>')
else:
novalue_label = _('<unauthorized>')
novalue_label = ' '
vid = 'seda.reledit.complexlink' if 'language' in rtype else 'seda.reledit.text'
if role == 'subject':
rec.tag_subject_of((CONTENT_ETYPE, rtype, '*'),
......
......@@ -126,15 +126,15 @@ for rtype in ('seda_compressed', 'seda_data_object_version_from'):
pvs.tag_object_of(('*', rtype, '*'), 'attributes')
rec.tag_object_of(('*', rtype, '*'),
{'rvid': 'seda.reledit.complexlink',
'novalue_label': _('<unauthorized>')})
'novalue_label': ' '})
rec.tag_subject_of(('SEDABinaryDataObject', 'seda_alt_binary_data_object_attachment', '*'),
{'rvid': 'seda.reledit.alternative',
'novalue_label': _('<unauthorized>')})
'novalue_label': ' '})
rec.tag_object_of(('*', 'seda_compressed', '*'),
{'rvid': 'seda.reledit.text',
'novalue_label': _('<unauthorized>')})
'novalue_label': ' '})
def uri_cardinality_vocabulary(form, field):
......
This diff is collapsed.
......@@ -21,7 +21,7 @@ used bits).
from six import text_type
from cubicweb import neg_role
from cubicweb import neg_role, _
from xsd import XSDM_MAPPING
from xsd2yams import CodeGenerator
......@@ -81,15 +81,14 @@ class UICFGGenerator(CodeGenerator):
'reledit_ctrl': {
'shortname': 'rec',
'subject': "rec.tag_subject_of(('*', '{rtype}', '*'), "
"{{'novalue_label': _('<{value}>')}})",
"{{'novalue_label': '{value}'}})",
'object': "rec.tag_object_of(('*', '{rtype}', '*'), "
"{{'novalue_label': _('<{value}>')}})",
"{{'novalue_label': '{value}'}})",
},
}
def _generate(self, mapping, stream):
self._processed = set()
stream.write('from cubicweb import _\n')
stream.write('from cubicweb.web import formwidgets as fw\n')
stream.write('from cubicweb.web.views import uicfg\n\n')
# indexview_etype_section configuration
......@@ -168,7 +167,7 @@ class UICFGGenerator(CodeGenerator):
continue
if ('rec', rtype) not in self._processed:
self._processed.add(('rec', rtype))
yield rtype, 'subject', 'no value specified'
yield rtype, 'subject', _('<no value specified>')
def reledit_ctrl_for_rdef_mapping(self, mapping):
if ('rec', mapping.rtype) in self._processed:
......@@ -179,9 +178,9 @@ class UICFGGenerator(CodeGenerator):
else:
card = mapping.card[mapping.composite == 'object']
if card == '1':
yield mapping.rtype, mapping.composite, 'no value specified'
yield mapping.rtype, mapping.composite, _('<no value specified>')
elif card == '?':
yield mapping.rtype, mapping.composite, 'unauthorized'
yield mapping.rtype, mapping.composite, ' '
def actionbox_appearsin_addmenu_for_rdef_mapping(self, mapping):
if ('abaa', mapping.rtype) in self._processed:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment