Problem/Motivation

Add support for paragraph translations, when you now click on translate node only the node fields are translated.

Steps to reproduce

Proposed resolution

  1. Adjust the translatecontroller to build a tree of the content to translate
  2. Json encode the content en send it to chatgpt for translation
  3. Add the nested paragraphs recursive to the node

Remaining tasks

User interface changes

API changes

Data model changes

Comments

Wouter Waeytens created an issue. See original summary.

wouter waeytens’s picture

StatusFileSize
new11.8 KB
jonjacobs’s picture

StatusFileSize
new16.85 KB

Needed this also, I've worked a little bit more on the previous patch, with the following changes:
- For some situations where paragraphs were translated, all existing translations were overwritten, should now be fixed
- Changed how the calls to chatgpt are made, instead of 1 big call (which resulted in a lot of tokens being used + keys being overwritten) the values are now being loaded separately
- Kept all existing paragraph fields instead of only the translatable ones

Probably needs some more refining and cleaning up.

jonjacobs’s picture

Status: Active » Needs work
wouters_f’s picture

wouters_f’s picture

ideally this issue (patch) also ends up in https://www.drupal.org/project/ai/issues/3457200

ratjiek’s picture

I tried to add a batch to it. This way you can see a progress bar.
Probably needs some more refining and cleaning up.

(old path look at comment #8)

ratjiek’s picture

StatusFileSize
new21.69 KB

Fixes latest patch.

This patch supports a batch.
Also the input field for the api key needed to be longer. This patch also handels that issue.

wouters_f’s picture

It works in the ai module and I think most people will (and even should) switch to that one.
Anup can help with the maintenance there, then we dont need to maintain duplicate modules (and the AI module has more functionalities).
For me this may be closed (outdated).