Closed (fixed)
Project:
Heartbeat
Version:
6.x-4.x-dev
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
7 Mar 2010 at 06:28 UTC
Updated:
1 Apr 2010 at 11:29 UTC
Whenever I add a new translation for an existing node, a new Heartbeat message is created which leads to duplicated messages, one message for each translation. Can Heartbeat handle it the same way like i18n module, i.e. depending on the language settings from the Drupal backend and the language chosen by the user (in the language picker for example) only the messages matching the language are displaced or otherwise the default version as fallback (if a translation in the selected language is not available)?
Comments
Comment #1
Stalski commentedthis could be done yes. dont know if it the best or easiest way. In your case, you are adding translations later on. I'll give it some thought.
Comment #2
Stalski commentedAt the time of logging - and if the drupal setting for languages for that node type is "" - then the logging should only happen for that specific language only. That's the most reasonable solution i can come up with.
Comment #3
Stalski commentedcommitted that sollution. In short, following the drupal way:
If i have a node and their is a language defined (whatever way it is configured) , i use it and log it for that language only. In all other cases i will log the both language because "user updates profile" is the same and has to be translated separately
Comment #4
jaochoo commentedCould you elaborate a little bit more detailled how to achieve it? In the meantime I worked on an own solution which is hiding the messages in the theme layer:
Furthermore disabling creation of a message whenever a node gets updated/edited (because a new language is considered as a node update).
However, if your solution is at the message layer already it seems to be better. So could you please elaborate how to use it? Is there a new dev-version which includes it?
Comment #5
Stalski commentedYou wont need this hook for this anymore (besides it's the wrong hook. hook_heartbeat_messages_alter would be better).
But as i mentioned above, the fix is committed. So when a language is known on the node (saving for englisch, later a translation, ...) will only log for that language specific. So it's no problem anymore.
Please review the commit (cvs update).
Comment #6
Stalski commentedif for some reason, you still need your hook implemenetation, just change the function to messages_alter (they have the same parameters). Buy my guess is that you wont need it anymore.
Comment #7
Stalski commentedComment #8
jaochoo commentedAnother related question: When using Node comments to store Heartbeat comments and having multilanguage Nodes, will the comments be synchronized for the translations?
Comment #9
Stalski commentedPlease dont reopen tickets for questions. The issue queue is hard enough for me to follow. It only causes me to slow down on feature requests and answers.
The answer is : comments will be shown for all languages.