Skip to content
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 "Translate" link to contextual content links. #6410

Closed
olafgrabienski opened this issue Feb 27, 2024 · 6 comments · Fixed by backdrop/backdrop#4662
Closed

Add "Translate" link to contextual content links. #6410

olafgrabienski opened this issue Feb 27, 2024 · 6 comments · Fixed by backdrop/backdrop#4662

Comments

@olafgrabienski
Copy link

olafgrabienski commented Feb 27, 2024

Description of the need

When referenced content items are displayed on a page as "Rendered entity", single items can be edited and deleted using its contextual links. On multilingual sites, I would expect there also a contextual link to translate an item. Without such a link, the translation workflow is quite complicated.

Proposed solution

For content types with enabled translation, add a "Translate" link in the contextual links of referenced or otherwise embedded nodes (e.g. a view with content teasers). The path should be node/NID/translate (or node/NID-REFERENCED/translate?destination=node/REFERENCING-NID).

Alternatives that have been considered

A custom or contrib module could provide such a link. In my opinion, it makes however sense to have the feature in Backdrop core. (Drupal 8+ does so, by the way.)

Draft of feature description for Press Release (1 paragraph at most)

Backdrop now includes contextual links to improve the content translation workflow.

@argiepiano
Copy link

@olafgrabienski here you go, PR backdrop/backdrop#4662

Adding contextual links is very simple - just a one-line change! Gotta love Backdrop!

@olafgrabienski
Copy link
Author

Thanks a lot for the PR @argiepiano, how wonderful! I've tested the PR in the sandbox site: It works as expected on a page with referenced content, and it works also in the Views block of promoted content on the home page.

Screenshot:

@olafgrabienski olafgrabienski changed the title Add "Translate" link to contextual links of referenced content Add "Translate" link to contextual content links Feb 28, 2024
@olafgrabienski olafgrabienski changed the title Add "Translate" link to contextual content links [UX] Add "Translate" link to contextual content links Mar 1, 2024
@olafgrabienski
Copy link
Author

olafgrabienski commented Mar 1, 2024

I've added [UX] to the issue title, for "user-experience improvement". As such, it can be part of a bugfix release, so I'm adding the milestone candidate - bug label as well.

@indigoxela
Copy link
Member

Cool, I wasn't even aware of that 'context' key.

RTBC 👍

@olafgrabienski
Copy link
Author

Many thanks for reviewing! Adding the bugfix release milestone.

(I see, there is one failing test. A typical 'not related' one?)

@quicksketch
Copy link
Member

Nice tiny little change here! I merged backdrop/backdrop#4662 into 1.x and 1.27.x. Thanks @argiepiano, @olafgrabienski, and @indigoxela!

@jenlampton jenlampton changed the title [UX] Add "Translate" link to contextual content links Add "Translate" link to contextual content links. Mar 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants