X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=include%2Fenotify.php;h=2ae7a99157a2c72f43111020f9369f8bb22536ad;hb=ee098277b998fcf50c3393f65e2a08130a2d1bbe;hp=8b244230bd3dacbb97a17c8a326222a614269f78;hpb=2ec3a97393959e42d450e074271d2d622d25701f;p=friendica.git diff --git a/include/enotify.php b/include/enotify.php index 8b244230bd..2ae7a99157 100644 --- a/include/enotify.php +++ b/include/enotify.php @@ -174,39 +174,39 @@ function notification($params) // "George Bull's post" if ($params['activity']['origin_comment']) { - $message = '%1$s replied to you on %2$s\'s %3$s %4$s'; + $message = $l10n->t('%1$s replied to you on %2$s\'s %3$s %4$s'); } elseif ($params['activity']['explicit_tagged']) { - $message = '%1$s tagged you on %2$s\'s %3$s %4$s'; + $message = $l10n->t('%1$s tagged you on %2$s\'s %3$s %4$s'); } else { - $message = '%1$s commented on %2$s\'s %3$s %4$s'; + $message = $l10n->t('%1$s commented on %2$s\'s %3$s %4$s'); } - $dest_str = $l10n->t($message, $params['source_name'], $item['author-name'], $item_post_type, $title); + $dest_str = sprintf($message, $params['source_name'], $item['author-name'], $item_post_type, $title); // Then look for the special cases // "your post" if ($params['activity']['origin_thread']) { if ($params['activity']['origin_comment']) { - $message = '%1$s replied to you on your %2$s %3$s'; + $message = $l10n->t('%1$s replied to you on your %2$s %3$s'); } elseif ($params['activity']['explicit_tagged']) { - $message = '%1$s tagged you on your %2$s %3$s'; + $message = $l10n->t('%1$s tagged you on your %2$s %3$s'); } else { - $message = '%1$s commented on your %2$s %3$s'; + $message = $l10n->t('%1$s commented on your %2$s %3$s'); } - $dest_str = $l10n->t($message, $params['source_name'], $item_post_type, $title); + $dest_str = sprintf($message, $params['source_name'], $item_post_type, $title); // "their post" } elseif ($item['author-link'] == $params['source_link']) { if ($params['activity']['origin_comment']) { - $message = '%1$s replied to you on their %2$s %3$s'; + $message = $l10n->t('%1$s replied to you on their %2$s %3$s'); } elseif ($params['activity']['explicit_tagged']) { - $message = '%1$s tagged you on their %2$s %3$s'; + $message = $l10n->t('%1$s tagged you on their %2$s %3$s'); } else { - $message = '%1$s commented on their %2$s %3$s'; + $message = $l10n->t('%1$s commented on their %2$s %3$s'); } - $dest_str = $l10n->t($message, $params['source_name'], $item_post_type, $title); + $dest_str = sprintf($message, $params['source_name'], $item_post_type, $title); } // Some mail software relies on subject field for threading. @@ -453,7 +453,7 @@ function notification($params) if ($show_in_notification_page) { $notification = DI::notify()->insert([ 'name' => $params['source_name'] ?? '', - 'name_cache' => strip_tags(BBCode::convert($params['source_name'] ?? '')), + 'name_cache' => substr(strip_tags(BBCode::convert($params['source_name'] ?? '')), 0, 255), 'url' => $params['source_link'] ?? '', 'photo' => $params['source_photo'] ?? '', 'link' => $itemlink ?? '',