Update/add translator documentation.
Fix i18n domain where needed. Whitespace updates.
This commit is contained in:
parent
c718a603f5
commit
d85bfd426d
@ -78,14 +78,14 @@ class NewrsvpAction extends Action
|
|||||||
$eventId = $this->trimmed('event');
|
$eventId = $this->trimmed('event');
|
||||||
|
|
||||||
if (empty($eventId)) {
|
if (empty($eventId)) {
|
||||||
// TRANS: Client exception thrown when requesting a non-exsting event.
|
// TRANS: Client exception thrown when referring to a non-existing event.
|
||||||
throw new ClientException(_m('No such event.'));
|
throw new ClientException(_m('No such event.'));
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->event = Happening::staticGet('id', $eventId);
|
$this->event = Happening::staticGet('id', $eventId);
|
||||||
|
|
||||||
if (empty($this->event)) {
|
if (empty($this->event)) {
|
||||||
// TRANS: Client exception thrown when requesting a non-exsting event.
|
// TRANS: Client exception thrown when referring to a non-existing event.
|
||||||
throw new ClientException(_m('No such event.'));
|
throw new ClientException(_m('No such event.'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -32,7 +32,6 @@ if (!defined('STATUSNET')) {
|
|||||||
* Callback handler to populate end time dropdown
|
* Callback handler to populate end time dropdown
|
||||||
*/
|
*/
|
||||||
class TimelistAction extends Action {
|
class TimelistAction extends Action {
|
||||||
|
|
||||||
private $start;
|
private $start;
|
||||||
private $duration;
|
private $duration;
|
||||||
|
|
||||||
@ -63,13 +62,14 @@ class TimelistAction extends Action {
|
|||||||
|
|
||||||
if (!common_logged_in()) {
|
if (!common_logged_in()) {
|
||||||
// TRANS: Error message displayed when trying to perform an action that requires a logged in user.
|
// TRANS: Error message displayed when trying to perform an action that requires a logged in user.
|
||||||
$this->clientError(_('Not logged in.'));
|
$this->clientError(_m('Not logged in.'));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!empty($this->start)) {
|
if (!empty($this->start)) {
|
||||||
$times = EventTimeList::getTimes($this->start, $this->duration);
|
$times = EventTimeList::getTimes($this->start, $this->duration);
|
||||||
} else {
|
} else {
|
||||||
|
// TRANS: Client error when submitting a form with unexpected information.
|
||||||
$this->clientError(_m('Unexpected form submission.'));
|
$this->clientError(_m('Unexpected form submission.'));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -78,6 +78,7 @@ class TimelistAction extends Action {
|
|||||||
header('Content-Type: application/json; charset=utf-8');
|
header('Content-Type: application/json; charset=utf-8');
|
||||||
print json_encode($times);
|
print json_encode($times);
|
||||||
} else {
|
} else {
|
||||||
|
// TRANS: Client error displayed when using an action in a non-AJAX way.
|
||||||
$this->clientError(_m('This action is AJAX only.'));
|
$this->clientError(_m('This action is AJAX only.'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user