workflows: remove explicit gettext calls when using description (#54324)
This commit is contained in:
parent
c392804608
commit
0a237eaafa
|
@ -341,7 +341,7 @@ class WorkflowItemPage(Directory):
|
|||
self.workflow = workflow
|
||||
self.parent = parent
|
||||
self.html_top = html_top
|
||||
get_response().breadcrumb.append(('items/%s/' % component, _(self.item.description)))
|
||||
get_response().breadcrumb.append(('items/%s/' % component, self.item.description))
|
||||
|
||||
def _q_index(self):
|
||||
request = get_request()
|
||||
|
@ -379,7 +379,7 @@ class WorkflowItemPage(Directory):
|
|||
|
||||
self.html_top('%s - %s' % (_('Workflow'), self.workflow.name))
|
||||
r = TemplateIO(html=True)
|
||||
r += htmltext('<h2>%s</h2>') % _(self.item.description)
|
||||
r += htmltext('<h2>%s</h2>') % self.item.description
|
||||
r += form.render()
|
||||
if self.item.support_substitution_variables:
|
||||
r += get_publisher().substitutions.get_substitution_html_table()
|
||||
|
@ -581,10 +581,10 @@ class WorkflowStatusPage(Directory):
|
|||
('user-action', _('Act on User')),
|
||||
]
|
||||
available_items = [x for x in item_classes if self.is_item_available(x)]
|
||||
available_items.sort(key=lambda x: misc.simplify(_(x.description)))
|
||||
available_items.sort(key=lambda x: misc.simplify(x.description))
|
||||
|
||||
for category, category_label in categories:
|
||||
options = [(x.key, _(x.description)) for x in available_items if x.category == category]
|
||||
options = [(x.key, x.description) for x in available_items if x.category == category]
|
||||
form.add(
|
||||
SingleSelectWidget,
|
||||
'action-%s' % category,
|
||||
|
@ -878,7 +878,7 @@ class WorkflowVariableWidget(CompositeWidget):
|
|||
for x in item.get_parameters()
|
||||
if not getattr(item, x) and x not in excluded_parameters
|
||||
]
|
||||
label = getattr(item, 'label', None) or _(item.description)
|
||||
label = getattr(item, 'label', None) or item.description
|
||||
for parameter in parameters:
|
||||
key = prefix + parameter
|
||||
fake_form = Form()
|
||||
|
@ -1589,7 +1589,7 @@ class WorkflowPage(Directory):
|
|||
if not status.items:
|
||||
r += htmltext('<p>%s</p>') % _('No actions in this status.')
|
||||
for item in status.items or []:
|
||||
r += htmltext('<h4>%s</h4>') % _(item.description)
|
||||
r += htmltext('<h4>%s</h4>') % item.description
|
||||
r += item.get_parameters_view()
|
||||
r += htmltext('</div>')
|
||||
r += htmltext('</div>')
|
||||
|
@ -1606,7 +1606,7 @@ class WorkflowPage(Directory):
|
|||
r += htmltext('</ul>')
|
||||
r += htmltext('</h3>')
|
||||
for item in action.items or []:
|
||||
r += htmltext('<h4>%s</h4>') % _(item.description)
|
||||
r += htmltext('<h4>%s</h4>') % item.description
|
||||
r += item.get_parameters_view()
|
||||
r += htmltext('</div>')
|
||||
r += htmltext('</div>')
|
||||
|
|
|
@ -150,7 +150,7 @@ class JumpWorkflowStatusItem(WorkflowStatusJumpItem):
|
|||
|
||||
def render_as_line(self):
|
||||
# override parent method to avoid mentioning the condition twice.
|
||||
return '%s (%s)' % (_(self.description), self.get_line_details())
|
||||
return '%s (%s)' % (self.description, self.get_line_details())
|
||||
|
||||
def get_line_details(self):
|
||||
if not self.status:
|
||||
|
|
Loading…
Reference in New Issue