We need to add this into the D8 module and the correct logic to accompany it.
Some questions and comments on source of ticket:
"What happens if the Source is EDITED and then a READY_INTERIM target gets downloaded? Is it fine that it stays as INTERIM? Because I feel like that tells me it is a current-source, in-progress target download, when in this situation it is really an edited-source, in-progress target download and I feel should be more in line with the styling of NOT_CURRENT/EDITED and not CURRENT.
I would propose adding another target status called INTERIM_NOT_CURRENT that would have the border and text colors being #FFC107."

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

t.murphy created an issue. See original summary.

mdahl328151’s picture

This patch should be applied after applying the patch from https://www.drupal.org/node/2850548.

penyaskito’s picture

Status: Active » Needs work

#2850548: STATUS_INTERIM_READY needs to be added to transition flow has tests, I think we could have similar tests here too.

+++ b/src/Lingotek.php
@@ -36,6 +36,7 @@ class Lingotek implements LingotekInterface {
+  const STATUS_INTERIM_EDITED = 'INTERIMEDITED';

Nickpick, but let's change this constant to 'INTERIM-EDITED'.

mdahl328151’s picture

mdahl328151’s picture

STATUS_INTERMEDIATE is misspelled

mdahl328151’s picture

Version: 8.x-1.x-dev » 8.x-2.x-dev
Assigned: Unassigned » mdahl328151
Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, 5: status_interim_not_current-2850547-8.patch, failed testing. View results

mdahl328151’s picture

mdahl328151’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, 8: status_interim_not_current-2850547-12.patch, failed testing. View results

mdahl328151’s picture

Status: Needs work » Needs review
penyaskito’s picture

+++ b/src/LingotekContentTranslationService.php
@@ -869,7 +878,7 @@ class LingotekContentTranslationService implements LingotekContentTranslationSer
-      if (!$entity->hasTranslation($langcode)) {
+      if (!$entity->hasTranslation($langcode) && $revision != NULL) {

Is this change related?

I didn't review completely the rest of the patch but this wasn't expected.

+++ b/src/Tests/LingotekNodeBulkTranslationTest.php
@@ -319,14 +322,17 @@ class LingotekNodeBulkTranslationTest extends LingotekTestBase {
-    // Ensure we won't get a completed document because there are phases pending.
-    \Drupal::state()->set('lingotek.document_completion', FALSE);
-

Not sure why are we editing this test instead of having a new one.

mdahl328151’s picture

Status: Needs review » Needs work

The last submitted patch, 13: status_interim_not_current-2850547-15.patch, failed testing. View results

mdahl328151’s picture

Status: Needs work » Needs review
FileSize
25.8 KB

This patch is the same as patch 15, but can be applied to branch 8.x-2.x

mdahl328151’s picture

mdahl328151’s picture

Fixed some whitespace and added more tests

Status: Needs review » Needs work

The last submitted patch, 17: status_interim_not_current-2850547-18.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

mdahl328151’s picture

Status: Needs work » Needs review
FileSize
40.12 KB
24.81 KB

Fixed some whitespace and added more tests

Status: Needs review » Needs work

The last submitted patch, 19: status_interim_not_current-2850547-19.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

mdahl328151’s picture

Status: Needs work » Needs review