-
Notifications
You must be signed in to change notification settings - Fork 1
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
Add translation for Authors folder #51
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jonaspiterek Have you actually tested this with a different language? I don't think it will work.
Message id objects created with the _
helper are automatically translated into the current language in certain places -- such as when they appear in a template or are serialized to JSON for an API response. But, I don't think api.content.create
will take care of translating them. So, I expect that we need to do it manually before passing the translated values into api.content.create
.
Here's an example of how to do it manually: https://github.com/plone/plone.restapi/blob/d5b83a67b5a894b7985c67e6c2ae0c9eb1034fd6/src/plone/restapi/services/users/add.py#L40
@davisagli I did tested it with a different language and it is kind of working, "title" and "description" get the translation. But "id" does not. Also the breadcrumbs which I believe use the "title" don't work. |
@jonaspiterek, take a look if it works as expected now. |
Additional code added here to handle the plone/plone.api#524 issue |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ericof Works exactly as expected
ToDo
Fix #50