(ai_translate) One click translations for Layout builder

Created on 9 August 2024, 3 months ago

Problem/Motivation

The main functionality does support
- Paragraphs and fields (this was built in https://www.drupal.org/project/ai/issues/3464024#comment-15720929 (ai_translate) One click translations for Paragraphs Needs review )
but not
- Layout builder.

Steps to reproduce

Create a page in aCT with Layout builder enabled.
Creater a nice layout with multiple text in blocks.
Navigate to the translate page
click on "Translate using GPT"
The Blocks will not be (but should be) translated.

Proposed resolution

Make it so layouts get translated too on the clicking of the button.

Remaining tasks

User interface changes

API changes

Data model changes

Feature request
Status

Active

Version

1.0

Component

Other Submodules

Created by

🇧🇪Belgium wouters_f Leuven

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

Merge Requests

Comments & Activities

  • Issue created by @wouters_f
  • First commit to issue fork.
  • Merge request !135TextExtractor plugin for Layout builder → (Open) created by valthebald
  • Pipeline finished with Failed
    about 1 month ago
    Total: 254s
    #300120
  • Pipeline finished with Failed
    about 1 month ago
    Total: 169s
    #300568
  • Status changed to Needs work 16 days ago
  • 🇧🇪Belgium borisson_ Mechelen, 🇧🇪

    I have attempted to test this on a local install, and it looks to me like this doesn't work yet.
    The problem I encounter is that only the title is translated, and nothing that was placed trough layout builder.

    To me it seems like something that needs to be changed in the TextExtractor. Will investigate further.

  • 🇧🇪Belgium borisson_ Mechelen, 🇧🇪

    If a field type is layout_section, the value always seems to be "Text" instead of the actual text I filled in in the layout builder content. That gets sent to the AI, but a new layout section does not get created either.

    It seems like there are multiple things that can still be improved here.

    array:1 [▼
      0 => array:5 [▼
        "delta" => "850c5e44-8e63-4435-a015-2556aa8c323d"
        "field_name" => "info"
        "field_type" => "string"
        "value" => "Text"
        "parents" => array:2 [▼
          0 => "info"
          1 => 0
        ]
      ]
    ]
    
  • 🇧🇪Belgium wouters_f Leuven

    I've tried this too and not gotten it to work.
    I also noticed blocks also have the translate links but they give an error when clicking on the button.

Production build 0.71.5 2024