Allow Editors to choose whether to replicate all translations or only default language

Created on 25 May 2021, about 3 years ago
Updated 21 June 2023, about 1 year ago

Problem/Motivation

In our current project there is the desire to be able to choose, when replicating a node, whether we want to replicate all translations or only the default language. The use-case is:

* Editor replicates an existing (translated) node
* Editor modifies replicated node (default language) extensively
* Editor sends the new node (using tmgmt) to external translation system to be translated
* When translations come back, there are conflicts between the original translations and the translated versions of the modified (cloned) node.

I know there are ways to avoid this, namely:

* Instruct editors to delete translations before sending the node to be translated, or:
* Implement our own event subscribers in custom code to remove the translations of the entity object being cloned.

I wanted to see if maintainers would consider this feature appropriate for replicate_ui, in which case I could work on a patch to make the confirmation screen have a checkbox so editors could chose on a per-node basis if they want to replicate all translations or only the default language.

Thanks!

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

✨ Feature request
Status

Needs work

Version

1.0

Component

Code

Created by

πŸ‡ͺπŸ‡ΈSpain marcoscano Barcelona, Spain

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡¨πŸ‡­Switzerland Berdir Switzerland

    Yeah, agreed, the validation stuff seems a bit complicated for what it brings. The label field is prefilled, someone would need to go through the trouble of removing the content and then not duplicate the translations. I'm fine with just removing that and the test coverage for it.

    We've been using this for a while and it works quote well, there's a confusing issue with paragraphs though, their translations don't get deleted when deleting a translation. So when you then re-add a translation. But I think that's an issue with ERR/paragraphs and happens when manually removing a translation as well.

  • πŸ‡¨πŸ‡­Switzerland Berdir Switzerland
  • πŸ‡¨πŸ‡¦Canada Charlie ChX Negyesi 🍁Canada

    We went the opposite direction with this issue: our checkbox says replicate only $default_language. It felt more natural.

    Also, if we were to add an event called ReplicateUiOnlyUntranslatedEvent then paragraphs ReplicateFieldSubscriber could catch it and remove the translations from paragraphs.

    https://gist.github.com/chx/ec7a6f1ec990016c218d6c0cf5a1372e

    Let me know how to proceed: if there's any interest at all I will submit the paragraphs part in the relevant issue queue (and commit the relevant bricks patch too) and I will add the event to the current patch. Further let me know whether there's interest in swapping the direction in the current patch.

Production build 0.69.0 2024