Posted by phoenix on February 25, 2010 at 11:44am
I would like to send an email when content in one of my site's languages changes. The mails has to go to the editors of the other languages, so they can update their version. I installed the rules module, but can't find an out of date event. How can I quickly add i18n events?
Thanks !
Comments
Combine with VBO
You could do what you're looking for with Views Bulk Operations.
I just wrote some guidance for a somewhat trickier task: http://groups.drupal.org/node/52828#comment-146098
Best of luck,
//Johan Falk, NodeOne, Sweden
Thanks
I'll give it a try, I also found your blog post today where you describe combining rules with vbo. (http://nodeone.se/drupal-planet/make-rules-dance-with-views-bulk-operations)
I've had a very poor crack at
I've had a very poor crack at it using Rules and VBO.
So far it works as:
The issues I have so far are:
- step 2, every time the node is saved, if the translation is still flagged as out of date it will resend the email (minor issue).
- step 4, I can't work out in VBO how to send an email to a role (major issue). Presumably I need to create a new action? I know that in Rules you can email a role, but under this workflow (as far as I am aware) I have to use VBO to handle the emailing.
One way would be to rewrite the view so rather than listing nodes, it lists users who have the translator role, but I can't work out how to tie that into the nid of the saved node: it should only contact them if the saved node that has been marked as out of date. Unfortunately, in views it's the translated nodes that are marked as out of date - there's nothing to show the original has been flagged.
(I'd also like to only list users whose language/domain is affected by the out of date translation - i.e. if the original is English and it's been translated into French, the German translator shouldn't receive an email.)
Ugh. I've had another go at
Ugh.
I've had another go at it and so far I'm here:
This seems unsatisfactory to me as it seems weird to go Rules -> VBO -> Rules but I can't work out in VBO how to send to members of a role and I can't work out in Rules how to test whether on saving the "mark as out of date" box is ticked.
My ideal solution would send an email to the translators with a link to their version of the page (and it's title in their lanaguage). It would also be in either HTML email OR some way that turns node/17 (for example) into the path alias.
Completed
OK; turns out I was making it significantly more complicated than it needed to be.
Create a new rule when pages are updated
Create a new condition that executes custom PHP code. Use
<?phpif ($node->translation['retranslate']==1) { return true; } else {return false;}
?>
as the condition.
Add an action to send an email to all members of a role ("translators") and you have a set-up that works OK.
It doesn't give the path to the translated page or anything, but if that became significant, I guess I'd have to use something like VBO or custom code.