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(); $uri = $target->getUri();
if (!in_array($uri, $activity->context->attention)) { if (!in_array($uri, $activity->context->attention)) {
// @todo FIXME: please document (i18n). // @todo FIXME: please document (i18n).
// TRANS: Client exception. // TRANS: Client exception thrown when ...
throw new ClientException(_('Bookmark not posted to this group.')); throw new ClientException(_('Bookmark not posted to this group.'));
} }
} else if ($target instanceof User) { } else if ($target instanceof User) {
@ -404,7 +404,7 @@ abstract class MicroAppPlugin extends Plugin
(empty($original) || (empty($original) ||
$original->profile_id != $target->id)) { $original->profile_id != $target->id)) {
// @todo FIXME: Please document (i18n). // @todo FIXME: Please document (i18n).
// TRANS: Client exception. // TRANS: Client exception when ...
throw new ClientException(_('Object not posted to this user.')); throw new ClientException(_('Object not posted to this user.'));
} }
} else { } else {
@ -550,6 +550,7 @@ abstract class MicroAppPlugin extends Plugin
function showNotice($notice, $out) 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

@ -4,7 +4,7 @@
* Copyright (C) 2011, StatusNet, Inc. * Copyright (C) 2011, StatusNet, Inc.
* *
* For use by microapps to customize notice list item output * For use by microapps to customize notice list item output
* *
* PHP version 5 * PHP version 5
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
@ -44,7 +44,6 @@ if (!defined('STATUSNET')) {
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html AGPL 3.0 * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html AGPL 3.0
* @link http://status.net/ * @link http://status.net/
*/ */
class NoticeListItemAdapter class NoticeListItemAdapter
{ {
protected $nli; protected $nli;
@ -54,7 +53,6 @@ class NoticeListItemAdapter
* *
* @param NoticeListItem $nli item to wrap * @param NoticeListItem $nli item to wrap
*/ */
function __construct($nli) function __construct($nli)
{ {
$this->nli = $nli; $this->nli = $nli;

View File

@ -165,7 +165,8 @@ class EventPlugin extends MicroappPlugin
function saveNoticeFromActivity($activity, $actor, $options=array()) function saveNoticeFromActivity($activity, $actor, $options=array())
{ {
if (count($activity->objects) != 1) { 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]; $happeningObj = $activity->objects[0];

View File

@ -4,7 +4,7 @@
* Copyright (C) 2011, StatusNet, Inc. * Copyright (C) 2011, StatusNet, Inc.
* *
* Notice-list representation of an event * Notice-list representation of an event
* *
* PHP version 5 * PHP version 5
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
@ -44,7 +44,6 @@ if (!defined('STATUSNET')) {
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html AGPL 3.0 * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html AGPL 3.0
* @link http://status.net/ * @link http://status.net/
*/ */
class EventListItem extends NoticeListItemAdapter class EventListItem extends NoticeListItemAdapter
{ {
function showNotice() function showNotice()
@ -64,7 +63,8 @@ class EventListItem extends NoticeListItemAdapter
$event = Happening::fromNotice($notice); $event = Happening::fromNotice($notice);
if (empty($event)) { 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; return;
} }
@ -135,7 +135,7 @@ class EventListItem extends NoticeListItemAdapter
$out->element('strong', null, _m('Attending:')); $out->element('strong', null, _m('Attending:'));
$out->element('span', 'event-rsvps', $out->element('span', 'event-rsvps',
// TRANS: RSVP counts. // 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'), sprintf(_m('Yes: %1$d No: %2$d Maybe: %3$d'),
count($rsvps[RSVP::POSITIVE]), count($rsvps[RSVP::POSITIVE]),
count($rsvps[RSVP::NEGATIVE]), count($rsvps[RSVP::NEGATIVE]),

View File

@ -109,8 +109,8 @@ class NewrsvpAction extends Action
$this->verb = RSVP::POSSIBLE; $this->verb = RSVP::POSSIBLE;
break; break;
default: default:
// TRANS: Client exception thrown when using an invalud value for RSVP ("please respond"). // TRANS: Client exception thrown when using an invalid value for RSVP ("please respond").
throw new ClientException(_('Unknown submit value.')); throw new ClientException(_m('Unknown submit value.'));
} }
return true; return true;

View File

@ -4,7 +4,7 @@
* Copyright (C) 2011, StatusNet, Inc. * Copyright (C) 2011, StatusNet, Inc.
* *
* Title of module * Title of module
* *
* PHP version 5 * PHP version 5
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
@ -44,7 +44,6 @@ if (!defined('STATUSNET')) {
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html AGPL 3.0 * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html AGPL 3.0
* @link http://status.net/ * @link http://status.net/
*/ */
class RSVPListItem extends NoticeListItemAdapter class RSVPListItem extends NoticeListItemAdapter
{ {
function showNotice() function showNotice()
@ -63,7 +62,8 @@ class RSVPListItem extends NoticeListItemAdapter
$rsvp = RSVP::fromNotice($notice); $rsvp = RSVP::fromNotice($notice);
if (empty($rsvp)) { 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; return;
} }