mozilla / wagtail-localize-smartling

Integration between wagtail-localize and Smartling's API
Mozilla Public License 2.0
1 stars 1 forks source link

Multiple jobs with identical content #23

Open zerolab opened 4 weeks ago

zerolab commented 4 weeks ago

Scenario:

Potential fix:

stevejalim commented 4 weeks ago

@zerolab Yeah, the hash/fingerprint approach makes sense to me, too.

One question, to check I understand the root cause:

sync translation without any content changes, and mark for Smartling. Got another Job

Is that case of Job 1 existing at Smartling, but it hasn't come back yet, and somehow Job 2 for the same page is made because it still looks untranslated on the Wagtail end?

zerolab commented 4 weeks ago

Is that case of Job 1 existing at Smartling, but it hasn't come back yet, and somehow Job 2 for the same page is made because it still looks untranslated on the Wagtail end?

It is a bit more complex than this. "sync translation" from Localize doesn't do anything special in that it literally goes "here's my source, update the chosen targets". If there are changes, the target translations (page, snippet etc) get the updates. Because of that anything extra needs additional checks. In our case we have to account for:

and potentially consider the edge case where the source page got an update to a field that is not translatable, gets synced and we now have a Job that is virtually the same as a previously completed one 🙈 (this is more of a process thing at this point)