Translations API getting called twice

Created on 26 February 2025, about 1 month ago

Problem/Motivation

The translation APIs seem to be getting called twice.

Steps to reproduce

- Install v1.3.0 of the module.
- Configure AI translation (I suspect any service would lead to the same outcome).
- Create a content.
- Go to translations page for the content

Now, when we click on the Add translation button on the translations page for the node , the APIs are getting called to translate the content.
Save the translation and observe that translations APIs are getting called for the second time.

Proposed resolution

Need to investigate.
Might be happening because of auto_translation_form_node_form_alter().

Remaining tasks

NA

User interface changes

NA

API changes

NA

Data model changes

NA

📌 Task
Status

Active

Version

1.3

Component

Code

Created by

🇮🇳India Vivek Panicker Kolkata

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

Comments & Activities

  • Issue created by @Vivek Panicker
  • 🇮🇹Italy bigbabert Milano, Italy

    Hi @vivek i think the error here is on the ai_translate module since in it first version it give the possibility to translate a string, now it always translate the full node even if we call the method to translate a single string it always call translateContent inside TextTranslator this is way i was implementing the use of the controller that has inside it the public function translateSingleText not exposed true a service properly

  • 🇮🇳India Vivek Panicker Kolkata

    I think you are right about this.

    I'll move this to the AI module then so that the maintainers can have a look at it.

Production build 0.71.5 2024