forked from GNUsocial/gnu-social
Fix L10n/i18n.
Some remaining people tag -> list. Favor -> like Update translator documentation. Whitespace updates.
This commit is contained in:
parent
c13fbfb2d2
commit
4651c9d94a
@ -575,8 +575,7 @@ class OStatusPlugin extends Plugin
|
||||
}
|
||||
|
||||
$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;
|
||||
}
|
||||
@ -774,7 +773,7 @@ class OStatusPlugin extends Plugin
|
||||
$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.
|
||||
@ -872,11 +871,11 @@ class OStatusPlugin extends Plugin
|
||||
$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());
|
||||
@ -922,7 +921,10 @@ class OStatusPlugin extends Plugin
|
||||
$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(),
|
||||
@ -999,7 +1001,10 @@ class OStatusPlugin extends Plugin
|
||||
$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(),
|
||||
@ -1013,8 +1018,9 @@ class OStatusPlugin extends Plugin
|
||||
|
||||
// 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;
|
||||
@ -1052,8 +1058,11 @@ class OStatusPlugin extends Plugin
|
||||
$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());
|
||||
@ -1100,10 +1109,11 @@ class OStatusPlugin extends Plugin
|
||||
$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);
|
||||
|
||||
@ -1219,7 +1229,7 @@ class OStatusPlugin extends Plugin
|
||||
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.'),
|
||||
@ -1265,6 +1275,7 @@ class OStatusPlugin extends Plugin
|
||||
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');
|
||||
}
|
||||
|
@ -144,6 +144,7 @@ class GroupsalmonAction extends SalmonAction
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
@ -164,9 +165,12 @@ class GroupsalmonAction extends SalmonAction
|
||||
{
|
||||
$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.'));
|
||||
}
|
||||
|
||||
|
@ -102,7 +102,8 @@ class OStatusGroupAction extends OStatusSubAction
|
||||
$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;
|
||||
@ -168,7 +169,7 @@ class OStatusGroupAction extends OStatusSubAction
|
||||
*/
|
||||
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:');
|
||||
}
|
||||
|
||||
|
@ -231,6 +231,7 @@ class OStatusInitAction extends Action
|
||||
} else if ($this->peopletag && $this->tagger) {
|
||||
$user = User::staticGet('nickname', $this->tagger);
|
||||
if (empty($user)) {
|
||||
// TRANS: Client error.
|
||||
$this->clientError(_m('No such user.'));
|
||||
}
|
||||
|
||||
@ -239,6 +240,7 @@ class OStatusInitAction extends Action
|
||||
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.
|
||||
|
@ -70,13 +70,16 @@ class OStatusPeopletagAction extends OStatusSubAction
|
||||
$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');
|
||||
|
||||
@ -95,6 +98,7 @@ class OStatusPeopletagAction extends OStatusSubAction
|
||||
$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 {
|
||||
@ -170,7 +174,7 @@ class OStatusPeopletagAction extends OStatusSubAction
|
||||
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()
|
||||
|
@ -68,7 +68,7 @@ class OStatusSubAction extends Action
|
||||
_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.
|
||||
@ -106,8 +106,8 @@ class OStatusSubAction extends Action
|
||||
$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 {
|
||||
@ -135,7 +135,7 @@ class OStatusSubAction extends Action
|
||||
$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;
|
||||
@ -393,7 +393,7 @@ class OStatusSubAction extends Action
|
||||
|
||||
function title()
|
||||
{
|
||||
// TRANS: Page title for OStatus remote subscription form
|
||||
// TRANS: Page title for OStatus remote subscription form.
|
||||
return _m('Confirm');
|
||||
}
|
||||
|
||||
|
@ -27,7 +27,6 @@ if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); }
|
||||
|
||||
class OStatusTagAction extends OStatusInitAction
|
||||
{
|
||||
|
||||
var $nickname;
|
||||
var $profile;
|
||||
var $err;
|
||||
@ -37,6 +36,7 @@ class OStatusTagAction extends OStatusInitAction
|
||||
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;
|
||||
}
|
||||
@ -51,8 +51,10 @@ class OStatusTagAction extends OStatusInitAction
|
||||
|
||||
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',
|
||||
@ -63,12 +65,16 @@ class OStatusTagAction extends OStatusInitAction
|
||||
|
||||
$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);
|
||||
@ -83,6 +89,7 @@ class OStatusTagAction extends OStatusInitAction
|
||||
$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.'));
|
||||
}
|
||||
|
||||
@ -95,6 +102,7 @@ class OStatusTagAction extends OStatusInitAction
|
||||
}
|
||||
|
||||
}
|
||||
// TRANS: Client error displayed when remote profile address could not be confirmed.
|
||||
$this->clientError(_m('Could not confirm remote profile address.'));
|
||||
}
|
||||
|
||||
@ -112,6 +120,7 @@ class OStatusTagAction extends OStatusInitAction
|
||||
|
||||
function title()
|
||||
{
|
||||
// TRANS: Title for an OStatus list.
|
||||
return _m('OStatus list');
|
||||
}
|
||||
}
|
||||
|
@ -36,6 +36,7 @@ class OwnerxrdAction extends XrdAction
|
||||
$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;
|
||||
}
|
||||
|
@ -36,18 +36,21 @@ class PeopletagsalmonAction extends SalmonAction
|
||||
$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.'));
|
||||
}
|
||||
|
||||
@ -81,14 +84,15 @@ class PeopletagsalmonAction extends SalmonAction
|
||||
* 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.'));
|
||||
}
|
||||
|
||||
@ -107,22 +111,25 @@ class PeopletagsalmonAction extends SalmonAction
|
||||
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.'));
|
||||
}
|
||||
|
||||
@ -133,7 +140,9 @@ class PeopletagsalmonAction extends SalmonAction
|
||||
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;
|
||||
}
|
||||
|
@ -47,6 +47,7 @@ class PushCallbackAction extends Action
|
||||
$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);
|
||||
}
|
||||
|
||||
|
@ -34,12 +34,14 @@ class UsersalmonAction extends SalmonAction
|
||||
$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.'));
|
||||
}
|
||||
|
||||
@ -67,6 +69,7 @@ class UsersalmonAction extends SalmonAction
|
||||
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.'));
|
||||
}
|
||||
|
||||
@ -92,11 +95,11 @@ class UsersalmonAction extends SalmonAction
|
||||
!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);
|
||||
@ -189,18 +192,21 @@ class UsersalmonAction extends SalmonAction
|
||||
{
|
||||
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
|
||||
@ -210,7 +216,8 @@ class UsersalmonAction extends SalmonAction
|
||||
$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.'));
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -219,18 +226,21 @@ class UsersalmonAction extends SalmonAction
|
||||
{
|
||||
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
|
||||
@ -241,7 +251,8 @@ class UsersalmonAction extends SalmonAction
|
||||
$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.'));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -171,10 +171,10 @@ class Ostatus_profile extends Managed_DataObject
|
||||
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));
|
||||
}
|
||||
}
|
||||
|
||||
@ -189,10 +189,10 @@ class Ostatus_profile extends Managed_DataObject
|
||||
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));
|
||||
}
|
||||
}
|
||||
|
||||
@ -1209,6 +1209,7 @@ class Ostatus_profile extends Managed_DataObject
|
||||
if ($object->link && common_valid_http_url($object->link)) {
|
||||
return $object->link;
|
||||
}
|
||||
// TRANS: Server exception.
|
||||
throw new ServerException(_m('No author ID URI found.'));
|
||||
}
|
||||
|
||||
@ -1234,6 +1235,7 @@ class Ostatus_profile extends Managed_DataObject
|
||||
|
||||
if (!$homeuri) {
|
||||
common_log(LOG_DEBUG, __METHOD__ . " empty actor profile URI: " . var_export($activity, true));
|
||||
// TRANS: Exception.
|
||||
throw new Exception(_m('No profile URI.'));
|
||||
}
|
||||
|
||||
@ -1252,6 +1254,7 @@ class Ostatus_profile extends Managed_DataObject
|
||||
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.'));
|
||||
}
|
||||
}
|
||||
@ -1326,6 +1329,7 @@ class Ostatus_profile extends Managed_DataObject
|
||||
|
||||
$oprofile->peopletag_id = $ptag->insert();
|
||||
if (!$oprofile->peopletag_id) {
|
||||
// TRANS: Server exception.
|
||||
throw new ServerException(_m('Cannot save local list.'));
|
||||
}
|
||||
}
|
||||
@ -1673,7 +1677,7 @@ class Ostatus_profile extends Managed_DataObject
|
||||
// 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.'));
|
||||
}
|
||||
|
||||
@ -1731,7 +1735,6 @@ class Ostatus_profile extends Managed_DataObject
|
||||
// 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
|
||||
|
@ -59,9 +59,9 @@ class Salmon
|
||||
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);
|
||||
|
@ -44,7 +44,7 @@ class SalmonAction extends Action
|
||||
}
|
||||
|
||||
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".'));
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user