Trigger the translations on the duplicate operation

Created on 12 April 2023, about 2 years ago

Problem/Motivation

Translations are not available on the duplicate operation.

In \Drupal\inline_translation\EntityOperations::entityFormAlter(),

if (!in_array($form_object->getOperation(), ['add', 'edit', 'default'], TRUE)) {

we are not adding the duplicate operation.

Proposed resolution

Add the duplicate operation like so,

if (!in_array($form_object->getOperation(), ['add', 'edit', 'duplicate', 'default'], TRUE)) {

✨ Feature request
Status

Active

Version

1.0

Component

Code

Created by

πŸ‡¬πŸ‡§United Kingdom harcher

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

Comments & Activities

  • Issue created by @harcher
  • Issue was unassigned.
  • Status changed to Needs review about 2 years ago
  • πŸ‡¬πŸ‡§United Kingdom harcher
  • Status changed to Postponed: needs info 13 days ago
  • πŸ‡¬πŸ‡§United Kingdom alexpott πŸ‡ͺπŸ‡ΊπŸŒ

    Can you list the steps to reproduce the issue - where does a duplicate operation come from and when does this lead immediately to a form where you want inline translations?

    It does not with Views which is one entity I know has a duplicate operation. I've tried out entity_clone and it does not work this way. We need more information to validate this fix.

  • πŸ‡¬πŸ‡§United Kingdom alexpott πŸ‡ͺπŸ‡ΊπŸŒ

    A project I'm on has this patch applied - doesn't apply to the latest version - here is a patch that does...

Production build 0.71.5 2024