When a job has many job_items with duplicate text, then only one job gets sent to Gengo. This means the other translations will simply hang and never return.
Jobs with duplicate text which are in a group are identified as duplicates, please see:

http://developers.gengo.com/v2/jobs/#jobs-post

under "There are repeated jobs in the jobs payload". Drupal plugin should take this into account so duplicate strings are replaced properly.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

miro_dietiker’s picture

Assigned: Unassigned » blueminds
Status: Needs work » Active

Martin, can you please tell us how you deal with duplicates here?

Issam, i do doubt that this happens too often... I would guess that in reality parts are somehow quite often similar, while there's not too many cases where payload items are exactly identical.

One thing here: As soon as the i18n strings plugin is here, it will happen quite often with e.g. also Menu items or other things like views translations. These items are quite often repeating.

Issam: Note that "needs work" is for issues with patches that should be improved. We firs start with "active" as long as there's no code.

issam.zeibak’s picture

Hello Miro,

Sorry for the incorrect status.

Unfortunately, I've seen this case twice for two large users. Usually they have many articles, and on occasion many fields that will have copied text. You are correct about the menu items, this is where most instances are.

This is still an active issue with them and is a very high priority issue with us. At least there should be some sort of notification so the user knows about this.

If possible, could an ETA be provided for a resolution on this?

issam.zeibak’s picture

Priority: Normal » Critical

Hello,

I would like to up the priority on this to a critical. For large customers ordering in bulk have many similar fields, e.g. subtitles, submenu names, etc., and we are seeing these fields come back empty on large posts. If you would like to work together on this please do not hesitate to contact me.

Thank you and Kind regards,
Issam
Gengo

blueminds’s picture

Hey,

this has never been implemented - the code even contains TODO for this feature. The problem is that it is not clear how to handle this situation due to our design. Will think about it and during today will provide ETA.

blueminds’s picture

Sorry for late reply... been kinda busy at drupalcamp london :)

This can be now implemented as we keep track of the remote jobs, however this http://drupal.org/node/1901890#comment-6997836 has to make it in first. So what it takes is as follows:

- You need to use the latest tmgmt dev version with support of remote mappings
- The linked patch needs to make it in, however there must be an upgrade provided from the gengo specific mapping to tmgmt generic one
- If it all works, then we can implement functionality that in case of duplicate it will search in mapping table, find the job and pull the data of that job into duplicate one.

To sum up, it is not much coding, but still takes some time. My estimate is from 4 to 8 hours, so can be done fairly fast. Will talk to miro_dietiker about possibilities.

issam.zeibak’s picture

Hi,

Thanks so much for being on top of this. Please let me know as soon as possible when this is out, I'd like to test this on our end when I can. Looking forward to updates!

Berdir’s picture

Version: 7.x-1.0-beta1 » 7.x-1.x-dev
Status: Active » Needs review
FileSize
6.15 KB

Ok, here we go.

Attached patch extends our mock service with this behavior and adds basic tests for this. Also fixes those tests but the fix is a bit... rough, not completely sure about it. But it seems to be working well.

@issam: Please test this, I think with the test coverage for this, we can get an initial fix for it in and later refactor and improve it.

Berdir’s picture

FileSize
88.62 KB

Overlooked the @todo that @blueminds mentioned before. But that seems problematic, if you look at the output of the attached screenshot, you can see that it both has jobs and an offer_id and right now we don't process the order_id if there are any jobs returned it seems. Don't completely understand the logic there.

The advantage of my approach, while a bit more complicated has the advantage that we don't even send it as a job which means a smaller payload and less things to process.

issam.zeibak’s picture

Status: Needs review » Fixed

Hello Berdir,

I applied your patch. This is a rough fix, but it does accomplish what it should. Thank you very much for your efforts with this initial fix. Looking forward to a more robust one. I think this is great for now though. I think you can apply this patch.

Berdir’s picture

Status: Fixed » Reviewed & tested by the community

Thanks for testing.

The correct state to set in this case is "reviewed and tested by the community", then I'll commit it and set it to fixed. Have a look at the linked documentation pages (see description help text below the select fields) for more details.

Berdir’s picture

Status: Reviewed & tested by the community » Fixed

Commited and pushed.

Status: Fixed » Closed (fixed)

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