-
-
Notifications
You must be signed in to change notification settings - Fork 194
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Review state should be translatable on folder_contents page #2419
Comments
If we just add |
This issue is a hard one. You need to get the title that is defined for the workflow state, not try to translate the id. There may be a change to do in plone.app.content? |
Btw @tisto I didn't test volto recently, but do you have the review state correctly translated in folder contents in volto? Maybe you can shed some light on this issue? How do you do it properly in volto? |
If I am not wrong we translate all workflow and content-type names in plone.restapi endpoints. I was working on it in a Sprint some time ago, indeed 😄 |
I guess you still need the review_state as id for the filters or for the style, so we should add the review_state_title (already translated with |
Yeah, something like that. See what we did with transitions, for instance: https://github.com/plone/plone.restapi/blob/master/src/plone/restapi/services/workflow/info.py#L54 |
Ah ah, so you know there is a change do be made in the python code that create this json and then a change in mockup to use the new key in the json to show the workflow state. |
I had to make 2 changes to achieve this:
A similar strategy can be used for portal types. I find the vocabulary changes a bit hacky, but I think that there is no other way to achieve this. I didn't just exchange the value of the review_state with its translated version because the original review_state value could be useful for other purposes, not just for rendering it in folder_contents view. Any comment? |
You're right about not changing the value for review_state, otherwise it would be a breaking change. |
@erral You can create a PR as draft for your branch so we have more visibility you are working on it. |
I thought I already did this, sorry. I created plone/plone.app.content#207 and plone/mockup#1001 |
So, just checked, here it translates the state: 6.0.2 classicui |
BUG REPORT
Review state should be translatable on folder_contents page
What I expect to happen:
@@getVocabulary
should return new propertyreview_state_title
and this property should be used on the page. Becausereview_state
property already be used view class asstate-private
, it meansreview_state
could not be translatable.What actually happened:
@@getVocabulary
What version of Plone
Plone 5.1.2
The text was updated successfully, but these errors were encountered: