You are here

README.txt in Heartbeat 6.2

Same filename and directory in other branches
  1. 6.4 README.txt
  2. 7 README.txt
Multi part messages
-------------------

Usually a heartbeat message consists of words and tokens. But sometimes it happens 
that a heartbeat message has an extra thingy, the token that needs to be translated 
as well. e.g. "Peter is now friend with Walter" is a valid message, composed by 
"@username1 is now @relation_type with @username2". after going through the t function 
and substitute the message in dutch, I ended up with : "Peter is nu friend with Walter".
Friend is the word that needed to be pre-translated before. From friend to vriend. 

The solution is now to use # as prefix for multi part messages with substrings that need 
to be translated before the rules tokenizer does the magic.
Take care, in the messages you still use @relation_type, but in the variables you must 
define the message parts tokens with #.
Conclusion:
  @username : normal input evaluator
  #relation_type: will be translated first before ending up as normal input evaluator @relation_type



Concatenated messages
---------------------

message_concat in heartbeat_messages is the string used when messages need to be merged.
Together with concat_args we can rebuild a part of the message with the stuff to be 
merged. e.g. Paul is now friend with Walter, Mike and Evelyne or Paul updated 'Why on earth?' on 12-12-2008. 
There are a couple of heartbeat user_activity settings that affect the merging. Timespan when merge should 
occur, maximum and minimum values, user karma point system logged, etc ...



Usage
-----

When working with rules and the default rules described in modules, it is possible 
to change the actions, add condtions, do whatever you like ... 
Assuming your site is multilingual, you need to be aware of the fact that words and 
sentences are only translatable once they are viewed in the browser, parsed by the 
t function (drupal translation function, locale). 
- enable heartbeat, user_activity and its contribute activity  submodules
- [optional change a rules action by updating the message with your own words (and tokens)]
- go to admin/build/translate/search to translate the message AND message parts that are prefixed with '#'
- trigger the event by doing what the rules event describes
- go to heartbeat/user/[uid] or heartbeat/my_activity to view the result. 

If the translations were not enforced, this could be for a couple of reasons:
Could be the wrong string is translated (or was not avaible yet to translate)
Could be the string is translatable when this rule was invoked. (too me , it was 
sometimes correct , sometimes after the first time the event was invoked, bizarre)



Requirements on Rules and tokens
--------------------------------

- patch the token module with http://drupal.org/node/331046 
  or look if it is covered in latest release (this message should be gone by then)
- DO NOT enable token_actions module!


Stalski

File

README.txt
View source
  1. Multi part messages
  2. -------------------
  3. Usually a heartbeat message consists of words and tokens. But sometimes it happens
  4. that a heartbeat message has an extra thingy, the token that needs to be translated
  5. as well. e.g. "Peter is now friend with Walter" is a valid message, composed by
  6. "@username1 is now @relation_type with @username2". after going through the t function
  7. and substitute the message in dutch, I ended up with : "Peter is nu friend with Walter".
  8. Friend is the word that needed to be pre-translated before. From friend to vriend.
  9. The solution is now to use # as prefix for multi part messages with substrings that need
  10. to be translated before the rules tokenizer does the magic.
  11. Take care, in the messages you still use @relation_type, but in the variables you must
  12. define the message parts tokens with #.
  13. Conclusion:
  14. @username : normal input evaluator
  15. #relation_type: will be translated first before ending up as normal input evaluator @relation_type
  16. Concatenated messages
  17. ---------------------
  18. message_concat in heartbeat_messages is the string used when messages need to be merged.
  19. Together with concat_args we can rebuild a part of the message with the stuff to be
  20. merged. e.g. Paul is now friend with Walter, Mike and Evelyne or Paul updated 'Why on earth?' on 12-12-2008.
  21. There are a couple of heartbeat user_activity settings that affect the merging. Timespan when merge should
  22. occur, maximum and minimum values, user karma point system logged, etc ...
  23. Usage
  24. -----
  25. When working with rules and the default rules described in modules, it is possible
  26. to change the actions, add condtions, do whatever you like ...
  27. Assuming your site is multilingual, you need to be aware of the fact that words and
  28. sentences are only translatable once they are viewed in the browser, parsed by the
  29. t function (drupal translation function, locale).
  30. - enable heartbeat, user_activity and its contribute activity submodules
  31. - [optional change a rules action by updating the message with your own words (and tokens)]
  32. - go to admin/build/translate/search to translate the message AND message parts that are prefixed with '#'
  33. - trigger the event by doing what the rules event describes
  34. - go to heartbeat/user/[uid] or heartbeat/my_activity to view the result.
  35. If the translations were not enforced, this could be for a couple of reasons:
  36. Could be the wrong string is translated (or was not avaible yet to translate)
  37. Could be the string is translatable when this rule was invoked. (too me , it was
  38. sometimes correct , sometimes after the first time the event was invoked, bizarre)
  39. Requirements on Rules and tokens
  40. --------------------------------
  41. - patch the token module with http://drupal.org/node/331046
  42. or look if it is covered in latest release (this message should be gone by then)
  43. - DO NOT enable token_actions module!
  44. Stalski