Here's an attempt to integrate publish/unpublish actions on a translation. This requires a relation with entity translation language in Views

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

plach’s picture

Status: Active » Needs review
stefanos.petrakis@gmail.com’s picture

Status: Needs review » Needs work

Hey there,

Thanks for the idea and the patch, makes sense, clearly.
I tested this against the latest 7.x-1.x-dev on a D7.50, worked fine.

One clarification question; when you say:

"This requires a relation with entity translation language in Views"

I understand this as

The View at hand must have a "Entity translation: Language" field (accessible via the "Content: Entity translation: translations" relationship)

Is my understanding correct? If yes, then the next point is important.

Point to improve

We need some kind of fallback, for the case where the View at hand doesn't have a relation with entity translation language.
For example, one could use the $language_content global to grab the current content language. Or, anything else to avoid errors.

Regards!

plach’s picture

+++ b/entity_translation.module
@@ -1984,3 +1984,57 @@ function path_entity_translation_delete($entity_type, $entity, $langcode) {
+      'type'         => 'entity',

Also, can we remove this formatting for consistency with the rest of the codebase?