*/
function onStartEnqueueNotice($notice, &$transports)
{
- // FIXME: we don't do privacy-controlled OStatus updates yet.
- // once that happens, finer grain of control here.
- if ($notice->isLocal() && $notice->inScope(null)) {
- // put our transport first, in case there's any conflict (like OMB)
- array_unshift($transports, 'ostatus');
+ if ($notice->isLocal()) {
+ if ($notice->inScope(null)) {
+ // put our transport first, in case there's any conflict (like OMB)
+ array_unshift($transports, 'ostatus');
+ $this->log(LOG_INFO, "Notice {$notice->id} queued for OStatus processing");
+ } else {
+ // FIXME: we don't do privacy-controlled OStatus updates yet.
+ // once that happens, finer grain of control here.
+ $this->log(LOG_NOTICE, "Not queueing notice {$notice->id} for OStatus because of privacy; scope = {$notice->scope}");
+ }
+ } else {
+ $this->log(LOG_NOTICE, "Not queueing notice {$notice->id} for OStatus because it's not local.");
}
return true;
}
$cur = common_current_user();
if (empty($cur)) {
- $output->elementStart('li', 'entity_subscribe');
- $profile = $peopletag->getTagger();
+ $widget->out->elementStart('li', 'entity_subscribe');
+
$url = common_local_url('ostatusinit',
array('group' => $group->nickname));
$widget->out->element('a', array('href' => $url,
// TRANS: Link to subscribe to a remote entity.
_m('Subscribe'));
- $output->elementEnd('li');
+ $widget->out->elementEnd('li');
return false;
}
$action->elementStart('fieldset');
// TRANS: Fieldset legend.
- $action->element('legend', null, _m('Tag remote profile'));
+ $action->element('legend', null, _m('List remote profile'));
$action->hidden('token', common_session_token());
$user = common_current_user();
return false;
} catch (Exception $e) {
- // TRANS: Error message in OStatus plugin.
+ // TRANS: Error message in OStatus plugin. Do not translate the domain names example.com
+ // TRANS: and example.net, as these are official standard domain names for use in examples.
$err = _m("Sorry, we could not reach that address. Please make sure that the OStatus address is like nickname@example.com or http://example.net/nickname.");
}
*/
function onStartProfileCompletionSearch($action, $profile, $search_engine) {
if ($action->field == 'uri') {
- $user = new User();
- $profile->joinAdd($user);
+ $profile->joinAdd(array('id', 'user:id'));
$profile->whereAdd('uri LIKE "%' . $profile->escape($q) . '%"');
$profile->query();
return $this->filter(array($oprofile->localProfile()));
} catch (Exception $e) {
- // TRANS: Error message in OStatus plugin.
+ // TRANS: Error message in OStatus plugin. Do not translate the domain names example.com
+ // TRANS: and example.net, as these are official standard domain names for use in examples.
$this->msg = _m("Sorry, we could not reach that address. Please make sure that the OStatus address is like nickname@example.com or http://example.net/nickname.");
return array();
}
}
$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.
$oprofile = Ostatus_profile::staticGet('peopletag_id', $peopletag->id);
if ($oprofile) {
if (!$oprofile->subscribe()) {
- // TRANS: Exception thrown when setup of remote people tag subscription fails.
- throw new Exception(_m('Could not set up remote people tag subscription.'));
+ // TRANS: Exception thrown when setup of remote list subscription fails.
+ throw new Exception(_m('Could not set up remote list subscription.'));
}
$sub = $user->getProfile();
$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 the prople tag, %3$s is the tagger's name.
- $act->content = sprintf(_m("%1$s is now following people tagged %2$s by %3$s."),
+ // TRANS: %1$s is the subscriber name, %2$s is the list, %3$s is the lister's name.
+ $act->content = sprintf(_m('%1$s is now following people listed in %2$s by %3$s.'),
$sub->getBestName(),
$oprofile->getBestName(),
$tagger->getBestName());
return true;
} else {
$oprofile->garbageCollect();
- // TRANS: Exception thrown when subscription of remote people tag fails.
- throw new Exception(_m('Failed subscribing to remote people tag.'));
+ // TRANS: Exception thrown when subscription to remote list fails.
+ throw new Exception(_m('Failed subscribing to remote list.'));
}
}
}
$act->object = $oprofile->asActivityObject();
$act->time = time();
- $act->title = _m('Unfollow people tag');
+ // 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 lister'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');
- $act->content = sprintf(_m('%1$s tagged %2$s in the list %3$s.'),
+ // 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(),
$plist->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'),
- _m('Tag'));
+ // TRANS: Link text for a user to list an OStatus user.
+ _m('List'));
$output->elementEnd('li');
}
}