Support translation of documents

Created on 16 December 2024, 9 months ago

Problem/Motivation

Deepl supports the translation of specific file types, see https://developers.deepl.com/docs/api-reference/document

Proposed resolution

Support translation of documents

Remaining tasks

  1. Write a merge request
  2. Review
  3. Commit

User interface changes

To be determined.

API changes

To be determined.

Data model changes

To be determined.

Feature request
Status

Active

Version

2.2

Component

Code

Created by

🇳🇱Netherlands idebr

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

Merge Requests

Comments & Activities

  • Issue created by @idebr
  • 🇩🇪Germany SteffenR Germany
  • 🇩🇪Germany SteffenR Germany

    @idebr: If you are still interested in the issue, you may provide more information on what should be taken into account.
    By means of the documentation, the task of translating documents is related to "real files", which are uploaded to drupal.
    I'm not sure, if this is even possible within tmgmt.

  • 🇩🇪Germany SteffenR Germany
  • 🇳🇱Netherlands idebr

    My project requirement is pretty basic:
    - Upload a file in a node
    - Automatically translate the file when translating the node using Deepl

    This is supported by tmgmt, see Translate files / attachments Fixed

    The priority for automatic translations for documents in my project has been lowered, so I don't expect to do any development on this feature in the short term

  • 🇳🇱Netherlands idebr

    TMGMT enables additional settings when a translator plugin includes "files = TRUE" in its annotation

    1. \Drupal\tmgmt_deepl\DeeplTranslatorApiInterface::translate is renamed to \Drupal\tmgmt_deepl\DeeplTranslatorApiInterface::translateText to match the deepl client method
    2. Introduced \Drupal\tmgmt_deepl\DeeplTranslatorApiInterface::translateDocument

    I will continue to iterate on this issue next week.

  • Pipeline finished with Failed
    9 days ago
    Total: 150s
    #584386
  • Pipeline finished with Failed
    5 days ago
    Total: 170s
    #587271
  • Pipeline finished with Canceled
    5 days ago
    Total: 186s
    #587277
  • Pipeline finished with Failed
    5 days ago
    Total: 182s
    #587278
  • Pipeline finished with Failed
    5 days ago
    Total: 154s
    #587291
  • Pipeline finished with Failed
    5 days ago
    Total: 227s
    #587311
  • Pipeline finished with Failed
    5 days ago
    Total: 222s
    #587322
  • Pipeline finished with Success
    5 days ago
    Total: 293s
    #587327
  • 🇳🇱Netherlands idebr
    1. Translatable files are now added as a separate batch operation per file, see \Drupal\tmgmt_deepl\DeeplTranslatorBatchInterface::translateDocumentOperation
    2. A document is translated by Deepl through \Drupal\tmgmt_deepl\DeeplTranslatorApiInterface::translateDocument
  • 🇩🇪Germany SteffenR Germany

    It would be nice, if you could add testing instructions on how to use the document translation.
    I think i'll find some time next week for further testing - right now i'm heavily involved in projects at work.

  • 🇳🇱Netherlands idebr

    TMGMT supports translation of files on a conceptual level, see https://www.drupal.org/node/3392215

    The mimetypes that should be translated can be selected at /admin/tmgmt/settings under 'File translation'

    Assuming you have a working setup with nodes, you can add a 'File upload' field to the content type and check the option 'Users may translate this field' in the field settings.

  • Pipeline finished with Success
    4 days ago
    Total: 308s
    #587867
  • Pipeline finished with Success
    1 day ago
    Total: 158s
    #589967
  • Pipeline finished with Failed
    1 day ago
    Total: 152s
    #589994
  • Pipeline finished with Success
    1 day ago
    Total: 153s
    #590004
  • 🇳🇱Netherlands idebr

    DeeplTranslatorBatch:: getTranslationOptions() is a bit messy right now since the settings priority is currently not implemented (Job settings > Translator settings -> Translator plugin defaults). I filed a follow-up issue to start smoothing this out, see 📌 Provide sensible default settings Active

Production build 0.71.5 2024