X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=classes%2FGroup_member.php;h=c40d06a1db0ebf99c61ea22ad80b438ac3cf1eff;hb=3cd03ee6ecb029ce0c27ddd6b3af92d888e1f58f;hp=c6ff24fed31053c1489b3b06b5ca4cb9a25ce14d;hpb=43ad609600f8374e923579c5f3dc6b28a92b1c7c;p=quix0rs-gnu-social.git diff --git a/classes/Group_member.php b/classes/Group_member.php index c6ff24fed3..c40d06a1db 100644 --- a/classes/Group_member.php +++ b/classes/Group_member.php @@ -71,7 +71,9 @@ class Group_member extends Memcached_DataObject $member = Profile::staticGet('id', $this->profile_id); if (empty($member)) { - throw new Exception("Profile ID {$this->profile_id} invalid."); + // TRANS: Exception thrown providing an invalid profile ID. + // TRANS: %s is the invalid profile ID. + throw new Exception(sprintf(_("Profile ID %s is invalid."),$this->profile_id)); } return $member; @@ -82,7 +84,9 @@ class Group_member extends Memcached_DataObject $group = User_group::staticGet('id', $this->group_id); if (empty($group)) { - throw new Exception("Group ID {$this->group_id} invalid."); + // TRANS: Exception thrown providing an invalid group ID. + // TRANS: %s is the invalid group ID. + throw new Exception(sprintf(_("Group ID %s is invalid."),$this->group_id)); } return $group; @@ -100,16 +104,17 @@ class Group_member extends Memcached_DataObject $group->id, common_date_iso8601($this->created)); - $act->actor = ActivityObject::fromProfile($member); - $act->verb = ActivityVerb::JOIN; - $act->object = ActivityObject::fromGroup($group); + $act->actor = ActivityObject::fromProfile($member); + $act->verb = ActivityVerb::JOIN; + $act->objects[] = ActivityObject::fromGroup($group); $act->time = strtotime($this->created); - $act->title = _m("Join"); + // TRANS: Activity title. + $act->title = _("Join"); // TRANS: Success message for subscribe to group attempt through OStatus. // TRANS: %1$s is the member name, %2$s is the subscribed group's name. - $act->content = sprintf(_m("%1$s has joined group %2$s."), + $act->content = sprintf(_('%1$s has joined group %2$s.'), $member->getBestName(), $group->getBestName());