i18n/L10n updates

Translator documentation added
This commit is contained in:
Siebrand Mazeland
2011-03-11 19:05:28 +01:00
parent a70914cd57
commit 843ace580d
8 changed files with 52 additions and 17 deletions

View File

@@ -3,7 +3,7 @@
* StatusNet - the distributed open-source microblogging tool
* Copyright (C) 2011, StatusNet, Inc.
*
* Add a new Poll
* Respond to a Poll
*
* PHP version 5
*
@@ -34,7 +34,7 @@ if (!defined('STATUSNET')) {
}
/**
* Add a new Poll
* Respond to a Poll
*
* @category Poll
* @package StatusNet
@@ -59,6 +59,7 @@ class RespondPollAction extends Action
*/
function title()
{
// TRANS: Page title for poll response.
return _m('Poll response');
}
@@ -79,6 +80,7 @@ class RespondPollAction extends Action
$this->user = common_current_user();
if (empty($this->user)) {
// TRANS: Client exception thrown trying to respond to a poll while not logged in.
throw new ClientException(_m("You must be logged in to respond to a poll."),
403);
}
@@ -90,11 +92,13 @@ class RespondPollAction extends Action
$id = $this->trimmed('id');
$this->poll = Poll::staticGet('id', $id);
if (empty($this->poll)) {
throw new ClientException(_m("Invalid or missing poll."), 404);
// TRANS: Client exception thrown trying to respond to a non-existing poll.
throw new ClientException(_m('Invalid or missing poll.'), 404);
}
$selection = intval($this->trimmed('pollselection'));
if ($selection < 1 || $selection > count($this->poll->getOptions())) {
// TRANS: Client exception thrown responding to a poll with an invalid answer.
throw new ClientException(_m('Invalid poll selection.'));
}
$this->selection = $selection;