This seemed surprising to me actually. Could someone verify this?

My fix was just to add $node->translate = 0; in tmgmt_node.module. (Patch sets $node->translation['status'] and $node->translation['retranslate']

Comments

ethanethan’s picture

Seems this is anticipated already in translation_node_update (translation.module). Just need to set $node->translation['status'] and/or ['retranslate'].

ethanethan’s picture

Status: Active » Needs review
StatusFileSize
new654 bytes
ethanethan’s picture

Issue summary: View changes

grammaarrrr

berdir’s picture

Status: Needs review » Needs work
+++ b/sources/node/tmgmt_node.moduleundefined
@@ -44,5 +44,11 @@ function tmgmt_node_update_node_translation($node, $data, $language) {
   tmgmt_field_populate_entity($node, $language, $data);
+  //reset translation field, which determines outdated status
+  $node->translation['status'] = 0;
+  //source node; mark its translated friends as up to date
+  if(isset($node->nid) && $node->nid == $node->tnid){
+    $node->translation['retranslate'] = 0;

Make sure the comments follow the coding standard, which means a space after //, start with an upper case character and end with a "."

This has one problem. That is, if the source node has changed again, it has the chance of incorrectly changing the flag.

Can we make this configurable? Add an if (variable_get('tmgmt_node_update_status', TRUE) and add a hook_form_alter for http://api.worldempire.ch/api/tmgmt/ui%21includes%21tmgmt_ui.pages.inc/f... in tmgmt_node_ui module, adding checkbox, there are already a few examples there.

ethanethan’s picture

Status: Needs work » Needs review
StatusFileSize
new491 bytes

This is only run when a translation is saved (successfully), right? In that case isn't the correct status always 'not outdated'?

As for the second part-- if its only used to save translations, the node passing through here is never the source.

berdir’s picture

Consider this list of events:

- New job created to translate node X to DE
- node X is changed, translations are marked as needing re-translation.
- Original translation comes back, DE node is marked as translation updated.

Also related to #1623402: Option to cancel pending translation jobs when its source content is edited. Not sure how to deal with this.

berdir’s picture

berdir’s picture

Status: Needs review » Fixed

Commited, better than not having it I think, we can deal with conflict situations in case they occcur.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

Anonymous’s picture

Issue summary: View changes

removed "My fix..." because its misleading. The eventual fix is different.