While working on some translation features I went through translation.pages.inc and (1) added a lot of comments and (2) moved a few lines to give more sense.

The result is attached in a very simple patch.

(Backport for Drupal 6 is in a separate issue, #1045392: Code cleanup in translation.pages.inc (D6).)

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Itangalo’s picture

Status: Active » Needs review

Changing to 'needs review'. Sorry for missing this.

Status: Needs review » Needs work

The last submitted patch, translation-page-clarified-7.patch, failed testing.

Itangalo’s picture

Status: Needs work » Needs review

translation-page-clarified-7.patch queued for re-testing.

Itangalo’s picture

Ok, I've just learned how to use Git to create patches, according to the new style. Sweet.

Robot, please retest!

plach’s picture

Title: Code cleanup in translation.pages.inc (D7) » Code cleanup in translation.pages.inc
plach’s picture

Version: 7.x-dev » 8.x-dev
TR’s picture

I closed #1045392: Code cleanup in translation.pages.inc (D6) as a duplicate. This should be one issue, there's no need to discuss the same changes in two different threads. Once this issue is resolved in 8.x the issue status can be set to "needs backport" to port it to previous versions.

plach’s picture

Status: Needs review » Needs work
Issue tags: +Needs backport to D6, +Needs backport to D7

The last submitted patch, translation_page_cleanup-1045396-4.patch, failed testing.

swentel’s picture

Version: 8.x-dev » 7.x-dev

A lot has been cleaned up in the D8 cycle, can move to D7 if we still want to clean this up.

Sivaji_Ganesh_Jojodae’s picture

Patch needs reroll.

Sivaji_Ganesh_Jojodae’s picture

Issue summary: View changes
Status: Needs work » Needs review
FileSize
5.83 KB

Have re-rolled the previous patch with a change replacing lengthy ternary operators with if/else for better readability.

Status: Needs review » Needs work

The last submitted patch, 12: translation_page_cleanup-1045396-11.patch, failed testing.

Sivaji_Ganesh_Jojodae’s picture

Status: Needs work » Needs review
FileSize
5.84 KB

Rerolled with proper fix!

TR’s picture

parthipanramesh’s picture

Status: Needs review » Reviewed & tested by the community

Looks good!

David_Rothstein’s picture

Version: 7.x-dev » 8.x-dev
Status: Reviewed & tested by the community » Needs work

A good portion of this seems to apply to Drupal 8 - see content_translation_overview() (and \Drupal\content_translation\Controller\ContentTranslationController::overview(), which is a wrapper around that).

Also:

+      if ($translation_node->translate) {
+        $status .= ' - <span class="marker">' . t('outdated') . '</span>';
+      }
+      else {
+        $status .= '';
       }

That else statement could just be removed, right?

Version: 8.0.x-dev » 8.1.x-dev

Drupal 8.0.6 was released on April 6 and is the final bugfix release for the Drupal 8.0.x series. Drupal 8.0.x will not receive any further development aside from security fixes. Drupal 8.1.0-rc1 is now available and sites should prepare to update to 8.1.0.

Bug reports should be targeted against the 8.1.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.2.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.1.x-dev » 8.2.x-dev

Drupal 8.1.9 was released on September 7 and is the final bugfix release for the Drupal 8.1.x series. Drupal 8.1.x will not receive any further development aside from security fixes. Drupal 8.2.0-rc1 is now available and sites should prepare to upgrade to 8.2.0.

Bug reports should be targeted against the 8.2.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.3.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.2.x-dev » 8.3.x-dev

Drupal 8.2.6 was released on February 1, 2017 and is the final full bugfix release for the Drupal 8.2.x series. Drupal 8.2.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.3.0 on April 5, 2017. (Drupal 8.3.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.3.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.4.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.3.x-dev » 8.4.x-dev

Drupal 8.3.6 was released on August 2, 2017 and is the final full bugfix release for the Drupal 8.3.x series. Drupal 8.3.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.4.0 on October 4, 2017. (Drupal 8.4.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.4.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.5.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.4.x-dev » 8.5.x-dev

Drupal 8.4.4 was released on January 3, 2018 and is the final full bugfix release for the Drupal 8.4.x series. Drupal 8.4.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.5.0 on March 7, 2018. (Drupal 8.5.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.5.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.6.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.5.x-dev » 8.6.x-dev

Drupal 8.5.6 was released on August 1, 2018 and is the final bugfix release for the Drupal 8.5.x series. Drupal 8.5.x will not receive any further development aside from security fixes. Sites should prepare to update to 8.6.0 on September 5, 2018. (Drupal 8.6.0-rc1 is available for testing.)

Bug reports should be targeted against the 8.6.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.7.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.6.x-dev » 8.8.x-dev

Drupal 8.6.x will not receive any further development aside from security fixes. Bug reports should be targeted against the 8.8.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.9.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 8.8.x-dev » 8.9.x-dev

Drupal 8.8.7 was released on June 3, 2020 and is the final full bugfix release for the Drupal 8.8.x series. Drupal 8.8.x will not receive any further development aside from security fixes. Sites should prepare to update to Drupal 8.9.0 or Drupal 9.0.0 for ongoing support.

Bug reports should be targeted against the 8.9.x-dev branch from now on, and new development or disruptive changes should be targeted against the 9.1.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

quietone’s picture

Component: translation.module » config_translation.module
Status: Needs work » Closed (outdated)
Issue tags: -Needs backport to D6, -Needs backport to D7

The file changed here is not in Drupal 9.2.x. \Drupal\content_translation\Controller\ContentTranslationController::overview() has changed a lot since the last patch here. That makes this outdated for current HEAD.

The Drupal 7 files have not changed, so it may be applicable, but it is not a bug fix nor is there anything to backport. I think the sensible thing to do is to close this as outdated. I trust someone will change that if it is incorrect.