Resolve DRUP-317 "Files attachments"
New TMGMT's feature support (file attachments translation):
- Introduced callback controller for downloading file attachments (
/tmgmt-smartling-callback/{job}/{file}) - Callback controllers (download file and download attachment controllers) schedule for download into the download queue instead of downloading right away.
- Requesting translation for a Drupal node (entity) also requests all attached files to the node/entity. TRs/TSs for attachments are created (one TMGMT Job can result in N TRs now). TRs for attachment have asset key as
{"file_id": "79", "tmgmt_job_id": "44"}, TRs for source content are not changed -{"tmgmt_job_id": "44"}. File name for source file stays the same as -JobID<N>_<source_locale>_<target_locale>.xml, file name for attachments has pattern asJobID<N>_<source_locale>_<target_locale>_<attached_file_name>.<attachment_extension>. - Introduced
tmgmt_smartling_attachment_filename_alterhook for altering attachment file name (the same astmgmt_smartling_filename_alterhook). - Refactored
TranslationRequestManager- all the methods related to TRs (upsert/get/search) now can work with files if additional parameter is passed. - Now module requires TMGMT Extension Suit >= 8.x-9.3 because it needs updated
ExtendedTranslatorPluginInterface(it introduced methods for file attachments likeisAttachmentReadyForDownload,downloadAttachmentTranslation, andgetAttachmentFileName). - Deleting TMGMT Job in Drupal results in deleting not only own source file, but also related file attachments.
- Refactoring: used
FlowSchedulerservice provided by TMGMT Extension Suite for scheduling source/attachments for uploading/downloading instead of manually composing queue items data.