As I was working on https://www.drupal.org/node/2780933 I was trying to understand the ticket and so I was sending content through the whole translation process and trying different actions with the translations. While doing so I found seven unexpected behaviors. Here is a list of the seven behaviors:
- target-edited (NOT_CURRENT) is styled identical to target-current (CURRENT) which is odd since they are exact opposites but visually are represented the same. But according to the Lingotek Connector Requirements document it should be styled with a border and font color #2196F3 and a background color of #FFFFFF
- When a target has a status of NOT_CURRENT the link to workbench does not work. It should be a link to open the workbench
- When source has the status EDITED and then a target translation is downloaded the target status is set to CURRENT (see https://www.drupal.org/node/2780933 , it should be NOT_CURRENT) this behavior is not specifically mentioned in the Lingotek Connector Requirements document but rather in the ticket https://www.drupal.org/node/2780933 and (see #4)
- the Source status is set to CURRENT even though an outdated target translation is downloaded and has nothing to do with the source, the expected behavior would be for the source status to stay the same. According to the Lingotek Connector Requirements the only action to set the Source state to CURRENT is the successful upload of the source to the TMS.
- If the source has the status EDITED and a "Check progress of all tranlsations" call is made all targets that have been requested will be set to the READY status regardless of what it really is. The expected behavior would be for it to receive the status it really has. And once it has been set to READY it will not change until it has been downloaded again. If source status and target status are both EDITED then it should not check the TMS for status because that means that the TMS could have a completed/in-progress translation but an outdated source and so checking would result in IN_PROGRESS, READY_INTERIM, or READY but in reality the latest translation is already downloaded and so changing the status is confusing. Now if the source status is CURRENT then it should check the TMS for the translation status and set it respectively.
- When the source is EDITED and then is re-uploaded any target that is NOT_CURRENT should be changed to PENDING but it remains the same.
- LingotekContentTranslationService::updateDocument() the status of all targets were set to STATUS_REQUEST and then when the form was being built there is logic for if there is a translation for that langcode AND the status is set to STATUS_REQUEST then set status to STATUS_UNTRACKED because it means there is already a translation and this situation would and should mean that we are not handling the translation. In LingotekContentTranslationService::updateDocument() we should NOT be setting the status to STATUS_REQUEST but rather to STATUS_PENDING. And a target should only be moved to UNTRACKED if it is disassociated.
| Comment | File | Size | Author |
|---|---|---|---|
| #7 | aligning_translation_3_4_6_and_7-2847216-7.patch | 4.57 KB | t.murphy |
| #5 | aligning_translation_1_and_2-2847216-5.patch | 3.31 KB | t.murphy |
| #2 | aligning_translation-2847216-2.patch | 68.13 KB | t.murphy |
Comments
Comment #2
t.murphy commentedThis patch does not have tests to test the new functionality, I will create a new patch with those tests.
Comment #3
t.murphy commentedComment #5
t.murphy commentedHere is a patch that solves problems 1 and 2.
Comment #7
t.murphy commentedPatch to fix problems 3, 4, 6, and 7.