- Issue created by @wouters_f
- First commit to issue fork.
- Status changed to Needs work
5 months ago 3:46pm 30 October 2024 - 🇧🇪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. - 🇧🇪Belgium arwillame Belgium 🇧🇪
I tested as well and it seem to work in the specific default case :
- The content type has a node "layout_builder__layout" wich is NOT TRANSLATABLE
- All the blocks used in Layout builder need to be translatable and have text fields translatable.So in this configuration it will work as expected, it will just create a translation for the node, where the blocks ids are kept from the source language and translated.
It's the same idea as for the paragraph, this is a "symmetric" setup.
For my use case i would need to be able to have an "asymmetric" translation of the blocks for layout_builder (Dupplicate the block from source language, translate it and attach it to node translation).
I'll work on a module as i made for the asymmetric paragraphs : https://www.drupal.org/project/ai_translate_paragraph_asymetric →
- 🇧🇪Belgium arwillame Belgium 🇧🇪
I made more intensive testing and the MR seems fine for me for a "classic" install as specified in my last comment.
For the layout builder configured to be asymmetric (with Layout Builder Asymmetric Translation → ), i created a contrib module to handle this case :
https://www.drupal.org/project/ai_translate_lb_asymmetric →With this module, you'll be able to translate you layout builder page with the following config:
- Translatable Fields: Ensure that the fields referencing blocks (layout) are configured to be translatable.
- Non-Translatable Block Fields: Make sure that the block fields themselves are not set to be translatable. - Status changed to Needs review
3 months ago 8:47am 2 January 2025 - First commit to issue fork.
- 🇩🇪Germany marcus_johansson
Merged with latest dev to pass tests and then getting merged into dev. Thank you everyone.
Automatically closed - issue fixed for 2 weeks with no activity.