Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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.
Comment | File | Size | Author |
---|---|---|---|
#8 | jobs_and_offer_id.png | 88.62 KB | Berdir |
#7 | handle-duplicates-1922100-7.patch | 6.15 KB | Berdir |
Comments
Comment #1
miro_dietikerMartin, 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.
Comment #2
issam.zeibak CreditAttribution: issam.zeibak commentedHello 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?
Comment #3
issam.zeibak CreditAttribution: issam.zeibak commentedHello,
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
Comment #4
blueminds CreditAttribution: blueminds commentedHey,
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.
Comment #5
blueminds CreditAttribution: blueminds commentedSorry 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.
Comment #6
issam.zeibak CreditAttribution: issam.zeibak commentedHi,
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!
Comment #7
BerdirOk, 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.
Comment #8
BerdirOverlooked 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.
Comment #9
issam.zeibak CreditAttribution: issam.zeibak commentedHello 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.
Comment #10
BerdirThanks 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.
Comment #11
BerdirCommited and pushed.