4teamwork / ftw.participation

Invite other users (registered or unregistered) to a context in plone.
3 stars 0 forks source link

Improve ftw.lawgiver support for translated role titles. #48

Closed jone closed 7 years ago

jone commented 7 years ago

The standard way to get the role title for translation is to use an ISharingPageRole utility, which has the global title of this role.

ftw.lawgiver introduces a concept of workflow specific titles / translations for roles, which are hooked into the ISharingPageRole utility by looking up the traversed context from the request.

This concept does not work though when rendering roles for multiple context: in this case for a list of activities, which may have contexts with different workflows and thus different role titles.

In order to address this, we now directly lookup the role title from the the context bound IDynamicRoleAdapter (introduced by ftw.lawgiver), so that we do not depend on the traversed context from the request.

@maethu can you take a look at this one?