We are hoping to allow cloned, non-continuous jobs to be autosubmitted to the translation provider.

With the current state of TMGMT Extension Suite, new jobs can be set as continuous, which in turn lets them be picked up by TMGMT cron and submitted to the provider that way. However, if you do not want to set up new jobs as automatically continuous, and you do want to clone them to other target languages, the new jobs end up unsubmitted and need to be submitted manually, and one-by-one.

As near as I could tell with the code, this is relatively easy to do with a few modifications to JobMultiLangForm. I will attach a patch that

a) adds a settings value allowing the user to specify if they want this behavior
b) submits the cloned job upon creation, via tmgmt_job_request_translation()

There may be better approaches to this, or good reasons for not doing this. We'd very much like feedback.

Comments

timcosgrove created an issue. See original summary.

timcosgrove’s picture

Patch attached.

soul88’s picture

Status: Active » Needs work

Thank you for the issue and the patch. But current approach won't work, as you'll get PHP time out if there are many languages on the site. (it takes a while to submit each language)

timcosgrove’s picture

@soul88 thanks for the quick response. I'll look at putting them into the cron queue or otherwise batching them.

I understand allowing the jobs to be continuous would get them picked up but we're not prepared to commit to continuous jobs just yet.

I'll try to have another patch attempt shortly.

soul88’s picture

Could you please describe the limitations of the continuous jobs approach that led you into working on this issue?

P.S. If I were to implement batch submit I would gain some inspiration from here: http://cgit.drupalcode.org/tmgmt_extension_suit/tree/src/Form/BaseTmgmtA...

gg4’s picture

@Soul88 One scenario to consider is how continuos jobs and translation of interface strings work together. It doesn't seem that new items can be added to existing continuous jobs -- unless I am mistaken -- which makes bundling interface job that are maintainable longterm challenging. It is possible that using either ad-hoc jobs or a single job for interface strings would be ideal. I think the patch/approach in this issues might help with the former.

loparev’s picture

Status: Needs work » Fixed

Hi guys.

Thank you for your patch, but looks like this issue was resolved here. So when you clone job into other lnguages they will be added into upload queue and will be submitted authomatically by cron run.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.