Add translator documentation.
L10n/i18n fixes. Whitespace updates.
This commit is contained in:
parent
73806460ce
commit
d756242f64
@ -46,7 +46,6 @@ require_once INSTALLDIR . '/lib/apiauth.php';
|
|||||||
* @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 ApiconversationAction extends ApiAuthAction
|
class ApiconversationAction extends ApiAuthAction
|
||||||
{
|
{
|
||||||
protected $conversation = null;
|
protected $conversation = null;
|
||||||
@ -59,7 +58,6 @@ class ApiconversationAction extends ApiAuthAction
|
|||||||
*
|
*
|
||||||
* @return boolean true
|
* @return boolean true
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function prepare($argarray)
|
function prepare($argarray)
|
||||||
{
|
{
|
||||||
parent::prepare($argarray);
|
parent::prepare($argarray);
|
||||||
@ -67,13 +65,15 @@ class ApiconversationAction extends ApiAuthAction
|
|||||||
$convId = $this->trimmed('id');
|
$convId = $this->trimmed('id');
|
||||||
|
|
||||||
if (empty($convId)) {
|
if (empty($convId)) {
|
||||||
throw new ClientException(_m('no conversation id'));
|
// TRANS: Client exception thrown when no conversation ID is given.
|
||||||
|
throw new ClientException(_('No conversation ID.'));
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->conversation = Conversation::staticGet('id', $convId);
|
$this->conversation = Conversation::staticGet('id', $convId);
|
||||||
|
|
||||||
if (empty($this->conversation)) {
|
if (empty($this->conversation)) {
|
||||||
throw new ClientException(sprintf(_m('No conversation with id %d'), $convId),
|
// TRANS: Client exception thrown when referring to a non-existing conversation ID (%d).
|
||||||
|
throw new ClientException(sprintf(_('No conversation with ID %d.'), $convId),
|
||||||
404);
|
404);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -98,12 +98,11 @@ class ApiconversationAction extends ApiAuthAction
|
|||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function handle($argarray=null)
|
function handle($argarray=null)
|
||||||
{
|
{
|
||||||
$sitename = common_config('site', 'name');
|
$sitename = common_config('site', 'name');
|
||||||
// TRANS: Timeline title for user and friends. %s is a user nickname.
|
// TRANS: Timeline title for user and friends. %s is a user nickname.
|
||||||
$title = _("Conversation");
|
$title = _m('TITLE', 'Conversation');
|
||||||
$id = common_local_url('apiconversation', array('id' => $this->conversation->id, 'format' => $this->format));
|
$id = common_local_url('apiconversation', array('id' => $this->conversation->id, 'format' => $this->format));
|
||||||
$link = common_local_url('conversation', array('id' => $this->conversation->id));
|
$link = common_local_url('conversation', array('id' => $this->conversation->id));
|
||||||
|
|
||||||
@ -168,7 +167,6 @@ class ApiconversationAction extends ApiAuthAction
|
|||||||
*
|
*
|
||||||
* @return boolean is read only action?
|
* @return boolean is read only action?
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function isReadOnly($args)
|
function isReadOnly($args)
|
||||||
{
|
{
|
||||||
if ($_SERVER['REQUEST_METHOD'] == 'GET' ||
|
if ($_SERVER['REQUEST_METHOD'] == 'GET' ||
|
||||||
@ -202,7 +200,6 @@ class ApiconversationAction extends ApiAuthAction
|
|||||||
*
|
*
|
||||||
* @return string etag http header
|
* @return string etag http header
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function etag()
|
function etag()
|
||||||
{
|
{
|
||||||
if (!empty($this->notices) && (count($this->notices) > 0)) {
|
if (!empty($this->notices) && (count($this->notices) > 0)) {
|
||||||
@ -229,7 +226,6 @@ class ApiconversationAction extends ApiAuthAction
|
|||||||
*
|
*
|
||||||
* @return boolean true if delete, else false
|
* @return boolean true if delete, else false
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function requiresAuth()
|
function requiresAuth()
|
||||||
{
|
{
|
||||||
if ($_SERVER['REQUEST_METHOD'] == 'GET' ||
|
if ($_SERVER['REQUEST_METHOD'] == 'GET' ||
|
||||||
|
Loading…
Reference in New Issue
Block a user