Update translator documentation.

i18n fixes.
Whitespace updates.
This commit is contained in:
Siebrand Mazeland 2011-04-21 20:26:58 +02:00
parent 98cc1da7b5
commit 5e97047f8f
6 changed files with 16 additions and 16 deletions

View File

@ -390,7 +390,7 @@ abstract class MicroAppPlugin extends Plugin
$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) {
@ -404,7 +404,7 @@ abstract class MicroAppPlugin extends Plugin
(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 {
@ -550,6 +550,7 @@ abstract class MicroAppPlugin extends Plugin
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().'));
}
}

View File

@ -44,7 +44,6 @@ if (!defined('STATUSNET')) {
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html AGPL 3.0
* @link http://status.net/
*/
class NoticeListItemAdapter
{
protected $nli;
@ -54,7 +53,6 @@ class NoticeListItemAdapter
*
* @param NoticeListItem $nli item to wrap
*/
function __construct($nli)
{
$this->nli = $nli;

View File

@ -165,7 +165,8 @@ class EventPlugin extends MicroappPlugin
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];

View File

@ -44,7 +44,6 @@ if (!defined('STATUSNET')) {
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html AGPL 3.0
* @link http://status.net/
*/
class EventListItem extends NoticeListItemAdapter
{
function showNotice()
@ -64,7 +63,8 @@ class EventListItem extends NoticeListItemAdapter
$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;
}
@ -135,7 +135,7 @@ class EventListItem extends NoticeListItemAdapter
$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]),

View File

@ -109,8 +109,8 @@ class NewrsvpAction extends Action
$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;

View File

@ -44,7 +44,6 @@ if (!defined('STATUSNET')) {
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html AGPL 3.0
* @link http://status.net/
*/
class RSVPListItem extends NoticeListItemAdapter
{
function showNotice()
@ -63,7 +62,8 @@ class RSVPListItem extends NoticeListItemAdapter
$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;
}