+function mail_footer_block()
+{
+ // TRANS: Common footer block for StatusNet notification emails.
+ // TRANS: %1$s is the StatusNet sitename,
+ // TRANS: %2$s is a link to the addressed user's e-mail settings.
+ return "\n\n" . sprintf(_('Faithfully yours,'.
+ "\n".'%1$s.'."\n\n".
+ "----\n".
+ "Change your email address or ".
+ "notification options at ".'%2$s'),
+ common_config('site', 'name'),
+ common_local_url('emailsettings')) . "\n";
+}
+
+/**
+ * Format a block of profile info for a plaintext notification email.
+ *
+ * @param Profile $profile
+ * @return string
+ */
+function mail_profile_block($profile)
+{
+ // TRANS: Layout for
+ // TRANS: %1$s is the subscriber's profile URL, %2$s is the subscriber's location (or empty)
+ // TRANS: %3$s is the subscriber's homepage URL (or empty), %4%s is the subscriber's bio (or empty)
+ $out = array();
+ $out[] = "";
+ $out[] = "";
+ // TRANS: Profile info line in notification e-mail.
+ // TRANS: %s is a URL.
+ $out[] = sprintf(_("Profile: %s"), $profile->profileurl);
+ if ($profile->location) {
+ // TRANS: Profile info line in notification e-mail.
+ // TRANS: %s is a location.
+ $out[] = sprintf(_("Location: %s"), $profile->location);
+ }
+ if ($profile->homepage) {
+ // TRANS: Profile info line in notification e-mail.
+ // TRANS: %s is a homepage.
+ $out[] = sprintf(_("Homepage: %s"), $profile->homepage);
+ }
+ if ($profile->bio) {
+ // TRANS: Profile info line in notification e-mail.
+ // TRANS: %s is biographical information.
+ $out[] = sprintf(_("Bio: %s"), $profile->bio);
+ }
+
+ $blocklink = common_local_url('block', array('profileid' => $profile->id));
+ // This'll let ModPlus add the remote profile info so it's possible
+ // to block remote users directly...
+ Event::handle('MailProfileInfoBlockLink', array($profile, &$blocklink));
+
+ // TRANS: This is a paragraph in a new-subscriber e-mail.
+ // TRANS: %s is a URL where the subscriber can be reported as abusive.
+ $out[] = sprintf(_('If you believe this account is being used abusively, ' .
+ 'you can block them from your subscribers list and ' .
+ 'report as spam to site administrators at %s.'),
+ $blocklink);
+ $out[] = "";
+
+ return implode("\n", $out);
+}
+