When editing translated content, the module should probably do nothing

Created on 22 October 2024, 24 days ago

Problem/Motivation

I’ve done some more multi-language testing. Paragraphs Clipboard seems to have a couple of minor issues when working with translated content - these are visible at https://dev-lcmd10.pantheonsite.io/es/node/20/edit:

When editing a translation, there’s a paste button but no copy button.

If you paste a paragraph into a translated node, it gets listed with a yellow warning icon, cannot be edited and doesn’t get saved.

Steps to reproduce

Create or edit a node as a translation of an existing node which has one or more paragraphs.

Example: https://dev-lcmd10.pantheonsite.io/es/node/20/edit

Exact behaviour seems to depend on which language was used when first creating the parent node - I suspect this is due to how the Paragraphs module itself handles things - the original parent node seems to determine how many paragraph items are available in the content.

Proposed resolution

I think the only change we need is:

When editing a translation of a parent entity (node) the module should probably do and show nothing. This is because it’s not possible to add or remove paragraph items when editing a translation - only when editing the original.

Alternatively: maybe it makes sense to offer copy but not paste in this situation. However, because the Paragraphs three-dots menu is not shown, this might be complicated to do?

Remaining tasks

Code changes needed.

📌 Task
Status

Active

Version

1.0

Component

Code

Created by

🇬🇧United Kingdom andy inman Gloucestershire, UK

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

Comments & Activities

  • Issue created by @andy inman
  • 🇬🇧United Kingdom andy inman Gloucestershire, UK
  • 🇬🇧United Kingdom andy inman Gloucestershire, UK

    Retested with the latest (1.0.0-beta5), all ok now.

    * It's no longer possible to paste a previously copied paragraph into a translation.
    * Plegar means collapase, not paste - my mistake - that button is meant to be there.
    * The yellow triangle warning shown for a collapsed paragraph means "You have unsaved changes on this Paragraph item" - seems wrong, as no changes were made, but it's not related to this module - still shown if the module is uninstalled.

  • 🇬🇧United Kingdom andy inman Gloucestershire, UK
Production build 0.71.5 2024