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.
Before it makes to the repo the functionality provided is here: https://drupal.org/node/1970740#comment-7552269
Comments
Comment #1
blueminds CreditAttribution: blueminds commentedHere is the patch... however it was a little pain due to the gengo sandbox having some moody behaviour. Also I was not able to submit more than one gengo job so did not get the opportunity to do testing with multiple data items each mapped to remote job. I did a lot of trying but gave up after all :|
Also the patch includes a workaround for https://drupal.org/node/2022147 as without it I was not able to submit a job as invalid data was passed to create mapping.
Comment #3
blueminds CreditAttribution: blueminds commented#1: tmgmt_mygengo-review_data_item_element-2022451-1.patch queued for re-testing.
Comment #5
BerdirTests are currently broken, which makes this a bug.
Hm. We probably can, but we shouldn't call it $field.
There's always a first key on that level, maybe $top_key?
It's a bit ugly that we have to know about this here.
Hm. That's a bit hard to understand. We could extend the method and add an optional $data_item_key argument? This might be something that other translators will use too...
Alternatively, I'd prefer a separate variable that is set in the if instead of the unset().
Also, speaking of tests, we have a hen/egg problem here. Apart from the fact that tests are already broken (the testbot just doesn't know yet, but we can change that be forcing the branch to be test), we won't be able get them green, because we now rely on code that is not in alpha3. So to use that, we first need release a new version. But then this module won't work together with that version before we commit it. So I think for now, I'll force a branch test to postpone patches here. Then we need to run tests manually and release both modules at the same time.
Comment #6
blueminds CreditAttribution: blueminds commentedplease see the patch
$field/$top_key - yes I dont like it as well, it feels fuzzy, but do not think we can do something about it.
$mapping - we pass $data_item_key into the method. Originally I was thinking to pass in whole mapping object, but that might not be ideal for other translators as i.e. for OHT the mapping is job_item specific unlike gengo, where it is data item.
Comment #7
BerdirTested this manually. Noticed a few strange things...
- When requesting a revision, the status icon doesn't update, it stays yellow. After a manual refresh, it's correct.
- The same seems to happen for revisions, the message was displayed but text was not updated, after a refresh it's ok.
- Also had a strange case where all my jobs were suddenly set to needs review, not sure what triggered it exactly.
Did not have any issues with gengo, my jobs showed up there as they're supposed to.
Comment #8
blueminds CreditAttribution: blueminds commentedIn order to make this work this patch needs to be applied: https://drupal.org/node/2026825#comment-7572663
Comment #10
blueminds CreditAttribution: blueminds commentedAnd yes - RE all items in reviewable state - if you save one of the items all of them are submitted and processed via addTranslatedDataRecursive(). In there we do not expect the case when #translation is not set and we skip to logic where we deal with revisions where it is added as empty translation with status TMGMT_DATA_ITEM_STATE_TRANSLATED. Created followup Issue #2026849 to deal with it.
Comment #11
blueminds CreditAttribution: blueminds commented#8: tmgmt_mygengo-review_data_item_element-2022451-3.patch queued for re-testing.
Comment #13
blueminds CreditAttribution: blueminds commentedthis is really strange, locally tests are passing...
Comment #14
BerdirNo, not strange at all :)
See last paragraph in #5.
The testbot uses the latest release of tmgmt core, which doesn't have those methods yet, so nothing is added to the form and the tests fail.
To make the tests pass, I need to release a new alpha/beta of core, then commit this and then create a release for this.
Comment #15
BerdirRun the tests locally, still getting some notice exceptions?
Undefined index: ajaxid Notice tmgmt_mygengo.ui.inc 87 TMGMTMyGengoTranslatorUIController->reviewDataItemElement()
Comment #16
blueminds CreditAttribution: blueminds commentedupdated patch to reflect the changes done in https://drupal.org/node/2026825#comment-7602525
Comment #18
Berdirthanks, committed and pushed. Opened #2032869: Remove update is ignored if text did not change and data item is in pending state for the core bug that I found.