Some remaining people tag -> list.
Favor -> like
Update translator documentation.
Whitespace updates.
}
$url = $notice->url;
- // TRANS: Title.
- // TRANS: %s is a domain name.
+ // TRANS: Title. %s is a domain name.
$title = sprintf(_m('Sent from %s via OStatus'), $domain);
return false;
}
$act->object = $oprofile->asActivityObject();
$act->time = time();
- // TRANS: Title to join a remote group.
+ // TRANS: Title for joining a remote groep.
$act->title = _m('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->object = $oprofile->asActivityObject();
$act->time = time();
- // TRANS: Title for remote follow list.
+ // TRANS: Title for following a remote list.
$act->title = _m('TITLE','Follow list');
// TRANS: Success message for remote list follow through OStatus.
// TRANS: %1$s is the subscriber name, %2$s is the list, %3$s is the tagger's name.
- $act->content = sprintf(_m("%1$s is now following people listed in %2$s by %3$s."),
+ $act->content = sprintf(_m('%1$s is now following people listed in %2$s by %3$s.'),
$sub->getBestName(),
$oprofile->getBestName(),
$tagger->getBestName());
$act->object = $oprofile->asActivityObject();
$act->time = time();
+ // TRANS: Title for unfollowing a remote list.
$act->title = _m('Unfollow list');
+ // TRANS: Success message for remote list unfollow through OStatus.
+ // TRANS: %1$s is the subscriber name, %2$s is the list, %3$s is the tagger's name.
$act->content = sprintf(_m('%1$s stopped following the list %2$s by %3$s.'),
$sub->getBestName(),
$oprofile->getBestName(),
$plist->tagger, $plist->id,
common_date_iso8601(time()));
$act->time = time();
- $act->title = _m('TITLE','Tag');
+ // TRANS: Title for listing a remote profile.
+ $act->title = _m('TITLE','List');
+ // TRANS: Success message for remote list addition through OStatus.
+ // TRANS: %1$s is the list creator's name, %2$s is the added list member, %3$s is the list name.
$act->content = sprintf(_m('%1$s listed %2$s in the list %3$s.'),
$tagger->getBestName(),
$tagged->getBestName(),
// initiate a PuSH subscription for the person being tagged
if (!$oprofile->subscribe()) {
+ // TRANS: Exception thrown when subscribing to a remote list fails.
throw new Exception(sprintf(_m('Could not complete subscription to remote '.
- 'profile\'s feed. Tag %s could not be saved.'), $ptag->tag));
+ 'profile\'s feed. List %s could not be saved.'), $ptag->tag));
return false;
}
return true;
$plist->tagger, $plist->id,
common_date_iso8601(time()));
$act->time = time();
- $act->title = _m('TITLE','Untag');
- $act->content = sprintf(_('%1$s untagged %2$s from the list %3$s.'),
+ // TRANS: Title for unlisting a remote profile.
+ $act->title = _m('TITLE','Unlist');
+ // TRANS: Success message for remote list removal through OStatus.
+ // TRANS: %1$s is the list creator's name, %2$s is the removed list member, %3$s is the list name.
+ $act->content = sprintf(_m('%1$s removed %2$s from the list %3$s.'),
$tagger->getBestName(),
$tagged->getBestName(),
$plist->getBestName());
$notice->id,
common_date_iso8601(time()));
$act->time = time();
- $act->title = _m('Disfavor');
+ // TRANS: Title for unliking a remote notice.
+ $act->title = _m('Unlike');
// TRANS: Success message for remove a favorite notice through OStatus.
// TRANS: %1$s is the unfavoring user's name, %2$s is URI to the no longer favored notice.
- $act->content = sprintf(_m('%1$s marked notice %2$s as no longer a favorite.'),
+ $act->content = sprintf(_m('%1$s no longer likes %2$s.'),
$profile->getBestName(),
$notice->uri);
common_date_iso8601(time()));
$act->time = time();
// TRANS: Title for activity.
- $act->title = _m("Profile update");
+ $act->title = _m('Profile update');
// TRANS: Ping text for remote profile update through OStatus.
// TRANS: %s is user that updated their profile.
$act->content = sprintf(_m('%s has updated their profile page.'),
array('nickname' => $profileUser->nickname));
$output->element('a', array('href' => $url,
'class' => 'entity_remote_tag'),
+ // TRANS: Link text for a user to tag an OStatus user.
_m('Tag'));
$output->elementEnd('li');
}
}
if (Group_block::isBlocked($this->group, $profile)) {
+ // TRANS: Client error displayed when trying to join a group the user is blocked from by a group admin.
$this->clientError(_m('You have been blocked from that group by the admin.'), 403);
return false;
}
{
$oprofile = $this->ensureProfile();
if (!$oprofile) {
+ // TRANS: Client error displayed when group membership cannot be cancelled
+ // TRANS: because the remote profile could not be read.
$this->clientError(_m('Cannot read profile to cancel group membership.'));
}
if ($oprofile->isGroup()) {
+ // TRANS: Client error displayed when trying to have a group join another group.
$this->clientError(_m('Groups cannot join groups.'));
}
$cur = common_current_user();
if ($cur->isMember($group)) {
$this->element('div', array('class' => 'error'),
- _m("You are already a member of this group."));
+ // TRANS: Error text displayed when trying to join a remote group the user is already a member of.
+ _m('You are already a member of this group.'));
$ok = false;
} else {
$ok = true;
*/
function getInstructions()
{
- // TRANS: Instructions.
+ // TRANS: Form instructions.
return _m('You can subscribe to groups from other supported sites. Paste the group\'s profile URI below:');
}
} else if ($this->peopletag && $this->tagger) {
$user = User::staticGet('nickname', $this->tagger);
if (empty($user)) {
+ // TRANS: Client error.
$this->clientError(_m('No such user.'));
}
return common_local_url('profiletagbyid',
array('tagger_id' => $user->id, 'id' => $peopletag->id));
}
+ // TRANS: Client error.
$this->clientError(_m('No such list.'));
} else {
// TRANS: Client error.
$this->elementStart('ul', 'form_data');
$this->elementStart('li');
$this->input('profile',
+ // TRANS: Field label.
_m('Subscribe to list'),
$this->profile_uri,
- _m("Address of the OStatus list, like http://example.net/user/all/tag"));
+ // TRANS: Field title.
+ _m("Address of the OStatus list, like http://example.net/user/all/tag."));
$this->elementEnd('li');
$this->elementEnd('ul');
- $this->submit('validate', _m('Continue'));
+ // TRANS: Button text to continue joining a remote list.
+ $this->submit('validate', _m('BUTTON','Continue'));
$this->elementEnd('fieldset');
$cur = common_current_user();
if ($ptag->hasSubscriber($cur->id)) {
$this->element('div', array('class' => 'error'),
+ // TRANS: Error text displayed when trying to subscribe to a list already a subscriber to.
_m('You are already subscribed to this list.'));
$ok = false;
} else {
function getInstructions()
{
// TRANS: Instructions for OStatus list subscription form.
- return _m('You can subscribe to lists from other supported sites. Paste the lists\'s URI below:');
+ return _m('You can subscribe to lists from other supported sites. Paste the list\'s URI below:');
}
function selfLink()
_m('Subscribe to'),
$this->profile_uri,
// TRANS: Tooltip for field label "Subscribe to".
- _m('OStatus user\'s address, like nickname@example.com or http://example.net/nickname'));
+ _m('OStatus user\'s address, like nickname@example.com or http://example.net/nickname.'));
$this->elementEnd('li');
$this->elementEnd('ul');
// TRANS: Button text.
$this->hidden('token', common_session_token());
$this->hidden('profile', $this->profile_uri);
if ($this->oprofile->isGroup()) {
+ // TRANS: Button text.
$this->submit('submit', _m('Join'), 'submit', null,
- // TRANS: Button text.
// TRANS: Tooltip for button "Join".
_m('BUTTON','Join this group'));
} else {
$cur = common_current_user();
if ($cur->isSubscribed($profile)) {
$this->element('div', array('class' => 'error'),
- _m("You are already subscribed to this user."));
+ _m('You are already subscribed to this user.'));
$ok = false;
} else {
$ok = true;
function title()
{
- // TRANS: Page title for OStatus remote subscription form
+ // TRANS: Page title for OStatus remote subscription form.
return _m('Confirm');
}
class OStatusTagAction extends OStatusInitAction
{
-
var $nickname;
var $profile;
var $err;
parent::prepare($args);
if (common_logged_in()) {
+ // TRANS: Client error displayed when trying to tag a local object as if it is remote.
$this->clientError(_m('You can use the local tagging!'));
return false;
}
function showContent()
{
+ // TRANS: Header for tagging a remote object. %s is a remote object's name.
$header = sprintf(_m('Tag %s'), $this->nickname);
- $submit = _m('Go');
+ // TRANS: Button text to tag a remote object.
+ $submit = _m('BUTTON','Go');
$this->elementStart('form', array('id' => 'form_ostatus_connect',
'method' => 'post',
'class' => 'form_settings',
$this->elementStart('ul', 'form_data');
$this->elementStart('li', array('id' => 'ostatus_nickname'));
+ // TRANS: Field label.
$this->input('nickname', _m('User nickname'), $this->nickname,
- _m('Nickname of the user you want to tag'));
+ // TRANS: Field title.
+ _m('Nickname of the user you want to tag.'));
$this->elementEnd('li');
$this->elementStart('li', array('id' => 'ostatus_profile'));
+ // TRANS: Field label.
$this->input('profile', _m('Profile Account'), $this->profile,
- _m('Your account id (i.e. user@identi.ca)'));
+ // TRANS: Field title.
+ _m('Your account id (i.e. user@identi.ca).'));
$this->elementEnd('li');
$this->elementEnd('ul');
$this->submit('submit', $submit);
$disco = new Discovery;
$result = $disco->lookup($acct);
if (!$result) {
+ // TRANS: Client error displayed when remote profile could not be looked up.
$this->clientError(_m('Could not look up OStatus account profile.'));
}
}
}
+ // TRANS: Client error displayed when remote profile address could not be confirmed.
$this->clientError(_m('Could not confirm remote profile address.'));
}
function title()
{
+ // TRANS: Title for an OStatus list.
return _m('OStatus list');
}
}
$this->user = User::siteOwner();
if (!$this->user) {
+ // TRANS: Client error displayed when referring to a non-existing user.
$this->clientError(_m('No such user.'), 404);
return false;
}
$id = $this->trimmed('id');
if (!$id) {
+ // TRANS: Client error displayed trying to perform an action without providing an ID.
$this->clientError(_m('No ID.'));
}
$this->peopletag = Profile_list::staticGet('id', $id);
if (empty($this->peopletag)) {
+ // TRANS: Client error displayed when referring to a non-existing list.
$this->clientError(_m('No such list.'));
}
$oprofile = Ostatus_profile::staticGet('peopletag_id', $id);
if (!empty($oprofile)) {
+ // TRANS: Client error displayed when trying to send a message to a remote list.
$this->clientError(_m('Cannot accept remote posts for a remote list.'));
}
* currently we're doing the main logic in joingroup action
* and so have to repeat it here.
*/
-
function handleSubscribe()
{
$oprofile = $this->ensureProfile();
if (!$oprofile) {
- $this->clientError(_m('Cannot read profile to set up profile tag subscription.'));
+ // TRANS: Client error displayed when referring to a non-existing remote list.
+ $this->clientError(_m('Cannot read profile to set up list subscription.'));
}
if ($oprofile->isGroup()) {
+ // TRANS: Client error displayed when trying to subscribe a group to a list.
$this->clientError(_m('Groups cannot subscribe to lists.'));
}
try {
Profile_tag_subscription::add($this->peopletag, $profile);
} catch (Exception $e) {
+ // TRANS: Server error displayed when subscribing a remote user to a list fails.
+ // TRANS: %1$s is a profile URI, %2$s is a list name.
$this->serverError(sprintf(_m('Could not subscribe remote user %1$s to list %2$s.'),
$oprofile->uri, $this->peopletag->getBestName()));
}
}
/**
- * A remote user unsubscribed from our peopletag.
+ * A remote user unsubscribed from our list.
*/
-
function handleUnsubscribe()
{
$oprofile = $this->ensureProfile();
if (!$oprofile) {
- $this->clientError(_m('Cannot read profile to cancel list membership.'));
+ // TRANS: Client error displayed when trying to unsubscribe from non-existing list.
+ $this->clientError(_m('Cannot read profile to cancel list subscription.'));
}
if ($oprofile->isGroup()) {
+ // TRANS: Client error displayed when trying to unsubscribe a group from a list.
$this->clientError(_m('Groups cannot subscribe to lists.'));
}
Profile_tag_subscription::remove($this->peopletag->tagger, $this->peopletag->tag, $profile->id);
} catch (Exception $e) {
- $this->serverError(sprintf(_m('Could not remove remote user %1$s from list %2$s.'),
+ // TRANS: Client error displayed when trying to unsubscribe a remote user from a list fails.
+ // TRANS: %1$s is a profile URL, %2$s is a list name.
+ $this->serverError(sprintf(_m('Could not unsubscribe remote user %1$s from list %2$s.'),
$oprofile->uri, $this->peopletag->getBestName()));
return;
}
$feedid = $this->arg('feed');
common_log(LOG_INFO, "POST for feed id $feedid");
if (!$feedid) {
+ // TRANS: Server exception thrown when referring to a non-existing or empty feed.
throw new ServerException(_m('Empty or invalid feed id.'), 400);
}
$id = $this->trimmed('id');
if (!$id) {
+ // TRANS: Client error displayed trying to perform an action without providing an ID.
$this->clientError(_m('No ID.'));
}
$this->user = User::staticGet('id', $id);
if (empty($this->user)) {
+ // TRANS: Client error displayed when referring to a non-existing user.
$this->clientError(_m('No such user.'));
}
case ActivityObject::COMMENT:
break;
default:
+ // TRANS: Client exception thrown when an undefied activity is performed.
throw new ClientException(_m('Cannot handle that kind of post.'));
}
!in_array(common_profile_url($this->user->nickname), $context->attention)) {
common_log(LOG_ERR, "{$this->user->uri} not in attention list (".implode(',', $context->attention).")");
// TRANS: Client exception.
- throw new ClientException('To the attention of user(s), not including this one.');
+ throw new ClientException(_m('To the attention of user(s), not including this one.'));
}
} else {
// TRANS: Client exception.
- throw new ClientException('Not to anyone in reply to anything.');
+ throw new ClientException(_m('Not to anyone in reply to anything.'));
}
$existing = Notice::staticGet('uri', $this->activity->objects[0]->id);
{
if ($this->activity->target->type == ActivityObject::_LIST) {
if ($this->activity->objects[0]->type != ActivityObject::PERSON) {
- throw new ClientException("Not a person object");
+ // TRANS: Client exception.
+ throw new ClientException(_m('Not a person object.'));
return false;
}
// this is a peopletag
$tagged = User::staticGet('uri', $this->activity->objects[0]->id);
if (empty($tagged)) {
- throw new ClientException("Unidentified profile being tagged");
+ // TRANS: Client exception.
+ throw new ClientException(_m('Unidentified profile being tagged.'));
}
if ($tagged->id !== $this->user->id) {
- throw new ClientException("This user is not the one being tagged");
+ // TRANS: Client exception.
+ throw new ClientException(_m('This user is not the one being tagged.'));
}
// save the list
$ptag = $list->localPeopletag();
$result = Profile_tag::setTag($ptag->tagger, $tagged->id, $ptag->tag);
if (!$result) {
- throw new ClientException("The tag could not be saved.");
+ // TRANS: Client exception.
+ throw new ClientException(_m('The tag could not be saved.'));
}
}
}
{
if ($this->activity->target->type == ActivityObject::_LIST) {
if ($this->activity->objects[0]->type != ActivityObject::PERSON) {
- throw new ClientException("Not a person object");
+ // TRANS: Client exception.
+ throw new ClientException(_m('Not a person object.'));
return false;
}
// this is a peopletag
$tagged = User::staticGet('uri', $this->activity->objects[0]->id);
if (empty($tagged)) {
- throw new ClientException("Unidentified profile being untagged");
+ // TRANS: Client exception.
+ throw new ClientException(_m('Unidentified profile being untagged.'));
}
if ($tagged->id !== $this->user->id) {
- throw new ClientException("This user is not the one being untagged");
+ // TRANS: Client exception.
+ throw new ClientException(_m('This user is not the one being untagged.'));
}
// save the list
$result = Profile_tag::unTag($ptag->tagger, $tagged->id, $ptag->tag);
if (!$result) {
- throw new ClientException("The tag could not be deleted.");
+ // TRANS: Client exception.
+ throw new ClientException(_m('The tag could not be deleted.'));
}
}
}
return true;
} else if ($this->group_id && ($this->profile_id || $this->peopletag_id)) {
// TRANS: Server exception. %s is a URI
- throw new ServerException(sprintf(_m('Invalid ostatus_profile state: two or more IDs set for %s.'), $this->uri));
+ throw new ServerException(sprintf(_m('Invalid ostatus_profile state: Two or more IDs set for %s.'), $this->uri));
} else {
// TRANS: Server exception. %s is a URI
- throw new ServerException(sprintf(_m('Invalid ostatus_profile state: all IDs empty for %s.'), $this->uri));
+ throw new ServerException(sprintf(_m('Invalid ostatus_profile state: All IDs empty for %s.'), $this->uri));
}
}
return true;
} else if ($this->peopletag_id && ($this->profile_id || $this->group_id)) {
// TRANS: Server exception. %s is a URI
- throw new ServerException(sprintf(_m('Invalid ostatus_profile state: two or more IDs set for %s.'), $this->uri));
+ throw new ServerException(sprintf(_m('Invalid ostatus_profile state: Two or more IDs set for %s.'), $this->uri));
} else {
// TRANS: Server exception. %s is a URI
- throw new ServerException(sprintf(_m('Invalid ostatus_profile state: all IDs empty for %s.'), $this->uri));
+ throw new ServerException(sprintf(_m('Invalid ostatus_profile state: All IDs empty for %s.'), $this->uri));
}
}
if ($object->link && common_valid_http_url($object->link)) {
return $object->link;
}
+ // TRANS: Server exception.
throw new ServerException(_m('No author ID URI found.'));
}
if (!$homeuri) {
common_log(LOG_DEBUG, __METHOD__ . " empty actor profile URI: " . var_export($activity, true));
+ // TRANS: Exception.
throw new Exception(_m('No profile URI.'));
}
if ($ptag) {
$local_user = User::staticGet('id', $ptag->tagger);
if (!empty($local_user)) {
+ // TRANS: Exception.
throw new Exception(_m('Local list cannot be referenced as remote.'));
}
}
$oprofile->peopletag_id = $ptag->insert();
if (!$oprofile->peopletag_id) {
+ // TRANS: Server exception.
throw new ServerException(_m('Cannot save local list.'));
}
}
// Save negative cache entry so we don't waste time looking it up again.
// @fixme distinguish temporary failures?
self::cacheSet(sprintf('ostatus_profile:webfinger:%s', $addr), null);
- // TRANS: Exception.
+ // TRANS: Exception.
throw new Exception(_m('Not a valid webfinger address.'));
}
// XXX: try FOAF
if (array_key_exists('salmon', $hints)) {
-
$salmonEndpoint = $hints['salmon'];
// An account URL, a salmon endpoint, and a dream? Not much to go
common_log(LOG_ERR, "Salmon unable to sign: " . $e->getMessage());
return false;
}
-
+
$headers = array('Content-Type: application/magic-envelope+xml');
-
+
try {
$client = new HTTPClient();
$client->setBody($envelope);
}
if (empty($_SERVER['CONTENT_TYPE']) || $_SERVER['CONTENT_TYPE'] != 'application/magic-envelope+xml') {
- // TRANS: Client error. Do not translate "application/magic-envelope+xml"
+ // TRANS: Client error. Do not translate "application/magic-envelope+xml".
$this->clientError(_m('Salmon requires "application/magic-envelope+xml".'));
}