Skip to content

Handle the case language_access module is enabled

Arnaud Willame requested to merge issue/ai-3480861:1.0.x into 1.0.x

This merge request allow the use of the language_access module with ai_translate Without this change it was impossible to translate content with ai_translate because the route subscriber was altered by language_access and do not allowed the change of overview needed to display the "translate with ai" link.

It modifies the RouteSubscriber of the AI Translate module to incorporate functionality from the language_access module, ensuring compatibility and enhanced routing behavior when content translation is enabled.

To test it :

  • Make sure language_access module is enabled
  • Create a role that can edit and translate a node.
  • Do not allow this role to translate one language in Language Access Permissions
  • Go to the translate page of the node logged as the user and see you dont see the language you dont have the permission to translate.
  • See that other languages can be translate by AI.

Merge request reports

Loading