i18n fixes.
Whitespace updates.
$uri = $target->getUri();
if (!in_array($uri, $activity->context->attention)) {
// @todo FIXME: please document (i18n).
- // TRANS: Client exception.
+ // TRANS: Client exception thrown when ...
throw new ClientException(_('Bookmark not posted to this group.'));
}
} else if ($target instanceof User) {
(empty($original) ||
$original->profile_id != $target->id)) {
// @todo FIXME: Please document (i18n).
- // TRANS: Client exception.
+ // TRANS: Client exception when ...
throw new ClientException(_('Object not posted to this user.'));
}
} else {
function showNotice($notice, $out)
{
- throw new ServerException("You must implement either adaptNoticeListItem() or showNotice()");
+ // TRANS: Server exception thrown when a micro app plugin developer has not done his job too well.
+ throw new ServerException(_('You must implement either adaptNoticeListItem() or showNotice().'));
}
}
* Copyright (C) 2011, StatusNet, Inc.
*
* For use by microapps to customize notice list item output
- *
+ *
* PHP version 5
*
* This program is free software: you can redistribute it and/or modify
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html AGPL 3.0
* @link http://status.net/
*/
-
class NoticeListItemAdapter
{
protected $nli;
*
* @param NoticeListItem $nli item to wrap
*/
-
function __construct($nli)
{
$this->nli = $nli;
function saveNoticeFromActivity($activity, $actor, $options=array())
{
if (count($activity->objects) != 1) {
- throw new Exception(_('Too many activity objects.'));
+ // TRANS: Exception thrown when there are too many activity objects.
+ throw new Exception(_m('Too many activity objects.'));
}
$happeningObj = $activity->objects[0];
* Copyright (C) 2011, StatusNet, Inc.
*
* Notice-list representation of an event
- *
+ *
* PHP version 5
*
* This program is free software: you can redistribute it and/or modify
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html AGPL 3.0
* @link http://status.net/
*/
-
class EventListItem extends NoticeListItemAdapter
{
function showNotice()
$event = Happening::fromNotice($notice);
if (empty($event)) {
- $out->element('p', null, _('Deleted.'));
+ // TRANS: Content for a deleted RSVP list item (RSVP stands for "please respond").
+ $out->element('p', null, _m('Deleted.'));
return;
}
$out->element('strong', null, _m('Attending:'));
$out->element('span', 'event-rsvps',
// TRANS: RSVP counts.
- // TRANS: %1$d, %2$d and %3$d are numbers of RSVPs.
+ // TRANS: %1$d, %2$d and %3$d are numbers of RSVPs.
sprintf(_m('Yes: %1$d No: %2$d Maybe: %3$d'),
count($rsvps[RSVP::POSITIVE]),
count($rsvps[RSVP::NEGATIVE]),
$this->verb = RSVP::POSSIBLE;
break;
default:
- // TRANS: Client exception thrown when using an invalud value for RSVP ("please respond").
- throw new ClientException(_('Unknown submit value.'));
+ // TRANS: Client exception thrown when using an invalid value for RSVP ("please respond").
+ throw new ClientException(_m('Unknown submit value.'));
}
return true;
* Copyright (C) 2011, StatusNet, Inc.
*
* Title of module
- *
+ *
* PHP version 5
*
* This program is free software: you can redistribute it and/or modify
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html AGPL 3.0
* @link http://status.net/
*/
-
class RSVPListItem extends NoticeListItemAdapter
{
function showNotice()
$rsvp = RSVP::fromNotice($notice);
if (empty($rsvp)) {
- $out->element('p', null, _('Deleted.'));
+ // TRANS: Content for a deleted RSVP list item (RSVP stands for "please respond").
+ $out->element('p', null, _m('Deleted.'));
return;
}