aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2017-11-03 16:47:05 -0700
committerzotlabs <mike@macgirvin.com>2017-11-03 16:47:05 -0700
commit9abb061e7185a29cb85ebbad04deba715e1a6a06 (patch)
tree785ed85d4cc850925110e34a97b6a19e0b71ffa9 /include
parentd450fc61c41d44c0acf60522001e7d5ebd451c46 (diff)
downloadvolse-hubzilla-9abb061e7185a29cb85ebbad04deba715e1a6a06.tar.gz
volse-hubzilla-9abb061e7185a29cb85ebbad04deba715e1a6a06.tar.bz2
volse-hubzilla-9abb061e7185a29cb85ebbad04deba715e1a6a06.zip
provide short localised summary for likes that will end up in displayed notifications
Diffstat (limited to 'include')
-rw-r--r--include/conversation.php12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/conversation.php b/include/conversation.php
index f395b2cbe..5ff8b3864 100644
--- a/include/conversation.php
+++ b/include/conversation.php
@@ -162,6 +162,18 @@ function localize_item(&$item){
elseif(activity_match($item['verb'],ACTIVITY_DISLIKE)) {
$bodyverb = t('%1$s doesn\'t like %2$s\'s %3$s');
}
+
+ // short version, in notification strings the author will be displayed separately
+
+ if(activity_match($item['verb'],ACTIVITY_LIKE)) {
+ $shortbodyverb = t('likes %1$s\'s %2$s');
+ }
+ elseif(activity_match($item['verb'],ACTIVITY_DISLIKE)) {
+ $shortbodyverb = t('doesn\'t like %1$s\'s %2$s');
+ }
+
+ $item['shortlocalize'] = sprintf($bodyverb, $objauthor, $plink);
+
$item['body'] = $item['localize'] = sprintf($bodyverb, $author, $objauthor, $plink);
if($Bphoto != "")
$item['body'] .= "\n\n\n" . '[zrl=' . chanlink_url($author_link) . '][zmg=80x80]' . $Bphoto . '[/zmg][/zrl]';