Commit d9d8268d authored by Damien Garaud's avatar Damien Garaud
Browse files

[workflow view] Display a non-localized version of state/transition names (closes #1912537).

--HG--
branch : stable
parent 67660d5f1916
......@@ -256,6 +256,9 @@ class Transition(BaseTransition):
"""customized class for Transition entities"""
__regid__ = 'Transition'
def dc_long_title(self):
return '%s (%s)' % (self.name, self._cw._(self.name))
def destination(self, entity):
try:
return self.destination_state[0]
......@@ -345,6 +348,9 @@ class State(AnyEntity):
fetch_attrs, cw_fetch_order = fetch_config(['name'])
rest_attr = 'eid'
def dc_long_title(self):
return '%s (%s)' % (self.name, self._cw._(self.name))
@property
def workflow(self):
# take care, may be missing in multi-sources configuration
......
......@@ -71,7 +71,7 @@ class DotPropsHandler(object):
def node_properties(self, entity):
"""return default DOT drawing options for a state or transition"""
return {'label': entity.dc_title(),
return {'label': entity.dc_long_title(),
'href': entity.absolute_url(),
'fontname': 'Courier', 'fontsize': 10, 'shape':'box',
}
......
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