Skip to content

get the object to be translated correctly in Google Translate view #462

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

Merged
merged 3 commits into from
Oct 2, 2024

Conversation

erral
Copy link
Member

@erral erral commented Sep 29, 2024

Fixes #303

It looks like previously the view was executed in the context to be translated, which is not true any more. Now this view is executed in a view traverser like /es/++addtranslation++2490009c505b4d4b9a030ca631a70a5f the context (which would be es in this case) is usually the parent folder and not the object to be translated.

The UID in the view traverser (2490009c505b4d4b9a030ca631a70a5f) signals the UID of the object to be translated, so we get it via JavaScript and send it to the translation view, which gets the object correctly.

@mister-roboto
Copy link

@erral thanks for creating this Pull Request and helping to improve Plone!

TL;DR: Finish pushing changes, pass all other checks, then paste a comment:

@jenkins-plone-org please run jobs

To ensure that these changes do not break other parts of Plone, the Plone test suite matrix needs to pass, but it takes 30-60 min. Other CI checks are usually much faster and the Plone Jenkins resources are limited, so when done pushing changes and all other checks pass either start all Jenkins PR jobs yourself, or simply add the comment above in this PR to start all the jobs automatically.

Happy hacking!

@erral
Copy link
Member Author

erral commented Sep 29, 2024

@jenkins-plone-org please run jobs

@erral erral changed the title get the object to be translated correctly in Google Translate get the object to be translated correctly in Google Translate view Sep 30, 2024
@erral
Copy link
Member Author

erral commented Sep 30, 2024

@jenkins-plone-org please run jobs

@davisagli davisagli merged commit 419309f into master Oct 2, 2024
12 checks passed
@davisagli davisagli deleted the erral-issue-303 branch October 2, 2024 03:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Google translate gets wrong context
3 participants